{"id":27618,"date":"2018-07-26T04:18:07","date_gmt":"2018-07-26T09:18:07","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=27618"},"modified":"2022-06-03T03:34:47","modified_gmt":"2022-06-03T08:34:47","slug":"how-to-install-odoo-11-on-ubuntu-16-04-with-nginx-as-a-reverse-proxy","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-odoo-11-on-ubuntu-16-04-with-nginx-as-a-reverse-proxy\/","title":{"rendered":"How to Install Odoo 11 on Ubuntu 16.04 with Nginx as a Reverse Proxy"},"content":{"rendered":"
<\/p>\n
In this tutorial we will guide you through the steps of installing Odoo 11 on Ubuntu 16.04. We will also install Nginx web server and configure it as a reverse proxy. Odoo (formerly OpenERP) is simple and intuitive suite of open-source enterprise management applications such as Website Builder, eCommerce, CRM, Accounting, Manufacturing, Project and Warehouse Management, Human Resources, Marketing and many more. Used by more than 3.7 million users ranging from startups to large companies, it is one of the most popular software of this type in the world. Odoo comes in two editions, Community edition which is free and Enterprise edition. In our case we will install and use the Community edition of Odoo.<\/p>\n
– Ubuntu 16.04 VPS<\/a>. We will use one of our SSD 2 VPS hosting plans. Login to your Ubuntu 16.04 VPS with SSH as user root<\/p>\n Once you are logged in, run the following command to update all intalled packages to the latest available version<\/p>\n If it is not already enabled, you can enable automatic updates<\/a> on your Ubuntu 16.04 VPS.<\/p>\n Odoo needs a PostgreSQL database to store its information, so we will have to install PostgreSQL server<\/a>. PostgreSQL can be easily installed with the<\/p>\n Once it is installed, enable the PostgreSQL server to start automatically upon server reboot<\/p>\n Odoo is not available in the official Ubuntu 16.04 repository, so in order to install it we will need to add the Odoo repository to the server. In order to do it, run the following commands<\/p>\n Next, update the local package database<\/p>\n and install Odoo using the apt package manager<\/p>\n This command will install Odoo, Python 3 and all necessary Python modules, create PostgreSQL user and start the Odoo instance. After the installation completes, you can check the status of the Odoo service:<\/p>\n Output:<\/p>\n After the installation is completed, edit Odoo’s configuration file and set the master admin password.<\/p>\n Uncomment the ‘admin_passwrd’ line, and set a password as shown below<\/p>\n where MASTER_PASSWORD is an actual strong password.<\/p>\n Restart the Odoo instance for the changes to take effect<\/p>\n At this point you should be able to access Odoo using your server’s IP address. Open your favorite web browser and navigate to http:\/\/IP_Address:8069<\/p>\n <\/p>\n In order to be able to access Odoo with a domain name, instead of typing the IP address and the port number, we need a web server. In this tutorial we will install and use Nginx. Run the following command to install it<\/p>\n and enable it to start on server boot<\/p>\n Create Nginx server block for the domain name you will use for accessing Odoo. For example, we will use odoo.com<\/p>\n Save the file and activate the Nginx block by creating a symbolic link<\/p>\n restart the web server for the changes to take effect<\/p>\n That’s all. If you closely followed the steps in this tutorial, you successfully installed Odoo 11 and configure Nginx as a reverse proxy. Now, you should be able to access Odoo with your domain name, create your first Odoo database using the master password we set earlier in this tutorial, and start working on your project.<\/p>\n For more information about Odoo 11, its features and configuration, please check their official documentation<\/a>.<\/p>\n Of course, you don’t have to know how to install Odoo 11 on Ubuntu 16.04 with Nginx as a Reverse Proxy if you have a Odoo VPS Hosting<\/a> with us. You can simply ask our administrators to install Odoo 11 on Ubuntu 16.04 for you. They\u2019re available 24\/7, and will be able to help you with the installation of Odoo 11 on Ubuntu 16.04.<\/p>\n PS.<\/strong><\/span> If you enjoy reading this blog post on How to Install Odoo 11 on Ubuntu 16.04 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 New version available here: How to Install Odoo 12 on Ubuntu 18.04 with Nginx as a Reverse Proxy<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" In this tutorial we will guide you through the steps of installing Odoo 11 on Ubuntu 16.04. We will also … <\/p>\n
\n– SSH access with root privileges
\n– PostgreSQL server
\n– Python version 3
\n– Nginx web server<\/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<\/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: 7693 (odoo)\n CGroup: \/system.slice\/odoo.service\n \u2514\u25007693 \/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 reverse proxy<\/strong><\/h3>\n
apt -y install nginx<\/pre>\n
systemctl enable nginx<\/pre>\n
nano \/etc\/nginx\/sites-available\/odoo.com\n\nupstream oddo {\n server 127.0.0.1:8069;\n}\n\nserver {\n listen 80;\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