To installing OpenERP (Odoo) on Ubuntu, follow these step-by-step instructions:
Step 1: Update the Server
First, update the server’s package list to ensure you have the latest updates.
sudo apt update
sudo apt upgrade -y
Step 2: Install Dependencies
Odoo requires several dependencies, including Python, PostgreSQL, and some additional libraries.
sudo apt install python3-pip build-essential wget python3-dev python3-venv libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libjpeg-dev zlib1g-dev -y
Step 3: Install PostgreSQL
PostgreSQL is the database used by Odoo. Install it using the following command:
sudo apt install postgresql -y
After installation, create a new PostgreSQL user for Odoo:
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
This command will prompt you to set a password for the new odoo
user. Make sure to remember this password, as you’ll need it later.
Step 4: Install Wkhtmltopdf
Odoo uses wkhtmltopdf
to generate reports in PDF format. Download and install the required version:
sudo apt install wkhtmltopdf -y
Step 5: Install Odoo
Now, download the Odoo package. For this example, we’ll install Odoo 16, which is the latest stable version.
Add the Odoo repository:
wget -O - https://nightly.odoo.com/odoo.key | sudo apt-key add -
echo "deb http://nightly.odoo.com/16.0/nightly/deb/ ./" | sudo tee /etc/apt/sources.list.d/odoo.list
Update your package list and install Odoo:
sudo apt update
sudo apt install odoo -y
Step 6: Configure Odoo
Edit the Odoo configuration file to set up the database connection. The configuration file is usually located at /etc/odoo/odoo.conf
.
Open the file with a text editor:
sudo nano /etc/odoo/odoo.conf
Modify or add the following lines:
[options]
admin_passwd = your-admin-password
db_host = False
db_port = False
db_user = odoo
db_password = yourpassword
addons_path = /usr/lib/python3/dist-packages/odoo/addons
xmlrpc_interface = 0.0.0.0
Replace your-admin-password
with a strong password for the Odoo admin user, and yourpassword
with the password for the PostgreSQL odoo
user you created earlier.
Step 7: Start and Enable the Odoo Service
Start the Odoo service and enable it to start automatically on boot:
sudo systemctl start odoo
sudo systemctl enable odoo
Step 8: Allow Odoo Through the Firewall
If you have a firewall enabled, allow traffic on the Odoo port (8069 by default):
sudo ufw allow 8069/tcp
sudo ufw reload
Step 9: Access Odoo
Open a web browser and navigate to http://<your-server-ip>:8069
. You should see the Odoo login screen.
Additional Steps (Optional)
- Secure the Installation:
- Consider setting up SSL/TLS using tools like Let’s Encrypt.
- Configure strong passwords and user roles within Odoo.
2. Backup and Restore:
- Regularly back up your Odoo database and any other necessary files.
3. Updates:
- Regularly check for Odoo updates to keep your installation secure and up to date.
Troubleshooting Tips
- Check Logs: If you run into issues, check the Odoo logs located at
/var/log/odoo/odoo.log
for detailed error messages. - Service Status: Ensure the Odoo service is running properly by checking its status:
sudo systemctl status odoo
Would you like help with anything else?
Conclusion
To simply install OpenERP, also known as Odoo, especially on Ubuntu, it is necessary to have managed Odoo server solutions. To install odoo on Ubuntu, follow all the above-mentioned steps in a specific order to get the desired outcome.