If you want to install Odoo 11 on Debian 9 then this tutorial will be very helpful, giving you guidelines, step by step. Another thing that we will do is installing the Nginx web server and also configure it as a reverse proxy. Odoo, or as we know it from before OpenERP, is a simple and intuitive suite of open-source enterprise management applications like Website Builder, CRM, Marketing, Human Resources, eCommerce, Manufacturing, Project, and Warehouse Management, Accounting, and so on. More than 3.7 million people use it, both in startup and large companies, making this type of software one of the most popular in the world. You can find Odoo in two editions, the free Community edition and Enterprise edition. We have chosen to install and use the Community edition of Odoo.
Prerequisites
– Debian 9 VPS. We will use one of our SSD 2 VPS hosting plans.
– SSH access with root privileges
– PostgreSQL server
– Python version 3
– Nginx webserver
Login via SSH and update the system
You can log in to your Debian 9 VPS with SSH as user root
ssh root@IP_Address -p Port_number
When you are already logged in you need to run this next command in order to update the installed packages to their latest version that it is available.
apt update && apt upgrade
In case this has not been done already, you could enable automatic updates on your Debian 9 VPS.
Install PostgreSQL server
If you want to store Odoo information you will need a PostgreSQL database, and the PostgreSQL server has to be installed. One very simple way to install PostgreSQL is using the following command:
apt install -y postgresql
Once the installation is finished, you need to enable the PostgreSQL server to start automatically upon server reboot:
systemctl enable postgresql
Add repository and install Odoo 11
You will not be able to find Odoo 11 in the official Debian 9 repository, so if you want to install it we will have to add the Odoo repository to the server. That can be done through the following commands
wget -O - https://nightly.odoo.com/odoo.key | apt-key add - echo "deb http://nightly.odoo.com/11.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
Now the local package database needs to be updated
apt update
and use the apt package manager in order to install Odoo
apt -y install odoo
This command will help you install Odoo, Python 3, and all needed Python modules, create PostgreSQL users and start the Odoo instance. When the installation is completed, you will be able to check the Odoo service status:
systemctl status odoo
Output:
● odoo.service - Odoo Open Source ERP and CRM Loaded: loaded (/lib/systemd/system/odoo.service; enabled; vendor preset: enabled) Active: active (running) Main PID: 9574 (odoo) CGroup: /system.slice/odoo.service └─9574 /usr/bin/python3 /usr/bin/odoo --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log
Once the installation is finished, do not forget to edit the configuration file of Odoo and also to set the master admin password.
nano /etc/odoo/odoo.conf
You need to uncomment the ‘admin_password’ line, then to set a password as it is given below
admin_passwd = MASTER_PASSWORD
where MASTER_PASSWORD is a strong password.
In order for the changes to take effect, you have to restart the Odoo instance
systemctl restart odoo
By this step, you should be able to access Odoo using your server’s IP address. Open the web browser of your choice and navigate to http://IP_Address:8069
Install Nginx web server and configure a reverse proxy
If you want to be able to access Odoo with a domain name, you should not type the IP address and the port number, all you need is a web server. In this tutorial, we choose to install and use Nginx. If you want to install it run the command below
apt -y install nginx
and of course do not forget to enable it to start on server boot
systemctl enable nginx
You should also create an Nginx server block for the domain name you will use for accessing Odoo. For instance, we chose odoo.com
nano /etc/nginx/sites-available/odoo.com pstream oddo { server 127.0.0.1:8069; } server { listen 80 default; server_name odoo.com; access_log /var/log/nginx/odoo.com.access.log; error_log /var/log/nginx/odoo.com.error.log; proxy_buffers 16 64k; proxy_buffer_size 128k; location / { proxy_pass http://oddo; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; 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 https; } location ~* /web/static/ { proxy_cache_valid 200 60m; proxy_buffering on; expires 864000; proxy_pass http://oddo; } }
Save the file and create a symbolic link to activate the Nginx block
ln -s /etc/nginx/sites-available/odoo.com /etc/nginx/sites-enabled/odoo.com
once again, if you want the changes to take effect you need to restart the webserver
systemctl restart nginx
That is it. If you followed this tutorial step by step, you have installed Odoo 11 successfully and configure Nginx as a reverse proxy. At this point, you need to be able to access Odoo with your domain name and to create your first Odoo database using the previously set master password, and start working on your project.
If you need more information about Odoo 11, its features, and configuration, please check their official documentation.
Of course, you don’t have to know how to install Odoo 11 on Debian 9 with Nginx as a Reverse Proxy if you have an Odoo VPS Hosting with us. You can simply ask our administrators to install Odoo 11 on Debian 9 for you. They’re available 24/7 and will be able to help you with the installation of Odoo 11 on Debian 9.
Not really what you were looking for? If you are trying to install Odoo 12 on Debian 10 with Nginx as a Reverse Proxy, visit our latest tutorial, to guide you through the whole process.
If you enjoyed reading this blog post on How to Install Odoo 11 on Debian 9 with Nginx as a Reverse Proxy, feel free to share it on social networks using the shortcuts below, or simply leave a comment.