Cannot create odoo-8(openerp) service in ubuntu 16.04 - service

I want to create an odoo instance version 8 in ubuntu 16.
Config and service files are created, i am adding permission of files below.
drwxr-xr-x 6 root root 4096 May 24 18:40 .
drwxr-xr-x 3 sic sic 4096 May 24 17:40 ..
drwxr-xr-x 8 sic sic 4096 Apr 11 08:54 odoo
-rw-r--r-- 1 root root 319123456 May 24 18:38 odoo_sic.tar
drwxrwxrwx 23 sic sic 4096 May 24 17:40 orchid_addons
drwxrwxrwx 9 sic sic 4096 May 24 17:40 orchid_excel_reports
Config file:
- -rw-r----- 1 sic sic 311 May 25 10:12 001-sic-live-server.conf
Init file:
- -rwxr-xr-x 1 sic sic 2219 May 25 10:16 001-sic-live-server
when i try to start the service log file is not created, also no service started message

Follow My steps:
1 Create conf file
sudo nano /etc/odoo8.conf
2 Create conf file data
[options]
admin_passwd = your_strong_admin_password
db_host = False
db_port = False
db_user = odoo8
db_password = False
addons_path = /opt/odoo8/addons
logfile = /var/log/odoo8.log
xmlrpc_port = 8010
3 Create service
sudo nano /lib/systemd/system/odoo8.service
4
[Unit]
Description=Odoo 8
Requires=postgresql.service
After=postgresql.service
[Service]
Type=simple
PermissionsStartOnly=true
User=odoo8
Group=odoo8
SyslogIdentifier=odoo8
ExecStart=/opt/odoo8/venv/bin/python2 /opt/odoo8/odoo-bin -c /etc/odoo8.conf
[Install]
WantedBy=multi-user.target
Then enable service.
sudo systemctl enable odoo8.service

Related

CentOs 7, "Tesseract couldn't load any languages!" however: "List of available languages (2): eng, spa"

this is CentOs 7
when I run tesseract --list-langs
[root#cia tessdata]# tesseract --list-langs
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (2):
eng
spa
[root#cia tessdata]#
however when I run
[root#cia tessdata]# ls -l /usr/local/share/tessdata/
total 328
drwxr-xr-x. 2 root root 4096 Nov 17 23:28 configs
-rw-r--r--. 1 root root 164228 Nov 18 06:11 eng.traineddata
-rw-r--r--. 1 root root 572 Nov 17 23:28 pdf.ttf
-rw-r--r--. 1 root root 157745 Nov 18 06:11 spa.traineddata
drwxr-xr-x. 2 root root 98 Nov 17 23:28 tessconfigs
[root#cia tessdata]#
I get eng.traineddata and spa.traineddata in this form:
cd /usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/blob/main/spa.traineddata
:::::::::::::::::::::::::::::::::::::::::::
allways I install languages with:
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/master/spa.traineddata
then allways tesseract work fine, but now this return 404
how I can fix?

Command 'scala' not found on Ubuntu 18.04

I downloaded scala,unpacked it and copied to /usr/local/share
After that,I edited ~/.bashrc
export SCALA_HOME=/usr/local/share/scala-2.12.8
export PATH=$PATH:$SCALA_HOME/bin
Anyway,it does not work.
scala -version
Command 'scala' not found, but can be installed with:
sudo apt install scala
I could go for apt install but I don't get it what is wrong.
/usr/local/share$ ll
total 48
drwxr-xr-x 12 root root 4096 јул 1 06:03 ./
drwxr-xr-x 14 root root 4096 јун 23 18:04 ../
drwxr-xr-x 2 root root 4096 апр 21 08:04 appdata/
drwxr-xr-x 2 root root 4096 јун 25 21:03 applications/
drwxr-xr-x 2 root root 4096 јул 25 2018 ca-certificates/
drwxrwsr-x 3 root staff 4096 јул 25 2018 emacs/
drwxrwsr-x 2 root staff 4096 јул 25 2018 fonts/
drwxr-xr-x 3 root root 4096 апр 19 08:44 lua/
drwxr-xr-x 2 root root 4096 јул 25 2018 man/
drwxrwxr-x 6 miki miki 4096 дец 4 2018 scala-2.12.8/
drwxrwsr-x 7 root staff 4096 мај 14 15:05 sgml/
drwxrwsr-x 6 root staff 4096 мај 14 15:05 xml/
Editing .bashrc won't affect an already open shell. You could explicitly source it (source ~/.bashrc) to have it take effect, or open a new shell to reload it.

Using find vs. locate vs. whereis

I am doing Chapter 1 exercises from Linux Basics for Hackers (Starch Press):
Create a new directory called hackerdirectory and create a new file in
that directory named hackedfile. Now copy that file to your /root
directory and then rename it secretfile.
So I did mkdir hackerdirectory then cd hackerdirectory then touch hackedfile then sudo mv hackedfile /root
My understanding is that /root is the top home directory but when I cd .. back to home and ls -l, it's not there:
drwxrwxr-x 23 nobu nobu 4096 Jul 9 18:24 anaconda3
-rw-r--r-- 1 nobu nobu 4243 May 3 02:10 backblue.gif
-rw-rw-r-- 1 nobu nobu 25120 Mar 23 07:02 CERTIFICATE
drwxrwxr-x 3 nobu nobu 4096 Mar 30 05:01 client-configs
-rw-rw-r-- 1 nobu nobu 412 May 3 03:18 cookies.txt
-rw------- 1 root root 8560640 Apr 11 09:59 core
drwxr-xr-x 3 nobu nobu 4096 Sep 11 20:34 ctf
drwxr-xr-x 18 nobu nobu 4096 Sep 13 12:33 Desktop
drwxr-xr-x 4 nobu nobu 4096 Sep 8 18:59 Diamondhead
drwxrwxr-x 6 nobu nobu 4096 Sep 15 16:42 Documents
drwxr-xr-x 27 nobu nobu 12288 Sep 17 14:28 Downloads
-rw-r--r-- 1 nobu nobu 8980 Mar 20 06:44 examples.desktop
-rw-r--r-- 1 nobu nobu 828 May 3 02:10 fade.gif
drwxrwxr-x 4 nobu nobu 4096 Jun 27 02:38 fullstack
drwxrwxr-x 11 nobu nobu 4096 Jul 12 16:21 gym
drwxr-xr-x 2 nobu nobu 4096 Sep 17 15:37 hackerdirectory
drwx------ 2 nobu nobu 4096 May 3 03:18 hts-cache
-rw-rw-r-- 1 nobu nobu 2101 May 3 03:18 hts-log.txt
drwxr-xr-x 6 nobu nobu 4096 Sep 4 23:27 locust_k8s
drwxr-xr-x 10 nobu nobu 4096 Aug 28 11:44 mecab-ipadic-neologd
drwxr-xr-x 2 nobu nobu 4096 Mar 20 06:52 Music
drwxr-xr-x 14 nobu nobu 4096 Aug 24 14:10 myapp
drwx------ 3 nobu nobu 4096 Mar 30 03:28 openvpn-ca
drwxr-xr-x 4 nobu nobu 4096 Aug 19 19:47 Pictures
drwxr-xr-x 2 nobu nobu 4096 Mar 20 06:52 Public
drwxr-xr-x 3 nobu nobu 4096 Aug 15 12:34 repos
drwxr-xr-x 6 nobu nobu 4096 Sep 4 23:23 snap
drwxr-xr-x 2 nobu nobu 4096 Mar 20 06:52 Templates
-rw-rw-r-- 1 nobu nobu 5477405 Jul 5 08:17 tf
-rwxrwxr-x 1 nobu nobu 4474932 Oct 24 2017 unetbootin-linux-latest
drwxr-xr-x 3 nobu nobu 4096 Apr 27 11:56 Videos
drwx------ 3 nobu nobu 4096 Jun 27 02:46 'VirtualBox VMs'
drwxrwxr-x 5 nobu nobu 4096 May 3 02:36 websites
drwxrwxr-x 2 nobu nobu 4096 Jul 9 21:15 work
Now I did:
nobu#nobu-ThinkPad-T420:~$ locate hackedfile
nobu#nobu-ThinkPad-T420:~$ whereis hackedfile
hackedfile:
What does this mean? I've tried sudo su then ls but still can't see it.
Edit: So I found it per the commands below but can't get rid of it.
nobu#nobu-ThinkPad-T420:~$ sudo find /root -type f -name hackedfile
/root/hackedfile
nobu#nobu-ThinkPad-T420:~$ sudo rm /root/hackedfile
nobu#nobu-ThinkPad-T420:~$ sudo find /root -type f -name hackedfile
nobu#nobu-ThinkPad-T420:~$ whereis hackedfile
hackedfile:
Edit (not listed)
nobu#nobu-ThinkPad-T420:~$ sudo ls -al /root
total 64
drwx------ 12 root root 4096 Sep 17 16:23 .
drwxr-xr-x 28 root root 4096 Sep 9 12:45 ..
drwx------ 2 root root 4096 Jul 10 07:31 .aptitude
-rw------- 1 root root 1124 Sep 17 16:30 .bash_history
-rw-r--r-- 1 root root 3106 Oct 23 2015 .bashrc
drwx------ 4 root root 4096 Apr 11 05:47 .cache
drwx------ 7 root root 4096 Apr 11 15:54 .config
drwx------ 3 root root 4096 Mar 22 02:47 .dbus
drwx------ 3 root root 4096 Apr 11 12:23 .gnupg
drwxr-xr-x 4 root root 4096 Aug 17 09:20 .java
drwxr-xr-x 3 root root 4096 Apr 1 08:12 .local
drwxr-xr-x 2 root root 4096 Mar 30 02:55 .nano
drwxr-xr-x 2 root root 4096 Aug 21 11:13 .oracle_jre_usage
-rw-r--r-- 1 root root 148 Aug 18 2015 .profile
drwx------ 2 root root 4096 Sep 4 22:58 .ssh
-rw-r--r-- 1 root root 220 Aug 8 14:02 .wget-hsts
Edit (when sudo su)
root#nobu-ThinkPad-T420:/home/nobu# whereis hackedfile
hackedfile:
So when I do command whereis, it shows the file. So is it really deleted?
But now when I try: sudo find /root -type f -name hackedfile I get:
nobu#nobu-ThinkPad-T420:~$ sudo find /root -type f -name hackedfile
nobu#nobu-ThinkPad-T420:~$
And thus it seems to be gone except doing `whereis' still shows it with the colon.
Edit:
Beware that whereis returns whatever you were looking for say filename: and then lists the PATH of location after colon.
So here is how to use find:
find
That's from my textbook listed above.
Try pwd to see where you are in the file system. You will probably find the file using sudo ls -al /root

why terminal output can't be saved to file when there's core dumped

I'm running an executable and trying to save terminal output to a file:
# ll
total 132
-rw-r--r--. 1 root root 496 Jun 14 11:41 mpx-debug.h
-rw-r--r--. 1 root root 12775 Jun 14 11:41 mpx-dig.c
-rw-r--r--. 1 root root 3526 Jun 14 11:41 mpx-hw.h
-rwxr-xr-x. 1 root root 65176 Jun 14 14:28 mpx-mini-test
-rw-r--r--. 1 root root 40480 Jun 14 11:41 mpx-mini-test.c
-rw-r--r--. 1 root root 205 Jun 14 11:41 mpx-mm.h
# ./mpx-mini-test
XSAVE is supported by HW & OS
XSAVE processor supported state mask: 0x1f
XSAVE OS supported state mask: 0x1f
BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
no MPX support
Aborted (core dumped)
#
# ./mpx-mini-test | tee -a mpx-mini-test.log
#
# cat mpx-mini-test.log
#
As you can see, there're some prints in terminal without "| tee -a **.log".
But with "| tee -a **.log", nothing is saved to file.
I suspect it has something to do with the "Abort (core dumped)", did some googling but can't figure out exactly why. Is there anyone knows why? And how could I save all terminal outputs(including the "Abort (core dumped)") to file? Thanks in advance.

custom yum repo not showing rpm

I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.