Odoo, which was previously referred to as OpenERP, serves as a comprehensive business management solution. It delivers a vast selection of applications, including billing, accounting, inventory control, project oversight, and numerous others.
Requirements
- An up-and-running server with CentOS 7 installed.
- Access to a sudo-enabled user account.
Matching infrastructure at centron
No hardware needed to follow along: ccloud³ VMs with full root access start at €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →
Step 1: System Update
Prior to adding any new software packages to your CentOS server, it is advisable to refresh the system. Connect via the sudo user account and execute the following commands to update:
sudo yum -y update
sudo rebootAfter the server restarts, sign back in as the sudo user to move forward with the installation process.
Step 2: PostgreSQL Installation and Setup
Next, you will need to set up PostgreSQL, which serves as Odoo's primary database system.
sudo yum install -y postgresql-serverInitialize the database, activate PostgreSQL, and configure it to automatically launch during system boot:
sudo postgresql-setup initdb
sudo systemctl start postgresqlStep 3: Odoo Installation
It is now time to install Odoo itself:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://nightly.odoo.com/10.0/nightly/rpm/odoo.repo
sudo yum install -y odooActivate the Odoo service and ensure it launches automatically with the server:
sudo systemctl enable odoo
sudo systemctl start odooLastly, adjust the firewall settings to permit access to Odoo through port 8069:
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --zone=public --permanent --add-port=8069/tcp
sudo firewall-cmd --reloadStep 4: Odoo Configuration
Odoo can now be accessed through your browser by visiting the URL:
http://[your-instance-IP]:8069
Substitute [your-instance-IP] with your actual server IP address. Remember to include port 8069 in the URL.
Choose a name for the new database that Odoo will generate, provide your email address, and create a password for the administrator account. Then, click the Create database button to proceed.
After successful database creation, you will be taken to the Odoo dashboard where you can install apps and customize your system settings.
Step 5: Install Nginx for Easier Access
To simplify user access, you can redirect traffic from the default HTTP port (80) and HTTPS port (443) to Odoo's port 8069. This setup eliminates the need for users to manually specify the port number. Using Nginx also allows you to secure Odoo with an SSL certificate; instructions for adding SSL to Nginx are available separately.
Begin by installing Nginx:
sudo yum install -y nginxEdit the Nginx configuration file using a text editor like nano:
sudo nano /etc/nginx/nginx.confLocate the location block in the configuration file:
location / {
}Modify it to include the following settings:
location / {
proxy_pass http://127.0.0.1:8069;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Restart Nginx and configure it to start automatically with the system:
sudo systemctl restart nginx
sudo systemctl enable nginxAfter completing these steps, you can reach your Odoo instance either via port 8069 or directly through port 80:
- http://[your-instance-IP]:8069
- http://[your-instance-IP]
Conclusion
By following the steps outlined above, you have successfully installed and configured Odoo on a CentOS 7 server. With PostgreSQL handling your database management, and Nginx set up to streamline user access, your Odoo environment is now ready for use. You can further enhance your system by installing additional Odoo apps and securing your setup with SSL encryption for even greater protection.
Testen Sie Ihr Setup auf ccloud³
Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.