Odoo is a powerful and flexible open-source business management software that offers a wide range of applications for various business needs. It provides modules for functions such as accounting, sales, CRM, project management, e-commerce, manufacturing, inventory, and more. Odoo's modular approach allows users to customize and integrate the software to suit their specific requirements.
Before installing Odoo, it is essential to update your CentOS 7 system to ensure you have the latest packages and security patches. You can do this by running the following commands in the terminal:
sudo yum update
Odoo uses PostgreSQL as its database management system. Install PostgreSQL by running the following command:
sudo yum install postgresql-server
After installation, initialize the PostgreSQL database and start the service with the following commands:
sudo postgresql-setup initdb sudo systemctl start postgresql sudo systemctl enable postgresql
Create a new PostgreSQL user by running the following command:
sudo su - postgres -c "createuser -s odoo"
To run Odoo, you need to install some additional dependencies. Install them using the following command:
sudo yum install wget git python36 python-virtualenv python-devel \ libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel zlib-devel \ libxml2-devel libpqxx-devel libpng-devel libjpeg-turbo-devel
Create a system user named "odoo" to run the Odoo service:
sudo useradd -m -U -r -d /opt/odoo -s /bin/bash odoo
Download the latest version of Odoo using Git:
sudo su - odoo -s /bin/bash -c "git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo"
Create a virtual environment for Odoo and activate it:
sudo su - odoo -s /bin/bash -c "cd /opt/odoo/odoo && python3 -m venv odoo-venv && . odoo-venv/bin/activate"
Install the required Python packages for Odoo:
sudo su - odoo -s /bin/bash -c "/opt/odoo/odoo-venv/bin/pip3 install -r /opt/odoo/odoo/requirements.txt"
Create a configuration file for Odoo:
sudo cp /opt/odoo/odoo/debian/odoo.conf /etc/odoo.conf sudo chown odoo: /etc/odoo.conf sudo chmod 640 /etc/odoo.conf
Edit the configuration file with your preferred text editor:
sudo nano /etc/odoo.conf
Set the following parameters in the configuration file:
[options] ; This is the password that allows database operations: admin_passwd = YOUR_ADMIN_PASSWORD db_host = False db_port = False db_user = odoo db_password = False addons_path = /opt/odoo/odoo/addons logfile = /var/log/odoo/odoo.log
Create a log directory and set correct permissions:
sudo mkdir /var/log/odoo sudo chown odoo:root /var/log/odoo
Create a systemd service file for Odoo:
sudo nano /etc/systemd/system/odoo.service
Add the following content to the service file:
[Unit] Description=Odoo Documentation=http://www.odoo.com [Service] # Ubuntu/Debian convention: Type=simple User=odoo ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf # OpenERP/Odoo convention: #ExecStart=/opt/odoo/odoo-venv/bin/python3 /opt/odoo/odoo-server/odoo-bin -c /etc/odoo.conf [Install] WantedBy=default.target
Reload systemd and start the Odoo service:
sudo systemctl daemon-reload sudo systemctl start odoo sudo systemctl enable odoo
To access Odoo, open your preferred web browser and go to:
http://SERVER_IPADDRESS:8069
Replace "SERVER_IPADDRESS" with the actual IP address or domain name of your server. You should now see the Odoo login page.
That's it! You have successfully installed Odoo on your CentOS 7 server.
What our customers say about us
Create your free account today.