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!
Hiya Yenth
if we install odoo Enterprise edition v.12 not community edition in cloud which VPS provider would you suggest that gives you best flexibility and performance, AWS, Azure, DigitalOcean?
Do you have any steps on this process to install odoo Ent v12
Thanks
Hi CA,
It doesn’t matter a lot honestly. All major cloud providers are good, details are usually in pricing and specifications. I have one tutorial about how to install Odoo on DigitalOcean though. See https://www.odoo.yenthevg.com/installing-configuring-odoo-digitalocean/
hi
Thank you for script
i,m download deb file
please Help
how change
# Install ODOO
#————————————————–
echo -e “\n==== Installing ODOO Server ====”
sudo git clone –depth 1 –branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/
———————————————————-
to
sourse code deb file
path /tmp/XXXXX.deb
thank you
Hi,
The script doesn’t support debian packaged installers right now. You might want to follow the official Odoo docs for this.
Hi,
there’s a minor problem running your script since wkhtmltox can’t be installed:
“Depency is not satisfiable: libpng12-0”
I got around this by downloading and installing the missing libpng12-0 from
http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
Since actual wkhtmltox stable is 0.12.5 by now wouldn’t it make sense to update your script to it?
Hi Markus,
Thanks for notifying me. I have a branch open where I’m testing the packages and the new wkhtmtopdf. I just didn’t get around to fully testing and updating on the stable branch yet. 🙂
Hi Yenthe
depending on some of your post i modify the secript to work with wkhtmltopdf 0.12.5-1 with ubuntu 18.04 of your installer to of line 34 to 40 to be replaced as below now it work just perfect hopfully that help others , thanks
Ahmed
##
### WKHTMLTOPDF download links
## === Ubuntu 18.04 Bionc x64 & x32 === (for other distributions please replace these two links,
## in order to have correct version of wkhtmltox installed, for a danger note refer to
## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
if [ “
lsb_release -c -s
” == “bionic” ];thenWKHTMLTOX_X64= https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
WKHTMLTOX_X32= https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_i386.deb
else
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb
WKHTMLTOX_X32=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_i386.deb
fi
hop
Hi Ahmed,
Thanks for sharing! I actually have a test branch that looks very similar. See https://github.com/Yenthe666/InstallScript/blob/12-requirements/odoo_install.sh
It isn’t merged yet, it still needs further testing and feedback so feel free to test it!
Really useful script thank you very much!
Odoo has never been so easily installable well done!
hi.. thank you for the script, it’s help me..
I have error when create database
ERR_CONNECTION_REFUSED
Thank you
“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!” – Do you mean that Learning Partner cannot install enterprise version on their own dedicated server?
Hi,
All the partners should have access to the enterprise code and should be able to install it on a dedicated server. The same applies for learning partners.
Hi Yenthe666, I didn’t see postgres’s password or database in script. How can I access to database when I use your script? Thanks mate, it’s good job
The postgres user is created passwordless. You’ll have to set one yourself if you want it.
Hi Yen, Installed Perfectly. Thanks for making life easier!
You’re welcome, happy you’ve liked it!
Will this work on CentOS 7?
This won’t work on CentOS, only on Ubuntu versions sorry.
I noticed this little “fi” in the script; is it supposed to be “if”? Is that the reason why I have config and systemd service issues in my installation?
${OE_HOME}/custom/addons\n’ >> /etc/${OE_CONFIG}.conf”
fi
sudo chown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf
sudo chmod 640 /etc/${OE_CONFIG}.conf