In today's fast-paced business environment, having a comprehensive and efficient business management system is crucial for success. Odoo 17, the latest version of the popular open-source ERP software, offers a wide range of features and enhancements to streamline your business operations. From improved performance to an enhanced user interface, Odoo 17 is designed to help you manage your business more effectively. In this guide, we will walk you through the step-by-step process of installing Odoo 17 on an Ubuntu 20.04 LTS server, enabling you to take full advantage of its capabilities and enhance your business workflow.
Step 1: Connect to the Ubuntu Server via SSH
To begin, connect to your Ubuntu server using SSH:
ssh username@IP_Address -p Port_number
Step 2: Update the Server
Ensure your system is up to date by running:
sudo apt-get update
sudo apt-get upgrade
Step 3: Secure the Server
Protect your server against SSH attacks by installing Fail2ban:
sudo apt-get install openssh-server fail2ban
Step 4: Install Packages and Libraries
Install the necessary Python packages for Odoo:
sudo apt-get install -y python3-pip python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev npm node-less
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
Step 5: Setup the Database Server
Odoo uses PostgreSQL as its database server. Install PostgreSQL:
sudo apt-get install postgresql
Create a database user for Odoo 17:
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo17
psql
ALTER USER odoo17 WITH SUPERUSER;
\q
exit
Step 6: Create a System User
Create a system user for Odoo:
sudo adduser --system --home=/opt/odoo17 --group odoo17
Step 7: Clone Odoo 17 Community from Git
Clone the Odoo source files to your server:
sudo apt-get install git
sudo su - odoo17 -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth 1 --branch 17.0 --single-branch .
exit
Step 8: Install Required Python Packages
Install the required Python packages for Odoo:
sudo pip3 install -r /opt/odoo/requirements.txt
Step 9: Install Wkhtmltopdf
Install Wkhtmltopdf to generate PDF reports:
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f
Step 10: Setup the Configuration File
Create an Odoo configuration file:
sudo cp /opt/odoo17/debian/odoo.conf /etc/odoo17.conf
sudo nano /etc/odoo17.conf
Update the configuration file with the following content:
[options]
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo17
db_password = False
addons_path = /opt/odoo17/addons
logfile = /var/log/odoo/odoo17.log
Step 11: Create an Odoo Service File
Create a service file for Odoo:
sudo nano /etc/systemd/system/odoo17.service
Add the following content to the service file:
[Unit]
Description=Odoo17
Documentation=http://www.odoo.com
[Service]
Type=simple
User=odoo17
ExecStart=/opt/odoo17/odoo-bin -c /etc/odoo17.conf
[Install]
WantedBy=default.target
Step 12: Start Odoo 17
Start the Odoo service and check its status:
sudo systemctl start odoo17.service
sudo systemctl status odoo17.service
You can now access Odoo 17 by navigating to "http://<your_domain_or_IP_address>:8069" in your web browser. If you encounter any issues, you can check the logs using:
sudo tail -f /var/log/odoo/odoo17.log
To automatically start Odoo 17 on server boot, run:
sudo systemctl enable odoo17.service
Congratulations! You have successfully installed Odoo 17 on your Ubuntu 20.04 LTS server. Start exploring Odoo's features and capabilities to enhance your business processes.