Odoo is a popular open-source business management software that offers a range of applications for various business needs, such as CRM, sales, project management, and accounting. Installing Odoo on Ubuntu 24.04 is a straightforward process, and in this article, we will guide you through the steps to do so.
Step 1: Update and Upgrade your Ubuntu System
Before installing Odoo 18, it is important to ensure that your Ubuntu system is up to date. Open a terminal window and run the following commands:
sudo apt update
sudo apt upgrade
Step 2: Install PostgreSQL Database Server
Odoo requires a PostgreSQL database server to store its data. Install PostgreSQL by running the following command:
sudo apt install postgresql
Once PostgreSQL is installed, you need to create a new user and database for Odoo. You can do this by running the following commands:
sudo su – postgres
createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt odoo
Step 3: Install Odoo Dependencies
Before installing Odoo, it is necessary to install some dependencies. Run the following command to install the required dependencies:
sudo apt install python3-pip python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev libssl-dev
Step 4: Install Wkhtmltopdf
Odoo requires Wkhtmltopdf to generate PDF reports. Install Wkhtmltopdf by running the following command:
sudo apt install wkhtmltopdf
Step 5: Install Odoo
Now it’s time to install Odoo 18. First, download the Odoo source code from the official GitHub repository:
sudo git clone https://www.github.com/odoo/odoo –depth 1 –branch 18.0 /opt/odoo
Next, install the Python dependencies for Odoo by running the following command:
sudo pip3 install -r /opt/odoo/requirements.txt
Step 6: Configure Odoo
Create a configuration file for Odoo by copying the default configuration file:
sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf
sudo chown odoo: /etc/odoo.conf
Edit the configuration file to set the appropriate settings for your installation:
sudo nano /etc/odoo.conf
Update the configuration file with the following settings:
[options]
admin_passwd = admin_password
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo.log
Step 7: Create a systemd Service File
To manage Odoo as a system service, create a systemd service file:
sudo nano /etc/systemd/system/odoo.service
Add the following content to the file:
[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-bin -c /etc/odoo.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
Step 8: Start and Enable Odoo
Start the Odoo service and enable it to start automatically on boot:
sudo systemctl start odoo
sudo systemctl enable odoo
Now, you have successfully installed Odoo 18 on Ubuntu 24.04. You can access the Odoo web interface by opening a web browser and entering http://localhost:8069. Log in with the admin credentials you specified in the configuration file.
In conclusion, installing Odoo on Ubuntu 24.04 is a relatively simple process if you follow the steps outlined in this article. By following the steps carefully, you can have Odoo up and running on your Ubuntu system in no time. Enjoy using Odoo to manage your business efficiently and effectively.