Odoo is a powerful open-source business application platform that can be used to manage a wide range of business operations, such as accounting, inventory, project management, and more. In this tutorial, we will show you how to install Odoo 16 on a CentOS 8 server.
Before you begin, you will need the following:
- A server running CentOS 8.
- A user account with sudo privileges.
Step 1: Update the system
It’s always a good idea to update your system before installing any new software. Run the following commands to update the system:
sudo yum update sudo yum upgrade
Step 2: Install the dependencies
Odoo requires a number of dependencies to be installed on the system. Run the following command to install the dependencies:
sudo yum install epel-release sudo yum install python3 python3-devel postgresql postgresql-server postgresql-devel wkhtmltox nodejs npm
Step 3: Create a PostgreSQL user
Odoo uses a PostgreSQL database to store its data. We need to create a PostgreSQL user and database for Odoo.
First, start the PostgreSQL service and enable it to start automatically on boot:
sudo systemctl start postgresql sudo systemctl enable postgresql
Next, switch to the postgres user and create a new PostgreSQL user for Odoo:
sudo -u postgres createuser -s odoo
Step 4: Create a new system user
It’s a good security practice to run Odoo as a separate system user, rather than running it as the root user. Run the following commands to create a new system user for Odoo:
sudo useradd -m -d /opt/odoo -U odoo
Step 5: Install Odoo
Now that we have all the dependencies and system users in place, we can install Odoo.
First, switch to the odoo user:
sudo su - odoo
Next, download the Odoo 16 tarball:
Extract the tarball:
tar xvf 16.0.tar.gz
Change into the Odoo directory:
Install the Python dependencies for Odoo:
python3 -m pip install -r requirements.txt
Step 6: Configure Odoo
Before we can start using Odoo, we need to create a configuration file for it. Run the following command to create a sample configuration file:
./odoo-bin --save --stop-after-init
This will create a file called odoo-server.conf in the current directory. Open the file in a text editor and make the following changes:
Change the ‘db_user’ setting to ‘odoo’.
Change the ‘db_password’ setting to the password you want to use for the Odoo database user.
Save the file and exit the text editor.
Step 7: Start Odoo
To start Odoo, run the following command:
This will start the Odoo server and make it available on port 8069. To access the Odoo web interface, open a web browser and navigate to http://your_server_ip:8069.
Step 8: Create an Odoo database
To create an Odoo database, click on the “Create a new database” button on the login page. Enter a name for the database and click “Create Database”.
Step 9: Log in to Odoo
Once the database has been created, you can log in to Odoo using the default username and password:
- Username: admin
- Password: admin
After logging in, you will be taken to the Odoo dashboard. From here, you can start using Odoo to manage your business operations.
In this tutorial, we showed you how to install Odoo 16 on a CentOS 8 server. You should now have a fully functional Odoo installation that you can use to manage your business operations.
If you want to learn more about using Odoo, you can refer to the official Odoo documentation at https://www.odoo.com/documentation.