This post show you the way to install Odoo on Ubuntu UNIX/Linux operating system. Odoo (formerly OpenERP) is easy and intuitive suite of open supply, ERP and CRM platform for businesses and people who need to manage their e-Commerce, web site builder, billing, accounting, invoices, orders, merchandise and additional.
If you’re searching for AN open supply CRM or ERP Program to run your operations, Odoo ought to be thought of.
Odoo are often put in many various ways in which on Ubuntu UNIX operating system. the best and fastest thanks to install Odoo is by Using the official Odoo APT repositories. However, you lose management after you have Odoo install and assemble settings that you just might not apprehend wherever and the way they’re designed.
Below can show you the way to transfer, install and use Odoo on Ubuntu UNIX operating system.
To perform a custom Odoo installation, you need to install following packages Run the commands below to install supporting dependencies to install Odoo.
sudo apt update sudo apt install git python3-pip build-essential wget python3-
After putting inthe desired packages on top of, you’ll additionallyneedto make a system account for Odoo. Running Odoo with root privileges poses nice security risks.
To create system account to use with Odoo, merely run the command below to make a system account referred to as odoo .
The account home directory are going to be /opt/odoo
sudo useradd -m -d /opt/odoo -U -r -s /bin/bash odoo
Install PostgreSQL on Ubuntu
Odoo uses PostgreSQL info to store its content. to induce PostgreSQL put in, merely run the commands below.
sudo apt install postgresql
After putting in the database server, alter and begin it by running the commands below.
sudo systemctl enable --now postgresql.service
Next, produce a PostgreSQL info account for Odoo. Run the commands below to make a brand new info account referred to as odoodbuser.
sudo su - postgres -c "createuser -s odoodbuser"
Install Wkhtmltopdf on Ubuntu
In order to print PDF reports, you’ll want Wkhtmltopdf. This package contains sets of open supply tools render HTML into PDF and numerous image formats on UNIX systems, as well as Ubuntu UNIX.
To install the package, run the commands below.
cd /tmp wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb sudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb
Now that you just have put in all dependencies, install and created PostgreSQL info and account, continue below to transfer, install and tack together Odoo on Ubuntu UNIX.
The first thing you’ll need to try and do is switch to the Odoo system account we have a tendency to created on top of by running the commands below:
sudo su - odoo
At the time of this post, the newest version of Odoo is version fifteen. If there’s a more recent version of Odoo on the market, you must clone that instead. To clone Odoo version fifteen, run the commands below.
git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 /opt/odoo/odoo
When the download completes, be converted into Odoo’s directory and run the commands below to tack together and install all needs for Odoo.
cd /opt/odoo python3 -m venv odoo-venv source odoo-venv/bin/activate pip3 install wheel pip install python-ldap pip3 install -r odoo/requirements.txt deactivate
After that create a new directory for Odoo custom addons.
When you’re done, add Odoo admin password, database name and database account name to its configuration file.
Run the commands below to open Odoo’s configuration file.
sudo nano /etc/odoo.conf
Then copy and paste the lines below into the file, save and exit.
[options] ; This is the password that allows database operations: admin_passwd = type_new_password_here db_host = False db_port = False db_user = odoodbuser db_password = False addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo-custom-addons
Save your changes and exit
Create a Systemd unit file
At this point, all should be set. What you need to do now is to create a systemd unit file to control startup, restart and shutdown Odoo services.
sudo nano /etc/systemd/system/odoo.service
Then copy and pastes the lines below into the file, save and exit
[Unit] Description=Odoo Requires=postgresql.service After=network.target postgresql.service [Service] Type=simple SyslogIdentifier=odoo PermissionsStartOnly=true User=odoo Group=odoo ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target
When you’re done, reload systemd daemon and start up Odoo service.
sudo systemctl daemon-reload sudo systemctl enable --now odoo
To check Odoo status and verify it’s installed and running, run the commands below:
sudo systemctl status odoo
You should see similar messages as below:
● odoo.service - Odoo Loaded: loaded (/etc/systemd/system/odoo.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-10-26 23:28:23 CDT; 11s ago Main PID: 18386 (python3) Tasks: 2 (limit: 4651) Memory: 67.2M CGroup: /system.slice/odoo.service └─18386 /opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf Oct 26 23:28:25 ubuntu2004 odoo: return Cursor(self.__pool, self.dbname, self.dsn, serialized=seriali> Oct 26 23:28:25 ubuntu2004 odoo: File "/opt/odoo/odoo/odoo/sql_db.py", line 256, in __init__ Oct 26 23:28:25 ubuntu2004 odoo: self._cnx = pool.borrow(dsn) Oct 26 23:28:25 ubuntu2004 odoo: File "/opt/odoo/odoo/odoo/sql_db.py", line 588, in _locked Oct 26 23:28:25 ubuntu2004 odoo: return fun(self, *args, **kwargs) Oct 26 23:28:25 ubuntu2004 odoo: File "/opt/odoo/odoo/odoo/sql_db.py", line 654, in borrow Oct 26 23:28:25 ubuntu2004 odoo: result = psycopg2.connect(
That should do it if you follow and completed all the steps above..
Now Login to Odoo
Once you see a successful status above, you can then open your browser and browse to Odoo portal using the server hostname or IP address followed by port 8069.
You should then see Odoo setup page. Use the master password you created in /etc/odoo.conf file. then type a new database name odoodb and admin email address. Create database
Use the database user account and the admin password defined in the configuration file to complete the setup. Once all is entered correctly, you should be able to complete the setup and start using Odoo.
For those who run into issues where they’re getting Internal server error or getting error when opening Odoo setup wizard, they should configure PostgreSQL to trust all local connections.
Run the commands below to open PostgreSQL configuration file.
sudo nano /etc/postgresql/12/main/pg_hba.conf
Replace the version number with the version installed on your system.
Then change the highlighted line in the file and save.
# "local" is for Unix domain socket connections only local all all trust
Replace MD5 or Peer with trust. Save and exit, then restart PostgreSQL.
sudo service postgresql restart
If you want to use a reverse proxy with Odoo, click either link below to setup a reverse proxy with Nginx or Apache.