Installation Of odoo 12 On Ubuntu 18.10
Odoo is an all-in-one business software including CRM, website/e-commerce, billing, accounting, manufacturing, warehouse - and project management, and inventory and many more. This tutorial covers the installation of Odoo 12 on Ubuntu 18.10
Requirements for odoo
Python and its modules
PostgreSQL
Installation procedure
Check the Ubuntu by using the following command
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
Install the necessary Python libraries and the tools required to build Odoo dependencies
root@linuxhelp:~# apt install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less vim gdebi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
The following additional packages will be installed:
cpp cpp-8 dh-python dpkg-dev fakeroot g++ g++-8 gcc gcc-8 gcc-8-base gdebi-core gir1.2-harfbuzz-0.0
git-man gnome-icon-theme icu-devtools libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libasan5 libatomic1 libc-ares2 libc-dev-bin libc6-dev libcc1-0 liberror-perl
libexpat1 libexpat1-dev libfakeroot libgail-common libgail18 libgcc-8-dev libgcc1 libglib2.0-0
libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin libgomp1 libgraphite2-dev libgtk2-perl libgtk2.0-0
libgtk2.0-bin libgtk2.0-common libharfbuzz-dev libharfbuzz-gobject0 libhttp-parser2.8 libicu-dev
libicu-le-hb-dev libicu-le-hb0 libiculx60 libitm1 libldap-2.4-2 liblsan0 libmpx2 libpango-perl
.
.
.
Setting up python3-setuptools (40.2.0-1) ...
Setting up python3.6-dev (3.6.8-1~18.10) ...
Setting up dh-python (3.20180723) ...
Setting up libpython3-dev:amd64 (3.6.7-1~18.10) ...
Setting up python3-dev (3.6.7-1~18.10) ...
Setting up gcc (4:8.3.0-1ubuntu1.2) ...
Setting up g++ (4:8.3.0-1ubuntu1.2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.5ubuntu2) ...
Setting up libharfbuzz-dev:amd64 (1.8.8-2) ...
Setting up libicu-le-hb-dev:amd64 (1.0.3+git161113-5) ...
Setting up libicu-dev (60.2-6ubuntu1) ...
Setting up libxml2-dev:amd64 (2.9.4+dfsg1-7ubuntu1) ...
Setting up libxslt1-dev:amd64 (1.1.32-2ubuntu0.1) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...
Download the wkhtmltopdf package
root@linuxhelp:~# wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
--2019-08-06 00:40:05-- https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
Resolving builds.wkhtmltopdf.org (builds.wkhtmltopdf.org)... 107.174.217.167
Connecting to builds.wkhtmltopdf.org (builds.wkhtmltopdf.org)|107.174.217.167|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15839768 (15M) [application/octet-stream]
Saving to: ‘wkhtmltox_0.12.1.3-1~bionic_amd64.deb’
wkhtmltox_0.12.1.3-1~bioni 100%[=====================================>] 15.11M 74.1KB/s in 97s
2019-08-06 00:41:43 (160 KB/s) - ‘wkhtmltox_0.12.1.3-1~bionic_amd64.deb’ saved [15839768/15839768]
Install the wkhtmltopdf package by using the following command
root@linuxhelp:~# gdebi wkhtmltox_0.12.1.3-1~bionic_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
Requires the installation of the following packages: xfonts-75dpi
convert HTML to PDF and various image formats using QtWebkit
Do you want to install the software package? [y/N]:y
Get:1 http://in.archive.ubuntu.com/ubuntu cosmic/universe amd64 xfonts-75dpi all 1:1.0.4+nmu1 [3368 kB]
Fetched 3368 kB in 0s (0 B/s)
Selecting previously unselected package xfonts-75dpi.
(Reading database ... 150059 files and directories currently installed.)
Preparing to unpack .../xfonts-75dpi_1%3a1.0.4+nmu1_all.deb ...
Unpacking xfonts-75dpi (1:1.0.4+nmu1) ...
Setting up xfonts-75dpi (1:1.0.4+nmu1) ...
Processing triggers for fontconfig (2.13.0-5ubuntu3) ...
Selecting previously unselected package wkhtmltox.
(Reading database ... 150431 files and directories currently installed.)
Preparing to unpack wkhtmltox_0.12.1.3-1~bionic_amd64.deb ...
Unpacking wkhtmltox (1:0.12.1.3-1~bionic) ...
Setting up wkhtmltox (1:0.12.1.3-1~bionic) ...
Processing triggers for man-db (2.8.4-2) ...
Create the Odoo user & group by using the following command
root@linuxhelp:~# adduser --system --home=/opt/odoo --group odoo
Adding system user `odoo' (UID 125) ...
Adding new group `odoo' (GID 130) ...
Adding new user `odoo' (UID 125) with group `odoo' ...
Creating home directory `/opt/odoo' ...
Install the postgresql by using the following command
root@linuxhelp:~# apt install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpq5 postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common sysstat
Suggested packages:
postgresql-doc locales-all postgresql-doc-10 libjson-perl isag
The following NEW packages will be installed:
libpq5 postgresql postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common
sysstat
0 upgraded, 7 newly installed, 0 to remove and 407 not upgraded.
Need to get 5,450 kB of archives.
After this operation, 21.5 MB of additional disk space will be used.
.
.
Success. You can now start the database server using:
/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Setting up postgresql (10+193) ...
Processing triggers for systemd (239-7ubuntu10) ...
Start the postgresql service
root@linuxhelp:~# systemctl start postgresql
Enable the postgresql service
root@linuxhelp:~# systemctl enable postgresql
Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable postgresql
Switch to postgre user
root@linuxhelp:~# su – postgres
Create the user and database for odoo
postgres@linuxhelp1:~$ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo12
Enter password for new role:
Enter it again:
postgres@linuxhelp1:~$ logout
Switch to odoo user by using the following command
root@linuxhelp:~# su - odoo -s /bin/bash
Cloning the Odoo12 from the GitHub repository by using the following command
odoo@linuxhelp1:~$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 12.0 /opt/odoo/odoo
Cloning into '/opt/odoo/odoo'...
warning: redirecting to https://github.com/odoo/odoo.git/
remote: Enumerating objects: 24386, done.
remote: Counting objects: 100% (24386/24386), done.
remote: Compressing objects: 100% (19194/19194), done.
remote: Total 24386 (delta 7316), reused 14635 (delta 4375), pack-reused 0
Receiving objects: 100% (24386/24386), 101.27 MiB | 1.05 MiB/s, done.
Resolving deltas: 100% (7316/7316), done.
Checking out files: 100% (21876/21876), done.
odoo@linuxhelp1:~$ logout
Change to to odoo path:
root@linuxhelp:~# cd /opt/odoo/odoo
List out the files
root@linuxhelp:/opt/odoo/odoo# ls
addons COPYRIGHT doc MANIFEST.in odoo-bin requirements.txt setup setup.py
CONTRIBUTING.md debian LICENSE odoo README.md SECURITY.md setup.cfg
Install the python modules by using the pip3 command
root@linuxhelp:/opt/odoo/odoo# pip3 install -r requirements.txt
Ignoring gevent: markers 'sys_platform != "win32" and python_version >= "3.7"' don't match your environment
Ignoring greenlet: markers 'python_version >= "3.7"' don't match your environment
Ignoring lxml: markers 'sys_platform != "win32" and python_version >= "3.7"' don't match your environment
Ignoring lxml: markers 'sys_platform == "win32"' don't match your environment
Ignoring pypiwin32: markers 'sys_platform == "win32"' don't match your environment
Collecting Babel==2.3.4 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/b4/ec/acd307eac2e23f9cab1c8bdbe29b3b1d43215e31c32f8aa91b3a97925b5b/Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
100% |████████████████████████████████| 7.1MB 157kB/s
Requirement already satisfied: chardet==3.0.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2))
Collecting decorator==4.0.10 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/53/24/cc53f9f216dd5ef269e0af7c7651cbda162554a5b088621a205961c07a6f/decorator-4.0.10-py2.py3-none-any.whl
Collecting docutils==0.12 (from -r requirements.txt (line 4))
Successfully installed Babel-2.3.4 Jinja2-2.10.1 Mako-1.0.4 MarkupSafe-0.23 Pillow-4.0.0 PyPDF2-1.26.0 Werkzeug-0.11.15 XlsxWriter-0.9.3 beautifulsoup4-4.8.0 decorator-4.0.10 docutils-0.12 ebaysdk-2.1.5 feedparser-5.2.1 gevent-1.1.2 greenlet-0.4.10 html2text-2016.9.19 libsass-0.12.3 lxml-3.7.1 mock-2.0.0 num2words-0.5.6 ofxparse-0.16 passlib-1.6.5 pbr-5.4.2 psutil-4.3.1 psycopg2-2.7.3.1 pydot-1.2.3 pyldap-2.4.28 pyparsing-2.1.10 pyserial-3.1.1 python-dateutil-2.5.3 python-stdnum-1.11 pytz-2016.7 pyusb-1.0.0 qrcode-5.3 reportlab-3.3.0 requests-2.20.0 soupsieve-1.9.2 suds-jurko-0.6 vatnumber-1.2 vobject-0.9.3 xlrd-1.0.0 xlwt-1.3.0
Configure the odoo.conf
root@linuxhelp:/opt/odoo/odoo# vim odoo.conf
[options]
; This is the password that allows database operations:
;admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo12
db_password = Linuxc#4
addons_path = /opt/odoo/odoo/addons
Set the ownership and permission for odoo by using the following command
root@linuxhelp:/opt/odoo/odoo# chmod -R 755 odoo.conf
root@linuxhelp:/opt/odoo/odoo# chown -R odoo:odoo odoo.conf
Start the odoo server by using the following command
root@linuxhelp:/opt/odoo/odoo# ./odoo-bin --config=odoo.conf
Running as user 'root' is a security risk.
2019-08-05 19:42:55,488 34981 INFO ? odoo: Odoo version 12.0
2019-08-05 19:42:55,489 34981 INFO ? odoo: Using configuration file at /opt/odoo/odoo/odoo.conf
2019-08-05 19:42:55,489 34981 INFO ? odoo: addons paths: ['/root/.local/share/Odoo/addons/12.0', '/opt/odoo/odoo/addons', '/opt/odoo/odoo/odoo/addons']
2019-08-05 19:42:55,489 34981 INFO ? odoo: database: odoo12@localhost:5432
2019-08-05 19:42:55,845 34981 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2019-08-05 19:42:56,570 34981 INFO ? odoo.service.server: HTTP service (werkzeug) running on linuxhelp1:8069
Switch to browser and enter your domain name with port numberCreate your database credentialsThis is the dashboard of odoo12With this the installation odoo12 on Ubuntu 18.10 comes to end
Tidak ada komentar:
Posting Komentar