metabase as service with oracle database - oracle

I tried Install Metabase as servicetutorial for Metabase Setup on CENTOS. Though i want to run metabase with oracle.
[bkmetabase#BK01 MetaBase]$ pwd
/home/bkmetabase/MetaBase
[bkmetabase#BK01 MetaBase]$ ll
total 119488
-rw-rw-r-- 1 bkmetabase bkmetabase 3975 Jun 6 07:52 logger_metabase.log
-rw-rw-r-- 1 bkmetabase bkmetabase 7503872 Jun 6 07:52 metabase.db.mv.db
-rw-rw-r-- 1 bkmetabase bkmetabase 187 May 27 12:12 metabase.db.trace.db
-rw-rw-r-- 1 bkmetabase bkmetabase 114839203 May 20 13:10 metabase.jar
drwxrwxr-x 2 bkmetabase bkmetabase 4096 May 27 12:05 plugins
[bkmetabase#BK01 MetaBase]$ cd plugins/
[bkmetabase#BK01 MetaBase]$ ll
total 3320
-rw-rw-r-- 1 bkmetabase bkmetabase 3397734 May 5 17:13 ojdbc7.jar
Currently to run as process i am running like below
~/jdk1.8.0_171/bin/java -jar metabase.jar &> logger_metabase.log &
How can we run it as background service with oracle as database?

Related

Retiring the once only volume, holding important looking files

/volume1 was once my only volume, and it's has been joined by /volume2 in preparation for retiring /volume1.
Having relocated all my content I can see lots of files I cannot explain. Unusually they are all prefixed with #, e.g.
/volume1$ ls -als
total 430144
0 drwxr-xr-x 1 root root 344 May 2 16:19 .
4 drwxr-xr-x 24 root root 4096 May 2 16:18 ..
0 drwxr-xr-x 1 root root 156 Jun 29 15:57 #appstore
0 drwx------ 1 root root 0 Apr 11 04:03 #autoupdate
0 drwxr-xr-x 1 root root 14 May 2 16:19 #clamav
332 -rw------- 1 root root 339245 Jan 23 13:50 #cnid_dbd.core.gz
0 drwxr-xr-x 1 admin users 76 Aug 19 2020 #database
0 drwx--x--x 1 root root 174 Jun 29 15:57 #docker
0 drwxrwxrwx+ 1 root root 24 Jan 23 15:27 #eaDir
420400 -rw------- 1 root root 430485906 Jan 4 05:06 #G1.core.gz
0 drwxrwxrwx 1 root root 12 Jan 21 13:47 #img_bkp_cache
0 drwxr-xr-x 1 root root 14 Dec 29 18:45 #maillog
0 drwxr-xr-x 1 root root 60 Dec 29 18:39 #MailScanner
0 drwxrwxr-x 1 root root 106 Oct 7 2018 #optware
7336 -rw------- 1 root root 7510134 Jan 24 01:33 #Plex.core.gz
0 drwxr-xr-x 1 postfix root 166 Oct 12 2020 #postfix
2072 -rw------- 1 root root 2118881 Jan 17 03:47 #rsync.core.gz
0 drwxr-xr-x 1 root root 88 May 2 16:19 #S2S
0 drwxr-xr-x 1 root root 0 Jan 23 13:50 #sharesnap
0 drwxrwxrwt 1 root root 48 Jun 29 15:57 #tmp
I have two questions
what does the # prefix signify, and
how can I move/remove them, given that something's going to miss these files.
From experimentation it seems the answers are:
Nothing - they're a convention used by the Synology packaging system, it appears.
With one exception I didn't need to consider the consequences of removing the file system on which these stood. The #appstore directory clearly holds the installed Synology packages, and after pulling /volume1 they showed in the Package Center as "needing repair". Once they were repaired, the same # prefixed directories appeared in the new volume - and the configuration was retained - so it appears these directories hold only the immutable software components.
The exception: I use ipkg mostly for fetchmail. I took a listing of the installed packages as well as the fetchmailrc, and then reinstalled the same packages once "Easy Bootstrap Installer" was ready for use (repair didn't work on this, but uninstall and reinstall worked fine).

Can you delete evt files in DB2DETAILDEADLOCK?

In my IBM DB2 server (it is linux server) I have a problem that db2/db2_1 is 100% used. In this directory I see that in path "/db2/db2_1/db2inst1/NODE0000/SQL00001/db2event/db2detaildeadlock" are a lot of XXXX.evt files that takes some amount of disk space.
linuxprod:/db2/db2_1/db2inst1/NODE0000/SQL00001/db2event/db2detaildeadlock> ll
-rw-r--r-- 1 db2inst1 db2iadm1 2096934 2010-01-11 07:17 00000000.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2089026 2011-12-12 07:12 00000001.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2091422 2012-02-06 06:43 00000002.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2088934 2012-06-04 07:06 00000003.evt
-rw-r--r-- 1 db2inst1 db2iadm1 1662969 2013-03-21 15:54 00000004.evt
-rw-r--r-- 1 db2inst1 db2iadm1 1950082 2014-06-26 13:28 00000005.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2069150 2015-02-19 13:24 00000006.evt
-rw-r--r-- 1 db2inst1 db2iadm1 203704 2015-04-14 16:30 00000007.evt
-rw-r--r-- 1 db2inst1 db2iadm1 131061876 2015-04-14 16:30 00000008.evt
-rw-r--r-- 1 db2inst1 db2iadm1 873559 2015-04-20 15:29 00000009.evt
-rw-r--r-- 1 db2inst1 db2iadm1 129650884 2015-04-20 15:29 00000010.evt
-rw-r--r-- 1 db2inst1 db2iadm1 371426 2015-07-07 15:10 00000011.evt
-rw-r--r-- 1 db2inst1 db2iadm1 154020299 2015-07-07 15:10 00000012.evt
-rw-r--r-- 1 db2inst1 db2iadm1 385652 2015-09-01 18:03 00000013.evt
-rw-r--r-- 1 db2inst1 db2iadm1 150405814 2015-09-01 18:03 00000014.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2011825 2017-03-01 08:11 00000015.evt
-rw-r--r-- 1 db2inst1 db2iadm1 129911624 2017-03-01 08:11 00000016.evt
-rw-r--r-- 1 db2inst1 db2iadm1 1969859 2018-06-27 15:00 00000017.evt
-rw-r--r-- 1 db2inst1 db2iadm1 2083040 2019-07-04 09:04 00000018.evt
-rw-r--r-- 1 db2inst1 db2iadm1 765463 2019-09-16 16:54 00000019.evt
-rw-r----- 1 db2inst1 db2iadm1 43 2019-07-04 09:04 db2event.ctl
Is it ok to delete this .evt files (or move them to some other disk)? What happens if I delete them?
Yes you can erase these .evt files, but the consequence is that you (or any DBA) will not then be able to investigate those deadlock / timeout events (unless they are reproducible).
You can also move them to another location for later inspection via the relevant tooling, this is possibly the safest option for a production system.
It's likely that these files are not the main user of the space in that file system, so be sure to eliminate (or control) the main space consumers first.
Perhaps you should consider investigating and resolving the events that are leading to the deadlocks/timeouts?
The relevant event-monitor that creates these files can also be disabled, and the size and number of the files can be controlled via configuration. Refer to the Db2 Knowledge centre for details of this configuration activity.
Yes, it is safe to delete older event files. Since you don't seem to be using this event monitor anyway, you might as well disable it:
set event monitor DB2DETAILDEADLOCK state 0
The deadlock event monitor is deprecated since Db2 9.7, so you probably should consider dropping it altogether and creating a new event monitor for locks, which collects more useful information.

What directories does Linux have that macOS doesn't?

I'm a Python programmer that is trying to make a system of sorts that creates save data for a game I'm making, and I want it to be in different places in something like Ubuntu than I do macOS. As I don't have a macOS, and it's impossible to just up and get an ISO to get a macOS VM, I can't look through the files and folders and see what it has (or doesn't) that Linux does or doesn't.
I've tried looking all over to the point of attempting to get a hold of an ISO to build a VM in VirtualBox, but haven't been successful at all.
What files or folders does macOS have that Linux does, or vice versa?
To complete the (excellent) answer from #Michael, here is the listing of the home and root directory after a fresh install on the latest stable release of MacOS System (10.14.2)
MacBook-Pro:~ max$ ls -al /
total 37
drwxr-xr-x 26 root wheel 832 Jan 6 19:00 .
drwxr-xr-x 26 root wheel 832 Jan 6 19:00 ..
-rw-rw-r-- 1 root admin 8196 Jan 13 07:11 .DS_Store
drwx------ 5 root admin 160 Jan 6 11:47 .Spotlight-V100
d-wx-wx-wt 2 root wheel 64 Jan 14 06:39 .Trashes
---------- 1 root admin 0 Aug 18 06:53 .file
drwx------ 11 root admin 352 Jan 14 06:39 .fseventsd
drwxr-xr-x 2 root wheel 64 Aug 18 06:53 .vol
drwxrwxr-x+ 39 root admin 1248 Nov 30 12:49 Applications
drwxr-xr-x+ 60 root wheel 1920 Nov 30 12:50 Library
drwxr-xr-x 2 root wheel 64 Aug 18 06:53 Network
drwxr-xr-x# 5 root wheel 160 Nov 30 12:46 System
drwxr-xr-x 5 root admin 160 Jan 6 18:59 Users
drwxr-xr-x+ 4 root wheel 128 Jan 14 06:39 Volumes
drwxr-xr-x# 37 root wheel 1184 Nov 30 12:55 bin
drwxrwxr-t 2 root admin 64 Aug 18 06:53 cores
dr-xr-xr-x 3 root wheel 4301 Jan 14 06:39 dev
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 Jan 14 06:40 home
-rw-r--r-- 1 root wheel 313 Aug 18 10:03 installer.failurerequests
dr-xr-xr-x 2 root wheel 1 Jan 14 06:40 net
drwxr-xr-x 6 root wheel 192 Nov 30 12:50 private
drwxr-xr-x# 64 root wheel 2048 Jan 6 18:49 sbin
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 tmp -> private/tmp
drwxr-xr-x# 9 root wheel 288 Nov 30 12:38 usr
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 var -> private/var
And the home dir:
MacBook-Pro:~ max$ ls -al ~
total 16
drwxr-xr-x+ 15 max staff 480 Jan 14 06:43 .
drwxr-xr-x 5 root admin 160 Jan 6 18:59 ..
-r-------- 1 max staff 7 Jan 6 18:59 .CFUserTextEncoding
drwx------ 2 max staff 64 Jan 14 06:40 .Trash
-rw------- 1 max staff 0 Jan 13 07:11 .bash_history
drwx------ 10 max staff 320 Jan 14 06:40 .bash_sessions
-rw------- 1 max staff 908 Jan 14 06:43 .viminfo
drwx------+ 3 max staff 96 Jan 6 18:59 Desktop
drwx------+ 3 max staff 96 Jan 6 18:59 Documents
drwx------+ 3 max staff 96 Jan 6 18:59 Downloads
drwx------# 51 max staff 1632 Jan 13 07:11 Library
drwx------+ 3 max staff 96 Jan 6 18:59 Movies
drwx------+ 3 max staff 96 Jan 6 18:59 Music
drwx------+ 3 max staff 96 Jan 6 18:59 Pictures
drwxr-xr-x+ 4 max staff 128 Jan 6 18:59 Public
Application settings on macOS are ususally saved somewhere in ~/Library: Common places are ~/Library/Preferences/com.example.mycoolgame.plist for preferences (should be in plist format and "com.example.mycoolgame" should be a valid bundle ID that you own (you should own the domain)). The advantage/disadvantage of this path is that power users know about this directory and can edit the files there as they wish.
Then you have ~/Library/Caches for cached data. All cached data should be put somewhere under this directory. (Never use it for content that cannot be regenerated or redownloaded though.)
~/Library/ApplicationSupport/YourApplicationName/...: here you can basically do anything you like. It would be good if "YourApplicationName" would be globally unique in this case.. So better make it long. Users usually don't see the filesystem contents of anything below "~/Library", so there is no need for short names.
Of course, you can also put your savegames in ~/Documents/MyCoolGame/savegames and tell the user that you save the games there.
A gotcha (maybe): I'm not sure if system APIs expand "~" properly. I think probably not: Calling fopen with a path that starts with "~" would most likely not do the right thing. The users directory is located at something like "/Users/max", so "~" expands to "/Users/max" in the command line if the username is "max".
I can't answer your original question "What directories does Linux have that macOS doesn't?" because I don't have a Linux box at hand at the moment, and I don't think that it would be helpful for your use case.
For global data, there is also the "/Library" hierarchy.. But normal users don't have access to this place, so your game would need to ask for admin rights, which will make everything much more complicated, and this will feel user-unfriendly to macOS users. The macOS way is to have a self-contained application bundle and put all user-specific or temporary data into the appropriate place within the users home folder.

Reset/Remove .bash file versions

New to this and I believe I made duplicates or versions of the .bash_profile. I'd like to know how to make one the priority or delete those that are not active. I think its interfering with my SQL communication.
-rw------- 1 noahjones staff 2342 Sep 3 18:33 .bash_history
-rw-r--r-- 1 noahjones staff 157 Sep 3 18:31 .bash_profile
-rw------- 1 noahjones staff 201 Sep 3 18:29 .bash_profile.save
-rw-r--r-- 1 noahjones staff 74 Sep 3 16:33 .bash_profile_
drwx------ 48 noahjones staff 1536 Sep 3 18:34 .bash_sessions
-rw-r--r-- 1 noahjones staff 118 Sep 3 15:38 .bashrc
drwxr-xr-x 3 noahjones staff 96 Sep 3 16:01 .bundle
drwxr-xr-x 4 noahjones staff 128 Sep 3 15:40 .gem
-rw-r--r-- 1 noahjones staff 74 Sep 3 18:33 _bash.profile
Only the .bashrc and /.bash_profile are relevant. The file .bash_history is created automatically to store the history of your commands; the .bash_profile.save, .bash_profile_ and _bash.profile must be your backup files -- they are virtually ignored. The .bundle and .gem are not related to bash.
You probably have .bashrc and/or .bash_profile misconfigured. The difference between .bash_profile and .bashrc is that the former is only executed once, when you log in, while the latter is run every time you open a new /bin/bash shell. Depending on what you need to do with SQL you may want to delete one or the other.

Installing Torch7. iPython installation error (mac)

I'm trying to install Torch7 on my mac, however the installation halts at this point:
Not updating your shell profile.
You might want to
add the following lines to your shell profile:
export PATH=/Users/khsiddiqui/torch/install/bin:$PATH
export LD_LIBRARY_PATH=/Users/khsiddiqui/torch/install/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/Users/khsiddiqui/torch/install/lib:$DYLD_LIBRARY_PATH
Not sure what it means. Further above I received the following output
echo "Error: could not find ipython in PATH. Do you have it installed?"
fi
However iPython is installed as I can confirm:
No update necessary, 'ipython' is up-to-date.
ipython-3.0.0-3.egg was installed on: Thu Apr 9 18:12:32 2015
kamransiquisMBP:torch khsiddiqui$ env | grep PATH
PATH=/Users/khsiddiqui/Library/Enthought/Canopy_64bit/User/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/opt/X11/bin:
/usr/texbin
Attempting to locate the .bashrc file
%edit .bashrc
WARNING: Argument given (.bashrc) can't be found as a variable or as a filename.
kamransiquisMBP:torch khsiddiqui$ ls -ld ~/.*
drwxr-xr-x+ 43 khsiddiqui staff 1462 12 Apr 01:15 /Users/khsiddiqui/.
drwxr-xr-x 6 root admin 204 19 Oct 17:34 /Users/khsiddiqui/..
-r-------- 1 khsiddiqui staff 7 19 Oct 17:34 /Users/khsiddiqui/.CFUserTextEncoding
-rw-r--r--# 1 khsiddiqui staff 16388 26 Mar 23:59 /Users/khsiddiqui/.DS_Store
drwxr-xr-x 3 khsiddiqui staff 102 8 Sep 2014 /Users/khsiddiqui/.R
-rw-r--r-- 1 khsiddiqui staff 728832 2 Apr 17:21 /Users/khsiddiqui/.RData
-rw-r--r-- 1 khsiddiqui staff 1101 20 Oct 02:58 /Users/khsiddiqui/.Rapp.history
-rw-r--r-- 1 khsiddiqui staff 6314 2 Apr 17:21 /Users/khsiddiqui/.Rhistory
drwx------ 22 khsiddiqui staff 748 12 Apr 01:25 /Users/khsiddiqui/.Trash
-rw------- 1 khsiddiqui staff 1860 9 Apr 22:15 /Users/khsiddiqui/.bash_history
drwxr-xr-x 4 khsiddiqui staff 136 9 Apr 17:57 /Users/khsiddiqui/.cache
drwx------ 18 khsiddiqui staff 612 12 Apr 20:09 /Users/khsiddiqui/.canopy
drwxr-xr-x 3 khsiddiqui staff 102 12 Apr 01:15 /Users/khsiddiqui/.conda
drwxr-xr-x 2 khsiddiqui staff 68 12 Apr 01:11 /Users/khsiddiqui/.continuum
drwx------ 3 khsiddiqui staff 102 30 Jul 2010 /Users/khsiddiqui/.cups
drwx------ 10 khsiddiqui staff 340 2 Apr 17:26 /Users/khsiddiqui/.dropbox
-rw-r--r-- 1 khsiddiqui staff 2525 12 Apr 16:56 /Users/khsiddiqui/.enstaller4rc
drwxr-xr-x 9 khsiddiqui staff 306 9 Apr 22:25 /Users/khsiddiqui/.ipython
drwxr-xr-x 4 khsiddiqui staff 136 12 Apr 16:57 /Users/khsiddiqui/.matplotlib
-rw-r--r-- 1 khsiddiqui staff 340 12 Apr 01:12 /Users/khsiddiqui/.profile
-rw-r--r-- 1 khsiddiqui staff 251 28 Mar 13:45 /Users/khsiddiqui/.profile-anaconda.bak
drwxr-xr-x 15 khsiddiqui staff 510 2 Apr 17:21 /Users/khsiddiqui/.rstudio-desktop
drwxr-xr-x 6 khsiddiqui staff 204 20 Oct 19:21 /Users/khsiddiqui/.subversion
-rw------- 1 khsiddiqui staff 625 9 Apr 21:33 /Users/khsiddiqui/.viminfo
i had a similar problem and solved it, maybe it could help others.
Here was the end of the second installation script, and the command "th" wasn't working:
Not updating your shell profile.
You might want to
add the following lines to your shell profile:
. /Users/myusername/torch/install/bin/torch-activate
This article explains how your shell profile is organized: https://serverfault.com/questions/110065/what-profile-is-my-current-shell-using
I realized in my user folder /Users/myusername/ i had a ".bash_profile" file, i pasted the line ". /Users/myusername/torch/install/bin/torch-activate" inside but didn't work (command "th" no recognized in terminal).
So in the same /Users/myusername/ folder i created a ".profile" file and pasted the line ". /Users/myusername/torch/install/bin/torch-activate" inside.
Then the command "th" works fine ;)
First, IPython may be installed but not seen by the install process.
If you enter which ipython at a shell prompt it will tell you where it is installed. Then echo $PATH will display your PATH variable which should contain the directory that contains IPython. If it isn't then you will have to edit the PATH statement in your .bashrc file to add it.
Second, .bashrc is a file that is run by the shell when it starts up and should be in your home directory so enter cd at a shell prompt and you will be there. Then use a text editor such as Text Edit to edit it. In your case you don't have a .bashrc file, instead some things are being set in a file called .profile. You should probably check the contents of that.
Finally, I wouldn't run any of these commands from within IPython. Only run them (and the Torch install process) from the shell.
Further, I notice you have a file with the name "anaconda" in it. Have you installed 'Anaconda'?

Resources