How to install Odoo 10 on Ubuntu 16.04 with Apache as a reverse proxy
Odoo is an open source web business software that includes a range of business applications for sales, project and warehouse management, CRM, accounting, website / e-commerce, billing, inventory and thousands of more add-on modules developed by the community.
In this guide, we will walk you through the complete installation of Odoo 10 on your Ubuntu 16.04 VPS and show you how to set up Apache as a reverse proxy for your Odoo 10.
If you follow these instructions properly, it should take no more than 20 minutes to set up Odoo on your VPS.
Installing Odoo
Before starting, you need to connect to the server via SSH.
Once you have successfully logged in, we need to ensure that all our packages are up to date by running the following commands:
apt-get update apt-get upgrade
You can also enable automatic updates on your VPS.
In order to install Odoo 10 on our system, we will use a script.
Change to the directory where you want to download the script. For example, to go to the “home” directory you need to type:
cd /home
Then use the following command to load the script:
wget https://raw.githubusercontent.com/Yenthe666/InstallScript/10.0/odoo_install.sh
You can also modify the script if you like:
nano odoo_install.sh
For example, you can change the version you would like to install, the location where it will be installed, whether you install the enterprise version or not, and most importantly, you can change the administrator password.
After you make the necessary changes, make sure you save them.
In order to run the script, we need to make the file executable with the following command:
chmod +x odoo_install.sh
We can now run the script and wait while Odoo 10 is installed.
./odoo_install.sh
Congratulations! Odoo 10 is now installed on your Ubuntu 16.04 VPS.
If you did not set an administrator password before installation, you can do so now by editing the Odoo 10 configuration file. You can open it with the following command:
nano /etc/odoo-server.conf
and change the admin_password field to a strong password. You can also create a password from the command line.
admin_passwd = StrongPassword
Restart Odoo for the changes to take effect:
/etc/init.d/odoo-server restart
To access Odoo, open your browser and go to http: // your-server-IP: 8069. First, you will be prompted to create a new database.
After the database is created, you are taken to the admin panel, from which you can log in as an administrator.
After successful registration, you can start using Odoo 10 and customize it to fit your needs, install additional modules, etc.
Setting up a reverse proxy
To access the Odoo application using only your domain name, without the port number in the URL, we need to configure Apache as a reverse proxy.
First, we will need to enable some additional proxy modules for Apache. You can do this with the following commands:
a2enmod proxy a2enmod proxy_http
Once this is done, open a new configuration file for the domain with the following command:
nano /etc/apache2/sites-enabled/your_domain.conf
And enter the following:
<VirtualHost *:80> ServerName vash_domen.ru ServerAlias www.vash_domen.ru ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://vash_domen.ru:8069/ ProxyPassReverse / http://vash_domen.ru:8069/ <Location /> Order allow,deny Allow from all </Location> </VirtualHost>
Don’t forget to replace “vash_domen.ru” with your real domain. Save the file, close it and restart Apache for the changes to take effect:
service apache2 restart
That’s all. If you followed all the instructions correctly, then you can access Odoo 10 using your domain name.
You can also check out our tutorial on how to speed up Odoo.