In this tutorial I will learn you how to install Odoo 12 community or enterprise on Ubuntu 18.04. The script that you will use is based on the code from André Schenkels but has been updated, upgraded and improved. Do notice that if you want to install the enterprise version that you will need to be an official partner or that you need to have bought the enterprise subscription from Odoo. Otherwise you will have no access to the Github repository for the enterprise code!
1. Downloading the script
The first step is to download my script from Github and to add the code in a new .sh file on your Ubuntu machine, wherever you’d like this.
For example right under /home. Open up an Ubuntu terminal and cd to the directory where you’d like to keep the script and then create the file:
1 |
sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/12.0/odoo_install.sh |
If you’re curious about how the whole code looks and works you can find it on my Github account.
Now open up the file and edit the parameters to your liking:
1 |
sudo nano odoo_install.sh |
There are some things you can configure/change to your likings at the top of the script. You can choose if you wish to install Wkhtmltopdf or not, which version you’d like, where the location is and most importantly what the master admin password is.
Tip: always modify this for every Odoo you install!
If you want the enterprise version of V12 you should change the line IS_ENTERPRISE to true:
1 |
IS_ENTERPRISE="True" |
If you want the community version you can just continue and keep the IS_ENTERPRISE key on “False” (which is the case by default):
1 |
IS_ENTERPRISE="False" |
2. Making the Odoo installation file executable
The next step is to make this file executable. After you’ve made it executable you can execute it and everything will be installed automatically.
do this with the following command:
1 |
sudo chmod +x odoo_install.sh |
3.Running the script
Now that the code is in your file and the file is executable you simply have to execute it with the following command:
1 |
./odoo_install.sh |
You will see that the script automatically starts updates, downloads required packages, creates the user, downloads the code from Github, … Eventually, if you’ve chosen to install the enterprise version, you will need to give in your Github credentials to download the enterprise code (since this is a private repository). Fill in your details and let the script continue:
Give the script a few minutes to configure and install everything and eventually you will see something like this:
You now have a fully functional Odoo V12 community or enterprise on your system! Congratulations.
4. Extra information about Odoo 12 Enterprise
Since Odoo Enterprise uses code from both http://github.com/odoo/odoo and http://github.com/odoo/enterprise we will separate the code with this script. This will make future upgrades easier and the code is nicely separated. This means that the default V12 code will be under /odoo/odoo-server/ and all the enterprise code will be under /odoo/enterprise/.
In the script you saw there was an option to change the Odoo port (OE_PORT). When you’d change this port number to 8070 in the install script it would be applied to /etc/your-config-file.conf and this would give you the ability to change the default port.
To apply these changes you should do the following:
The -c will change the configuration and memorize what you’ve changed under /etc/your-config-file.conf. Because my port was set to 8070 this is telling the Odoo that it should run on port 8070. When you would now open up your browser and navigate to http://localhost:8070/ you will see it is running there:
Has this tutorial helped you, do you have any feedback or questions? Post away!