openerp-allinone-setup-5.0.2-0.sh
This script automates the setting up of openerp-server-5.0.2-0 & openerp-client-5.0.2-0 & openerp-web-5.0.2-0 on Ubuntu 8.04.3 LTS (Server and Desktop).
The Goal is to provide an All in one installer of OpenERP for Linux.
This post is now obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/08/25/openerp-5-0-3-all-in-one-installer-for-ubuntu/
Requirements: A fresh installation of Ubuntu 8.04.3 LTS Server or Desktop without Apache nor Postgres. Only the core of the system is needed, so during the installation of your Ubuntu Server don’t select software to install like LAMP Server or PostgreSQL Server in the “Software Selection” menu (except for OpenSSH Server). This script installs Apache and Postgres and expects to deal with default config files.
TIP: test this script within a Virtual Machine after installing Ubuntu 8.04.3 LTS from scratch. Run the virtual machine in a bridged network (host and guest have same subnet and can be reached from the LAN).
Tested on:
- Ubuntu 8.04.3 LTS Server, computer platform amd64 (64 bits)
- Ubuntu 8.04.3 LTS Desktop, computer platform i386 (32 bits)
Run this script as non-root with the following commands:
$ gzip -d openerp-allinone-setup-5.0.2-0.sh.gz
$ chmod +x openerp-allinone-setup-5.0.2-0.sh
$ ./openerp-allinone-setup-5.0.2-0.sh
You will be asked for:
1) DNS name of your URL
2) IP address your OpenERP Web service will be listening on
3) OpenERP Database Admin Password
4) SSL Certificate settings of Apache SSL
Additional info:
- Before running the script set up the network of your Ubuntu system. It should be reachable from your PC (client side) via ping. Make a note of the correct IP address.
- While running the script enter the previous IP address.
- The script only modifies the server side. The DNS system needs to be updated on your LAN’s DNS server or your PC’s hosts file (http://en.wikipedia.org/wiki/Hosts_file). Take a look at the end of the script as important info is given.
- The “invalid security certificate” error message is correct as the SSL certificate has been created for testing purposes.
- /opt is the working directory where .tar.gz files are downloaded.
- Apache is configured as a front-end for OpenERP Web and redirects all the incoming HTTP traffic to HTTPS.
- Ubuntu’s firewall is setup with the following ports open: SSH, HTTP, HTTPS, 8069 & 8070 (for remote access of OpenERP GTK clients).
- Startup/init scripts for openerp-server and openerp-web are added.
- OpenERP Web 5.0.2 has been tested by Tiny and Axelor on Debian Etch and Ubuntu Hardy.
- Package python-xml is broken in Ubuntu 9.04
- Ubuntu 9.04 is not LTS (Long Term Support)
- Ubuntu 8.04.3 LTS provides Postgresql 8.3 & Python 2.5.2, which are compatible with OpenERP 5.0.2.
- OpenERP 5.0.2 is not yet compatible with Ubuntu 9.04′s default python 2.6, but it can be run on 9.04 with /usr/bin/python2.5 (package python2.5).
- OpenERP 5.0.2 All-in-one installer for windows is recommended for beginners.
- This script eases the setting up of OpenERP 5.0.2 for Linux, but still requires some technical knowledge (and custom improvements?). OpenERP for Ubuntu Linux is recommended on production systems.
Startup/init scripts:
- /etc/init.d/openerp-server
- /etc/init.d/openerp-web
The script ends pointing out the URL of your OpenERP Web and its corresponding passwords.
Disclaimer: Although this new installer is simpler than the one I created for OpenERP Web 5.0.1 on Ubuntu 9.04, more testing is recommended. At the moment I’m happy with the initial results.
I. Fernández
21 Comments
Sorry, the comment form is closed at this time.



Hey, thanks for the clean script!
I had tried your 9.04 walk-through several times over the weekend and still problems (seems one program upgraded from 5.0.0.1 to 5.0.0.2 and maybe turbogears vs cherrypy issues now). 9.04 is only good through 2010 while 8.04 is still ok through 2013! Gave up on the 9.04 and then ran this one with quick success!
One thing I found after using this script is that it’s hard to access the local machine from my LAN after updating /etc/hosts and the two /etc/…apache2…default and …default-ssl with external IP addresses (don’t just use default openerpweb.com!). I’m configuring with the lan now after putting comment”#”s at the beginning of all the external web references in those three files. When done I’ll remove the comment”#”s and restart apache2.
I’m using opendns to handle a dynamic internet access point.
Note: Whole system is running on a Pentium2@333Mhz and 128MB ram with 40GB HDD. Won’t be permanent there but for testing it’s ok.
I installed a clean 8.04 server without tomcat as suggested.
I set my computername to the one I gave during install.
My /etc/hosts read:
127.0.0.1 localhost
127.0.1.1 fintanerpws1.quicknet.ch fintanerpws1 openerpweb.com
opening openerpweb.com gives:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.2.8 (Ubuntu) mod_ssl/2.2.8 OpenSSL/0.9.8g Server at openerpweb.com Port 443
Sorry for being tedious but this worked fime on my vm guest.
Ideas?
Maybe you just need to restart Apache or Ubuntu. Take a look at Apache’s logs to troubleshoot the problem. It seems like your Apache already had other configuration.
Make sure your Ubuntu Server _only_ contains the core by reinstalling 8.04 from scratch. Follow these instructions:
Only the core of the system is needed, so during the installation of your Ubuntu Server don’t select software to install like LAMP or PostgreSQL in the “Software Selection“ menu (except for OpenSSH Server). This script installs Apache and Postgres and expects to deal with default config files.
Thank you,
I did a core install just with samba as I need that.
restarting apache gives:
fintanerp@fintanerpws1:~$ sudo /etc/init.d/apache2 restart
sudo: unable to resolve host fintanerpws1
[sudo] password for fintanerp:
Sorry, try again.
[sudo] password for fintanerp:
* Restarting web server apache2 apache2: apr_sockaddr_info_get() failed for fintanerpws1
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
apache2: apr_sockaddr_info_get() failed for fintanerpws1
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
and I still get the “temporarily unable…” error.
I did a bit of playing around and removed openerpweb.com from host and running openerpweb.com gives me this page:
http://www.itvision.ie/
I guess I will do a reinstall and give localhost as my computername
Followup.
Before reinstaklling I put /etc/hosts back to its initial state:
127.0.0.1 localhost
127.0.1.1 fintanerpws1.quicknet.ch fintanerpws1 openerpweb.com
Restarting apache, openerp-server and openerp-web gives:
fintanerp@fintanerpws1:~$ sudo /etc/init.d/apache2 restart
[sudo] password for fintanerp:
* Restarting web server apache2 [ OK ]
fintanerp@fintanerpws1:~$ sudo /etc/init.d/openerp-server restart
Restarting openerp-server: openerp-server.
fintanerp@fintanerpws1:~$ sudo /etc/init.d/openerp-web restart
Reloading openerp-web: start-stop-daemon: warning: failed to kill 7059: No such process
failed.
fintanerp@fintanerpws1:~$
Follow up 2
I reinstalled 8.04 server core no samba, nothing.
Ran the script which went fine.
Gave default for DNS and localhost for computer CH for my country, Bern for state, untersen for city, compamy name and management for section everything else was default
opening openerpweb.com in firefox gave me this warning:
openerpweb.com:443 uses an invalid security certificate.
The certificate is not trusted because it is self signed.
The certificate is only valid for localhost
(Error code: sec_error_untrusted_issuer)
I made an exception for firefox and get the “temporary…..error” again.
retarting apache gives same result.
Restarting erp-server erp-web:
fintanerp@fintanerpws1:~$ sudo /etc/init.d/openerp-server restart
Restarting openerp-server: openerp-server.
fintanerp@fintanerpws1:~$ sudo /etc/init.d/openerp-web restart
Reloading openerp-web: failed.
fintanerp@fintanerpws1:~$
my etc/hosts:
127.0.0.1 localhost
127.0.1.1 fintanerpws1.quicknet.ch fintanerpws1 openerpweb.com
What am I missing?
Three things:
1) Before running the script set up the network of your Ubuntu Server. It should be reachable from your PC via ping. Make a note of the correct IP address.
2) While running the script enter the previous IP address.
3) The script only modifies the server side. The DNS system needs to be updated on your LAN’s DNS server or your PC’s hosts file (http://en.wikipedia.org/wiki/Hosts_file). Take a look at the end of the script as important info is given.
The “invalid security certificate” error message is correct as the SSL certificate has been created for testing purposes.
You can avoid the use of DNS names by modifying Apache’s config files. IMHO I prefer a DNS name rather than a IP name for accessing OpenERP Web.
Thank you for that.
I found my IP address. But that will change everytime I reboot as I am on DHCP network.
So do I rerun the script giving my IP and entering it into hosts?
I am a bit stupid maybe but I am not reaching my server from LAN or another pc (yet) but trying to start weberpweb.com form the server itself.
I did install kubuntu-desktop so I have a gui.
I am testing this for a complete server installation on a clients machine later where I will have a static IP.
Okay I reinstalled core again.
Got my IP:
eth0 = 213.202.48.xx
I can ping from all over.
My /etc/hosts:
127.0.0.1 localhost
#127.0.1.1 fintanerpws1.quicknet.ch fintanerpws1
213.202.48.50 openerpweb.com fintanerpws1.quicknet.ch fintanerpws1
Opening form FF on server:
certificate error -> accept as exception ->
Firefox gives me ““temporary…..error” again.
Same with Konqueror
I am missing something but what?
This worked wonderfully on Virtual box (Just slow)
I’ve found a typo and /etc/hosts was not modified by the script. It’s fixed now.
213.202.48.x is a public IP address. This script has been tested in a virtualized LAN with private IP addresses. This is a server-client architecture and your DNS and network settings can be different from my environment.
This script can also be run on Ubuntu 8.04.3 LTS Desktop. KUbuntu 8.04 is not LTS nor 8.04.3.
Thank you,
So you mean you have updated the script?
Okay, I’ll try that.
I am installing 8.04 server LTS.
Just adding the kubuntu desktop so I have a gui.
Just to copmare I am also installing a 8.04 server on my Vbox (it is very slow)
Indeed, the script has been updated. I forgot to type “sudo sed -i … /etc/hosts” instead of just “sed … /etc/hosts”.
Ubuntu server is lighter (and faster) than Desktop. But if you want a GUI the script was successfully run on Ubuntu 8.04 LTS Desktop. If you want to test it on Kubuntu you will need to modify the line with the “OSREQUIREMENT” constraint.
“OSREQUIREMENT” where do I find that? Open the script in an editor?
Can I just rerun the new script or do I have uninstall the old instance? If yes, how?
Hello.
I ran the new script in vbox 8.04 server with Kubuntu gui.
Opening openerpweb.com gives:
http://www.itvision.ie/
I did not edit:
OSREQUIREMENT
I will try again on my HD install
Followup
I tried the new script on my HD install with my IP address
213.202.38.xxx
Opening openerpweb.com.
FF tries to load with no effect.
Giving up for now. The weather is to nice
I ran the script again on my vbox server 8.04 install with my “now” IP and get this:
Failed to Connect
Firefox can’t establish a connection to the server at openerpweb.com.
Though the site seems valid, the browser was unable to establish a connection.
* Could the site be temporarily unavailable? Try again later.
* Are you unable to browse other sites? Check the computer’s network connection.
* Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.
Run the script on a fresh installation of Ubuntu 8.04.3 LTS Server or Desktop. This means the script cannot be run twice on the same system. In some scenarios it can be necessary to apply some little changes on specific config files (specially those related to Apache as I just got a simple solution that satisfies my needs).
OpenERP Web is listening on port 8080: you can always test OpenERP Web in case Apache is not responding. Please note that port 8080 is closed to external connections due to the firewall.
Kubuntu 8.04.2 is not supported, but the script can be easily modifed to satisfy your needs or somebody else’s requirements. This is GPLv3.
It’s hard to diagnose your technical issues, but I encourage you to first test OpenERP 5.0.2 on Windows as the All-in-one installer for windows is recommended for beginners.
This script is simple enough to ease the setting up of OpenERP 5.0.2 for Linux, but still requires some technical knowledge (and custom improvements?). OpenERP for Ubuntu Linux is recommended on production systems.
Hi.
I tried to remake your script for my Ubuntu 9.04 and got some success. Here are my steps.
1. I changed the records Ubuntu 8.04 LTS with Ubuntu 9.04.
2. Unfortunately I have a bad internet so when downloading archives from openerp.com my download restarted few times and I turned off the wget lines, downloaded archives manually and placed them to /opt (manually).
3. Because of the same bad internet I also turned off apt-get updates and upgrades off (manually).
4. I have python2.6 installed and if I use python command by default it uses python2.6 binary and offcorse installs openerp-web to it’s dist-packages folder so on install string I replaced python with python2.5.
Also it would be great to make a link for openerp-client in main menu.
Hi Eugene,
Thanks for your feedbak and suggestions. I will consider to make the script compatible with Ubuntu 9.04 like I did with my post about OpenERP Web 5.0.1.
Is python-xml package already fixed on Ubuntu 9.04? If not PyXML could be downloaded from “http://freefr.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz”
[...] This post is now obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/ [...]
[...] This post is now obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/ [...]