{"id":27898,"date":"2020-12-16T11:15:00","date_gmt":"2020-12-16T17:15:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=27898"},"modified":"2022-06-03T03:32:25","modified_gmt":"2022-06-03T08:32:25","slug":"how-to-install-odoo-11-on-debian-9-with-nginx-as-a-reverse-proxy","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-odoo-11-on-debian-9-with-nginx-as-a-reverse-proxy\/","title":{"rendered":"How to Install Odoo 11 on Debian 9 with Nginx as a Reverse Proxy"},"content":{"rendered":"
<\/p>\n
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.<\/p>\n
<\/p>\n
\u2013 Debian 9 VPS<\/a>. We will use one of our SSD 2 VPS hosting plans. You can log in to your Debian 9 VPS with SSH as user root<\/p>\n 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.<\/p>\n In case this has not been done already, you could enable automatic updates<\/a> on your Debian 9 VPS.<\/p>\n If you want to store Odoo information you will need a PostgreSQL database, and the PostgreSQL server<\/a> has to be installed. One very simple way to install PostgreSQL is using the following command:<\/p>\n Once the installation is finished, you need to enable the PostgreSQL server to start automatically upon server reboot:<\/p>\n 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<\/p>\n Now the local package database needs to be updated<\/p>\n and use the apt package manager in order to install Odoo<\/p>\n 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:<\/p>\n Output:<\/p>\n Once the installation is finished, do not forget to edit the configuration file of Odoo and also to set the master admin password.<\/p>\n You need to uncomment the \u2018admin_password\u2019 line, then to set a password as it is given below<\/p>\n where MASTER_PASSWORD is a strong password.<\/p>\n In order for the changes to take effect, you have to restart the Odoo instance<\/p>\n By this step, you should be able to access Odoo using your server\u2019s IP address. Open the web browser of your choice and navigate to http:\/\/IP_Address:8069<\/p>\n <\/p>\n 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<\/p>\n and of course do not forget to enable it to start on server boot<\/p>\n You should also create an Nginx server block for the domain name you will use for accessing Odoo. For instance, we chose odoo.com<\/p>\n Save the file and create a symbolic link to activate the Nginx block<\/p>\n once again, if you want the changes to take effect you need to restart the webserver<\/p>\n 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.<\/p>\n If you need more information about Odoo 11, its features, and configuration, please check their official documentation<\/a>.<\/p>\n Of course, you don\u2019t have to know how to install Odoo 11 on Debian 9 with Nginx as a Reverse Proxy if you have an Odoo VPS Hosting<\/a> with us. You can simply ask our administrators to install Odoo 11 on Debian 9 for you. They\u2019re available 24\/7 and will be able to help you with the installation of Odoo 11 on Debian 9.<\/p>\n Not really what you were looking for? If you are trying to install Odoo 12 on Debian 10 with Nginx as a Reverse Proxy<\/a>, visit our latest tutorial, to guide you through the whole process.<\/p>\n 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.<\/p>\n\n\n <\/p>\n","protected":false},"excerpt":{"rendered":" If you want to install Odoo 11 on Debian 9 then this tutorial will be very helpful, giving you guidelines, … <\/p>\n
\u2013 SSH access with root privileges
\u2013 PostgreSQL server
\u2013 Python version 3
\u2013 Nginx webserver<\/p>\nLogin via SSH and update the system<\/h3>\n
ssh root@IP_Address -p Port_number<\/pre>\n
apt update && apt upgrade<\/pre>\n
Install PostgreSQL server<\/strong><\/h3>\n
apt install -y postgresql<\/pre>\n
systemctl enable postgresql<\/pre>\n
Add repository and install Odoo 11<\/strong><\/h3>\n
wget -O - https:\/\/nightly.odoo.com\/odoo.key | apt-key add -\necho \"deb http:\/\/nightly.odoo.com\/11.0\/nightly\/deb\/ .\/\" >> \/etc\/apt\/sources.list.d\/odoo.list<\/pre>\n
apt update<\/pre>\n
apt -y install odoo<\/pre>\n
systemctl status odoo<\/pre>\n
\u25cf odoo.service - Odoo Open Source ERP and CRM\n Loaded: loaded (\/lib\/systemd\/system\/odoo.service; enabled; vendor preset: enabled)\n Active: active (running)\n Main PID: 9574 (odoo)\n CGroup: \/system.slice\/odoo.service\n \u2514\u25009574 \/usr\/bin\/python3 \/usr\/bin\/odoo --config \/etc\/odoo\/odoo.conf --logfile \/var\/log\/odoo\/odoo-server.log<\/pre>\n
nano \/etc\/odoo\/odoo.conf<\/pre>\n
admin_passwd = MASTER_PASSWORD<\/pre>\n
systemctl restart odoo<\/pre>\n
Install Nginx web server and configure a reverse proxy<\/strong><\/h3>\n
apt -y install nginx<\/pre>\n
systemctl enable nginx<\/pre>\n
nano \/etc\/nginx\/sites-available\/odoo.com\n\npstream oddo {\n server 127.0.0.1:8069;\n}\n\nserver {\n listen 80 default;\n server_name odoo.com;\n\n access_log \/var\/log\/nginx\/odoo.com.access.log;\n error_log \/var\/log\/nginx\/odoo.com.error.log;\n\n proxy_buffers 16 64k;\n proxy_buffer_size 128k;\n\n location \/ {\n proxy_pass http:\/\/oddo;\n proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;\n proxy_redirect off;\n\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto https;\n }\n\n location ~* \/web\/static\/ {\n proxy_cache_valid 200 60m;\n proxy_buffering on;\n expires 864000;\n proxy_pass http:\/\/oddo;\n }\n}<\/pre>\n
ln -s \/etc\/nginx\/sites-available\/odoo.com \/etc\/nginx\/sites-enabled\/odoo.com<\/pre>\n
systemctl restart nginx<\/pre>\n
\n