In this tutorial I will learn you how to install Odoo 11 community or enterprise on Ubuntu 16.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/11.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 V11 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 V11 community or enterprise on your system! Congratulations.
4. Extra information about Odoo 11 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 V11 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!
Thank you again. How can I upgrade odoo 10 CE to 11 CE?
Hi Onur,
You’re welcome. Odoo itself doesn’t offer free upgrades from V10 CE to V11 CE. You will need to either buy an enterprise license or wait for OpenUpgrade to be available for V11 https://github.com/OCA/OpenUpgrade
thank you very much.
You’re welcome – best of luck!
Great script, works like an dream. Thank you very much.
Thanks a lot for that Yenthe, that s awesome!!
I have a pb maybe you could give me some guideline…
I’m Odoo partner and I recently recruit devellopers but I wonder what is the way to work under odoo Enterprise with my team?
every devellopers need to have his own Odoo E licence to devellop locally new modules? I don’t think so…. But 1 licence is for 1 server, so what is the right way to work with a team under Odoo E with one licence?
Thanks for any guidelines
Jeff
Hi Jeff,
You’re welcome!
Odoo should have given you an internal testing license that you can use for all your test databases. If you didn’t get this (yet) you should reach out to your account manager so they can create one for you.
Regards,
Yenthe
Ok great I will check that.
Thanks a lot for your answer
You’re welcome! Best of luck!
Excellent!!
you are the best odoo support guy! 😉
Thanks Hugo! 🙂
Thanks a lot for this tutorial.
I have a question, I’ve installed Odoo Community Edition at our local server (disconnected from the Internet), and downloaded free archived packages from the Odoo App Store and installed on it.
So, if I buy the Enterprise Edition with selected packages, what will I receive at my e-mail? is it archived packages to be added to addon folder? Or only the partner can install the Enterprise Edition at our local server?
thanks again.
Hi blueMix,
You’ll be able to upgrade to enterprise yourself because the addons should be in there. If you want the full info and want to be sure I suggest you to fill in the contact form (https://www.odoo.com/page/contactus)
Followed this guide with a fresh 16.04 install for Enterprise 11.
Script completed successfully – Done, server is up and running.
However when I visit the ipaddress:8069 I cannot connect as the site cannot be reached..
Any ideas ?
Hi Cj,
Thanks for the report! Can you please make a bug report at https://github.com/Yenthe666/InstallScript/issues with information? What OS, what does the logfile say, etc?
Hi Yenthe,
I have installed Odoo11e with your script. But I only get the database screen without any css.
I found a thread with you and a guy having exactly the same problem. I tried the -u all but it does nothing. Nothing happens and I still have the same problem.
Can you help? Thanks so much!
Hi Samuel,
Please comment on the thread with your issues too. Can you try the latest version of the script again? I’ve had some things fixed / improved too.
Hi Yenth,
after a clean installation in new VM with ubuntu 16.04, i had the same issue, i have the screen without any css.
Is this problem is solved. Thanks
i repeat the installation with a new VM and it work now i don’t know why it didn’t work at the first time, Thanks Yenth
Awesome – best of luck!
Hi Moad,
I did found some missing packages and dependencies a while ago that could have caused this. Can you please try again on a new server? It should be handled now.
Hey, thanks for the new script. Can we use this same script to update version 10 to 11 on both Community and Enterprise?
Shane
Hi Shane,
You’re welcome! The script is only for installing a new Odoo. You shouldn’t install a new version over the original one, that might get you into quite some troubles. Just install a new Odoo on another port and migrate your database.
Hi Yenthe
Can you help us by publishing a tutorial for high performance Odoo configuration, Also Apache and Ngix configuration
i think is very important.
Thank so much for all your efforts.
Best regards.
Hi Ghaith,
The next tutorial should be how to run Odoo behind Nginx, I just have to find the time for it now. 😉 and you’re welcome!
Waiting for that thnx
Waiting for that too!
Thanks!
Good One.!!!!
Let me know you email id to contact you.
Thanks! You can reach me through https://github.com/Yenthe666 or https://www.linkedin.com/in/yenthevanginneken/
Hi Yenthe,
well this is an amazing easy way to setup a the new odoo 11, thanks you so much!
From there can i just import my odoo10 database with the web interface?
Thanks! 😉
You’re welcome! You can’t import an Odoo 10 database on an Odoo 11 though. You will need to upgrade your database first (for more information see https://upgrade.odoo.com/database/upload)
Hi Yenthe,
Thanks that’s awesome I am a bit confused although. You are installing a lot of packages/libraries that are not included in the requirements.txt
I have two questions for you, will be very happy if you manage to answer me:
1) Is the requirements.txt sufficient
2) Did you encountered any package that you installed via aptitude to be mandatory to install via apt and not pip3. I am converting the installation script to use pip3 only in order to empower virtualenvironments.
Thanks a lot!
Dimitar
Hi Dimitar,
Happy that you like it!
1) There are indeed quite some packages that are not in requirements.txt but that might be needed (such as dependencies for some specific modules that won’t break Odoo if you don’t have them but are needed for the module to work).
2) In theory all dependencies from aptitude should be able to be removed. It should be possible to only have the pip3 installations and work fine for virtual environments. Just double check it on a test environment to be sure 😉
Hey that was fast, thanks for the prompt answer 🙂
Of course, I am setting up my dev env now, just wanted to check if you can warn me for something and spare me some time troubleshooting.
I’ve found an equivalent to all apt packages in PyPi so I will install them with pip3.
I will post a comment later to inform of the result.
Cheers,
Dimitar
Awesome – do keep me updated!
Hello Yenthe
I see your script uses source from git repo and not the ubuntu package installer!!!!
What is benefit of this ?
can this script be used from production or only development ?
what is best way to upgrade odoo git fetch or run script again ?
Hi Shaun,
It is a lot easier to maintain and update Odoo from Github.
You can use it for live and development production. Updating should always be done with a git fetch – don’t run the installer again. It is a one time installer. 😉
Thank you for the script it works perfectly for CE and EE.
Regarding using it for development and git, develop-stage-production, do you have any guide with more details for version 11 CE, 11 EE?
Hi Fred,
Not at the moment sorry, I’ll keep it in the back of my mind!
Hi Yenthe,
Thank you for the script.
I am completely new to Odoo. But I tried installing Community your script on my test server.
And I am now planning to use Enterprise (production) for my company. I was initially thinking hiring a Odoo partner but they charged me so much just to install Enterprise.
Without due to respect, can I use your script to install Enterprise for a production server purpose. I do not know how to check when went well or what did not went well.
Hi Alex,
The problem is that only Odoo partners get access to the Github repository for the enterprise code (under odoo/enterprise). If you could get access to the enterprise repository you can use the script and install the enterprise version. If you buy the enterprise yourself you will get a .deb package I believe, which my script doesn’t support at the moment. Out of curiosity, what did they charge for an installation then?
merci de ton script
Hello,
I followed your tutorial (enterprise=True), but when I try to create a new database I get the following error:
Database creation error: relation “ir_model” does not exist LINE 1: SELECT * FROM ir_model WHERE state=’manual’ ^
Also the interface of the database manager is messed up, seems like some paths are wrong?
Kind regards
Alex
Hi Alex,
Thank you for your report! In some cases this seems to be a bug in the script. Please have a look at the Github topic at https://github.com/Yenthe666/InstallScript/issues/73 – somebody suggested some changes to this script that *should* work.
Realy amasing. After many difficult tries with oddo on own computers directly with linux or with windows or Linux and docker I tried a V-server from server4you.
After restoring Debian8 with Ubuntu16.04 I run the script and it was just working out of the box.
Thats great help.
Thanks and regards from Roland
Happy to hear it helped you, you’re welcome!
Thank you so much Yen. Being a Newbie, After struggling with odoo, your script gave a a hitch free install. Even showes off to my boss.
The issue I have now is configuring email (incoming and outgoing). After inputting the credentials (gmail) and clicking test, I get ; Odoo Server Error – Warning
Connection test failed: 101
Network is unreachable
Meanwhile, the server is online and I can ping gmail.com etc. The ports are correct as well.
Is there something I am missing? Pls help.
Thanks
Hi Grace,
That sounds like you just didn’t configure the outgoing e-mailserver correctly. 🙂
Have you used smtp.gmail.com as SMTP server?
Did you use port 587 to connect?
Did you enabe SSL/TLS?
Regards,
Yenthe
When running the odoo_install I ran with a problem:
odoo@f360:~/wkhtmltopdf$ gdebi –n wkhtmltox-0.12.1_linux-trusty-amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading state information… Done
This package is uninstallable
Dependency is not satisfiable: libpng12-0
odoo@f360:~/wkhtmltopdf$
PLEASE help me !!!
I tried to install libpng without luck !!
Thanks,
-LV
I found it !!! it seems that Ubuntu has depreciated the lib since 16.04 so I have to download it from:
https://packages.ubuntu.com/xenial/amd64/libpng12-0/download
and install it first of wkhtmltopdf
sudo gdebi –n wkhtmltox-0.12.1_linux-trusty-amd64.deb
and DONE !! now it works !!!
Thanks !!!
-LV
Thanks bro smooth installation.
Hei Yenthe,
I tried to install odoo 11 entreprise using your script on ubuntu 16.04. It looked as if the script went just fine, however, when i run start the database selector, the page does not render correctly and when i create a database i get the error message “Database creation error: relation “ir_model” does not exist LINE 1: SELECT * FROM ir_model WHERE state=’manual’ ^”
Tried to create some test databases. They do show up, but cannot access nor delete them.
Any idea where i went wrong here?
ed edtest test
Manage databases
×
Create Database
Odoo is up and running!
Fill out this form to create a new database. You will install your first app afterwards.
Master Password
Database Name
Email
Password
Language
Country
Load demonstration data (Check this box to evaluate Odoo)
Hi Rudy,
Have a look at https://github.com/Yenthe666/InstallScript/issues/73 😉
Hi ,
Could you please let us know what is the best method to replicate odoo 10 and 11 for High availability. How to replicate PostgreSQL. Replication should be as Master Master.If one fails other one should take over completely.
Hi Dharmakantha,
You’ll need to setup a second postgreSQL server and configure one as the primary and one as a slave. This is not a two minute job honestly. 🙂
Hi Yenthe,
I have odoo 11 enterprise code, but how can i have access to github repository to run your script for enterprise installation?
Cheers.
Hi Ray,
The script will automatically ask for your username and password. If you don’t have access to github.com/odoo/enterprise you can’t use the script and you should then use a packaged installer from Odoo. You can find more info on https://www.odoo.com/documentation/11.0/setup/install.html#packaged-installers
Hi,
Out of curiosity, will using this script allow a pull of latest updates from gihub?
Hi DOB,
Yes it will. You can update with a simple git fetch at any moment.
Hello Yenth,
Thanks a lot for your very informative information and I really appreciate the knowledge you pass on to others.
I would really appreciate if you can post an article about running Odoo 11 with HTTPS.
Thanks a lot
Hi Ahmed,
Thanks a lot for the positive feedback! Creating a tutorial for Nginx / HTTPS is on the roadmap, just haven’t found time to write it yet.
Dear Sir:
ODOO 11 Script…
mkdir: cannot create directory ‘/odoo/enterprise’: Permission denied
mkdir: cannot create directory ‘/odoo/enterprise/addons’: No such file or directory
why ?
Hi Jason,
You don’t have enough rights to make folders in that location. You are either running that script with not enough rights or you are trying to install it in an odd place where you really shouldn’t.
Hello i have install odoo with your script but when i put my custom modules in the /odoo/custom/addons i cant see the apps
can you advise how i should run my custom modules
Hi Poul,
You probably didn’t add /odoo/custom/addons in your Odoo configuration file yet (under /etc/). Only after adding the path and restarting the service your Odoo will be able to find the apps.
Hi Yenthe,
I want to install odoo11 (community) on ubuntu14.04 LTS.
may I ?
Hi Saung,
Ofcourse! Both Odoo and my script are fully open source so you’re good to go. 😉
Hi Yenthe
I have installed odoo 11 with your script. Added the custom addons folder path to odoo config file under etc. Restarted the odoo server. Clicked on update apps list but I cannot view my custom modules in apps list. I think odoo cannot find my addons folder. Permissions are also allowed for that directory to odoo user. No errors appear on log file. Kindly help.
—-My Config File———————————
[options]
; this is the password that allows database operation:
admin_passwd=****
db_port=5432
db_user=user_name
xmlrpc_port=8069
logfile=/var/log/odoo/odoo-server.log
addons_path=/odoo/enterprise/addons,/odoo/odoo-server/addons,/odoo/custom/addons
Hi David,
Judging by the config and information you’ve added everything looks well. It has to be some issue with security rights or a misconfiguration of the subfolders (which I can’t see)
Hi Yenthe,
I would like to use Pycharm for development, is there a way to do it? I don’t find a lot of information on the internet about the configuration for odoo 1.
Hi Kenny,
Ofcourse you can! Simply install Pycharm, import the custom apps you want to develop for and you’re set to go.
Great script but how to start odoo with a with a parameter for example: –dev all
$ service odoo-server …… –dev all ….. start
?
Hi Mar,
You do that from the command line. For example:
sudo service odoo-server stop
sudo su odoo
. /odoo-bin -dev all -c /etc/odoo-server.conf
I’m using a modified version of your script to install V12. Looks like there are some new required libraries. I’m playing around with the script to see if I can solve it.
Any thoughts on adding:
sudo pip3 install -r $OE_HOME_ext/requirements.txt
Hi Timd,
I tried it just when Odoo 12 was released but it was not working great out of the box for all Ubuntu versions. It is something I do want to get back to at some point though!