I created a install script for ODOO on a brand new Ubuntu 14.04 server. This script can be used for installing 7.0, saas-4, saas-5 (new after Opendays) and master branches of the ODOO server.
If you are looking for a ODOO v8 install script take a look at: ODOO v8 Install Script
The install script can be found here:
[AdSense-A]
https://github.com/aschenkels-ictstudio/openerp-install-scripts/blob/master/odoo-saas4/ubuntu-14-04/odoo_install.sh
In the script there are some parameters you can set at this time:
Versions
OE_VERSION: choose the ODOO version you want to install 7.0, saas-4 or master (trunk)
General OpenERP Settings
OE_USER: the user the odoo deamon uses
OE_HOME: the folder where the odoo-server resides
OE_CONFIG: the name of the config file
If you want to use the script copy the file to the server or paste the contents in a odoo_install.sh file.
Make the file executable and start with ./odoo_install.sh
[AdSense-B]
If you have run the script you should have a working ODOO server wich is available at: http://ipadress-server:8069
The server will auto start on reboot and you can start en stop the OpenERP server with /etc/init.d/odoo-server stop (to stop) or /etc/init.d/odoo-server (to start)
——- Changes ——–
[FIX] conf file location 15-06-2014
hai André,
im newbie
how about the postgresql password, is null or have a default password? or it use OE_SUPERADMIN=”superadminpassword”
thanks
There is no postgres password when you use the install script. The authentication is done through peer authentication and only internally on the server so not from outside. If you want to access the database you’ll need to add a postgres (super)user for yourself and add some stuff in pg_hba.conf file or access the database through the terminal:
sudo su postgres
psql database name
hi Andre, I have also some trouble to get the use the script successfully. I am trying to twea it for the ocb-7.0-server (github.com/OCA/OCB) though. One problem I have identified is in line 84. The path to the config file should be $OE_HOME_EXT/install/openerp-server.conf.
Still I have another problem. When I am doing /etc/init.d/ocb-server start I get a “unable to open pidfile ‘/var/run/ocb-server.pid’ for writing (permission denied).
When I ‘sudo’ that it looks like the server would be started but actually it doesn’t(“Connection refused” in my browser and also ‘failed to kill xyzx’: no such process’ when I am trying to stop the server
I’ll make a script for the OCB versions of the OCA. This will also get on my TODO list.
that would be great! I am trying to get it done now the 5th time or so/ splitted it into 3 partial scripts to find errors. One thing I have noted is that somehow the /.git folder into $OE_HOME_EXT disappears in the process. I am a bloody beginner with github but I understand that once that happens the local directory you cloned into is not a git repository anymore…. If I am not mistaken that means you can not update this installation using git anymore, right?
I thought using git to update your installation was the whole point behind choosing this method instead of ‘apt-get install odoo’, isn’tit?
Would you mind to explain what is the idea behind removing the .git folder? …. thanks a million
Tried to install “master” and “8.0” today using the script, both failed. I used it for ‘saas 5’ two weeks ago with success. Can you have a look and advise me please.
I tested with 8.0 and there are some changes in the structure of 8.0 and some extra dependicies. I adjusted the script and will publish the new working one!
Thanks Andre you are the best!
Hi, nice script! is there any quick way to have trunk update from github to the newest version?
Hi André
Thank you for your effort but unfortunately the script isn’tworking for me. I have a fresh 14.04 x86 Vagrant Image and get this output on the terminal.
Any thoughts
—- Setting permissions on home folder —-
* Create server config file
cp: cannot stat ‘/opt/odoo/odoo-server/install/openerp-server.conf’: No such file or directory
chown: cannot access ‘/etc/odoo-server.conf’: No such file or directory
chmod: cannot access ‘/etc/odoo-server.conf’: No such file or directory
* Change server config file
sed: can’tread /etc/odoo-server.conf: No such file or directory
sed: can’tread /etc/odoo-server.conf: No such file or directory
* Create startup file
* Create init file
* Security Init File
* Start ODOO on Startup
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Adding system startup for /etc/init.d/odoo-server …
/etc/rc0.d/K20odoo-server -> ../init.d/odoo-server
/etc/rc1.d/K20odoo-server -> ../init.d/odoo-server
/etc/rc6.d/K20odoo-server -> ../init.d/odoo-server
/etc/rc2.d/S20odoo-server -> ../init.d/odoo-server
/etc/rc3.d/S20odoo-server -> ../init.d/odoo-server
/etc/rc4.d/S20odoo-server -> ../init.d/odoo-server
/etc/rc5.d/S20odoo-server -> ../init.d/odoo-server
Done! The ODOO server can be started with /etc/init.d/odoo-server
I believe Odoo moved some stuff to a different directory. I’ll review my script and publish the changes.
Hi Raphael,
See my comment.
That will help until André has changes his Script.
Stefan
Andre, first of all thanks for such an awesome script. I cringe when I remember how time consuming my previous installs were. This makes things so much easier. I ran your script on a fresh Ubuntu 14.04 server and it ran without error. I started the server with the init script and that worked fine too. We I connect with the web browser on :8069, and try to create a new database, I get access denied. I’m using the default admin password but no luck. Any ideas?
Hi Aaron,
If you use the Script without changes the password is “superadminpassword”
Good luck
Stefan
Hi André,
first I have to thank for the great doing!
Some days ago I did try the script an it worked fine.
Last weekend I installed a new server, Ubuntu 14.04, and the script didn’twork. I got permission error and file not found error.
So I changed two things:
echo -e “\n—- Setting permissions on home folder —-”
==> sudo chown $OE_USER:$OE_USER $OE_HOME <==
sudo chown -R $OE_USER:$OE_USER $OE_HOME/*
I inserted this line, because without that I had no permission to do the next steps
("—- Create custom module directory —-")
Later I had to change the path to the configuration file
echo -e "* Create server config file"
sudo cp $OE_HOME_EXT/setup/debian/openerp-server.conf /etc/$OE_CONFIG.conf
That's because at https://www.github.com/odoo/odoo there's no subdirectory "install".
Many thanks again,
Stefan
thanks for the feedback, and sorry I am lacking knowhow and understanding to really be helpful i fear.
Well …
https://launchpad.net/ocb-server is the launchpad site https://github.com/OdooCommunity is the github site for the community assoctiation which I believe maintains the so called ocb-server.
A search for the term ‘ocb-server’ on github turns back empty. It is the first time I ever visited github, so I am not sure whether that means ‘it is not there’ or you ‘just need to search different’
thanks Gunnar
hi Andre,
could you add an option for the “community backports” branch in line 25? Honestly I am not 100% sure whether they have manage to move that over from launchpad/bzr even yet, but if so it would be great to have that option to complete the script I think.
When it’s available on Github I will add it to the options. If you know the name you could set it yourself. Or give me the name?
after using your script, how would one update (master) ?
Can you explain the different Branches of the Odoo git repository?
Printing an invoice gives an error: “Report – Unable to find Wkhtmltopdf on this system. The report will be shown in html.” [master installation]
Okay so we need to add an extra dependicy. Thnks for informing me.
I’ve got an error about a encoding UTF8 template on creating a new database.
Howto fix:
su postgres
psql
UPDATE pg_database SET datistemplate = FALSE WHERE datname = ‘template1’;
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = ‘UNICODE’;
UPDATE pg_database SET datistemplate = TRUE WHERE datname = ‘template1’;
\q
exit
Mario,
Did you use an clean Ubuntu 14.04? Or did you try an other distro?
Do you know at wich part of the script the error occurs?
Regards,
André
Hello André,
I’ve used the Ubuntu 14.04 OpenVZ template. The install script didn’tgive any errors.
Regards,
Mario
Okay. I’ll investigate. The script uses the saas-4 branch. You could try changing it to master.
But I’ll try doing the same thing here.
Regards,
André
Thank you for this! The script runs smoothly on a fresh server until the Installation of ODOO server… the following error is returned “fatal: could not create work tree dir ‘odoo’.: Permission denied” … any ideas?
I changed the script. It should work now. Could you reply if you find any problems?
Busy running the script now… picked up a typo on line 23…
Thank you André… permission errors are resolved, the script finished successfully , server did not start successfully after using “odoo-server start” but after rebooting I could access via 8069 , when doing a restart or force-reload ubuntu failed to kill the process “No such process”… after the reboot however everything seems 100% … sincerely appreciated!!
Fixed the typo and run the script on a clean ubuntu 14.04 running smooth with me now.