OpenERP Appliance

Collaboration Works

openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

This script automates the setting up of openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4

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/

Requirements: A fresh installation of Ubuntu Server 9.0.4 or Ubuntu Desktop 9.0.4. In both scenarios Apache & Postgres are installed by this script. This means that the script expects these programs to have their default config files. TIP: test this script within a Virtual Machine after installing Ubuntu 9.04 from scratch.

Run the script as non-root with the following commands:

$ sudo apt-get install gzip
$ gzip -d openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh.gz
$ chmod +x openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh
$ ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

You will be asked for:
1) OpenERP Administrator’s password
2) IP address your OpenERP Web service will be listening on
3) Your LANG

The installation process will stop with the following warning if you launch the script through a SSH session:
“This command may affect the current SSH connections. Do you want to continue (y | n)?”
Solution: Press “y” to complete the rest of the process.

The output of the script ends with:

————————————————————————————————————————————————
THE REMAINING STEPS CAN BE CONFIGURED FROM THE WEB INTERFACE (OPENERP WEB)

1. Register the DNS Name “openerpweb.com” with its corresponding IP address (192.168.x.x).
“openerpweb.com” is the external URL of OpenERP Web. Make sure this URL is reachable by your Web clients (Open ERP users)
In Linux this can be done locally by adding the following line to /etc/hosts file:

192.168.x.x openerpweb.com

The hosts file is located in different locations in different operating systems and versions: “http://en.wikipedia.org/wiki/Hosts_file”
The hosts file is a computer file used to store information on where to find a node on a computer network.
This file maps hostnames to IP addresses. The hosts file is used as a supplement to (or a replacement of) the Domain Name System (DNS) on networks of varying sizes. Unlike DNS, the hosts file is under the control of the local computer’s administrator

2. Check with a browser your OpenERP Web URL: “http://openerpweb.com”

3. WELCOME TO OPENERP: -> Click on “Databases” -> CREATE A NEW DATABASE:
3.1  Super Administrator Password: admin
3.2  New Name of the database: xxx
3.3  Load Demo Data (y/n)
3.4  Default language: xxx
3.5  Administrator Password: xxx
3.6  Confirm Administrator Password: xxx

4. WELCOME TO OPENERP:
4.1 Database: xxx
4.2 Administrator Username: admin
4.3 Administrator Password:  xxx
4.4 Click on “Login”

5. INSTALLATION & CONFIGURATION. You will now be asked to install and configure modules and users required by your Enterprise
5.1 Click on “Logout”

6. WELCOME TO OPENERP: You can now log in with the following users
6.1 User “demo” / Password “demo”, in case you clicked on “Load Demo Data”
6.2 User “admin” / Password “xxx”
6.3 Users created by you during step #4
————————————————————————————————————————————————

This script automates the setting up of openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4

Requirements: A fresh installation of Ubuntu Server 9.0.4 or Ubuntu Desktop 9.0.4. In both scenarios Apache & Postgres are installed by this script. This means that the script expects these programs to have their default config files. TIP: test this script within a Virtual Machine after installing Ubuntu 9.04 from scratch.

Run the script with the following commands:

$ chmod +x openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh
$ ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

You will be asked for:
1) OpenERP Administrator’s password
2) IP address your OpenERP Web service will be listening on
3) Your LANG

The installation process will stop with the following warning if you launch the script through a SSH session:
“This command may affect the current SSH connections. Do you want to continue (y | n)?”
Solution: Press “y” to complete the rest of the process.

The output of the script ends with:

————————————————————————————————————————————————
THE REMAINING STEPS CAN BE CONFIGURED FROM THE WEB INTERFACE (OPENERP WEB)

1. Register the DNS Name “openerpweb.com” with its corresponding IP address (192.168.x.x).
“openerpweb.com” is the external URL of OpenERP Web. Make sure this URL is reachable by your Web clients (Open ERP users)
In Linux this can be done locally by adding the following line to /etc/hosts file:

192.168.x.x openerpweb.com

The hosts file is located in different locations in different operating systems and versions: “http://en.wikipedia.org/wiki/Hosts_file”
The hosts file is a computer file used to store information on where to find a node on a computer network.
This file maps hostnames to IP addresses. The hosts file is used as a supplement to (or a replacement of) the Domain Name System (DNS) on networks of varying sizes. Unlike DNS, the hosts file is under the control of the local computer’s administrator

2. Check with a browser your OpenERP Web URL: “http://openerpweb.com”

3. WELCOME TO OPENERP: -> Click on “Databases” -> CREATE A NEW DATABASE:
3.1  Super Administrator Password: admin
3.2  New Name of the database: xxx
3.3  Load Demo Data (y/n)
3.4  Default language: xxx
3.5  Administrator Password: xxx
3.6  Confirm Administrator Password: xxx

4. WELCOME TO OPENERP:
4.1 Database: xxx
4.2 Administrator Username: admin
4.3 Administrator Password:  xxx
4.4 Click on “Login”

5. INSTALLATION & CONFIGURATION. You will now be asked to install and configure modules and users required by your Enterprise
5.1 Click on “Logout”

6. WELCOME TO OPENERP: You can now log in with the following users
6.1 User “demo” / Password “demo”, in case you clicked on “Load Demo Data”
6.2 User “admin” / Password “xxx”
6.3 Users created by you during step #4
————————————————————————————————————————————————

About these ads

June 29, 2009 - Posted by | ERP, Scripting, Turnkey, Ubuntu Desktop, Ubuntu Server Canonical | ,

32 Comments

  1. [...] A Shell script written by the author eases and automates the installation of openerp-server 5.0 with openerp-web 5.0.1 for Ubuntu 9.0.4: http://opensourceconsulting.wordpress.com/2009/06/29/openerp-server-5-0-openerp-web-5-0-1-installati… [...]

    Pingback by Installation of OpenERP Server 5.0, OpenERP GTK Client 5.0 and OpenERP Web Client 5.0.1 on Ubuntu Server 9.0.4 « Open Source Consulting | June 29, 2009

  2. Are there scripts available for other versions lie 8.0 for ubuntu !

    Comment by DSO | July 1, 2009

    • This script only works on Ubuntu Server 9.04 and Ubuntu Desktop 9.04, downloading OpenERP’s binary packages that Ubuntu 9.04 provides and fixing specific bugs. I highly recommend that you first test it on a fresh install of Ubuntu 9.04 running on a Virtual Machine guest.

      Comment by opensourceconsultant | July 1, 2009

  3. Thanks for this script. All seems to work now!

    Very convenient you made this script, saves me a lot of work.

    My compliments

    Comment by Michael | July 3, 2009

  4. All seems to work well when connecting at localhost:8080 on the same machine

    I have tried to reach the OpenERP web interface with another client in the same subnet but it seems that it is firewall ed on some manner.

    I have Googled to solutions but they all come with different config files especially for the eTiny web server.

    ——>Does your script set some firewall rules on connections from other machines and prevent using the OpenERP Web application?
    I have tried to delete all the iptables rules, but then the Web application on localhost:8080 does not work anymore. Seems that “some” iptables rules are required…

    I have found two files related to the configuration of OpenERP:

    /etc/openerp-server.conf
    /etc/openerp-web.cfg (which is actually a link to /usr/lib/python2.5/site-packages_web-5.0.1_0-py2.5.egg/config/default.cfg)

    I know the solution must be found in changing these files somehow to fit my environment (see below)
    ——>Which parts in particular?

    My environment:
    I have made a Virtual Machine and installed Ubuntu 9.04 from scratch
    This virtual machine runs in a bridged network
    The host is Fedora 11
    I can perfectly reach both machines via the network (both have same subnet).

    At the moment the OpenERP web server runs at 192.168.1.126
    My Fedora host is at 192.168.1.102

    Any hints are welcome.
    Thanks in advance

    Comment by Michael | July 5, 2009

    • Hi Michael,

      The script blocks all the incoming traffic with a firewall. Only the following ports are allowed: “ssh, http, https” (port 8080 is closed)
      This configuration is achieved with the following commands:
      #Block OpenERP Web server port 8080 with a firewall
      sudo ufw enable
      sudo ufw allow ssh
      sudo ufw allow http
      sudo ufw allow https

      Apache is serving all the external HTTP requests, by redirecting HTTP traffic to HTTPS and by proxying 80 port to the internal 8080 port (where our OpenERP Web Server is listening on):

      ProxyRequests Off
      ProxyPass / http://127.0.0.1:8080/
      ProxyPassReverse / http://127.0.0.1:8080/
      ….

      Possible solution:
      Add (or modify) the following line to /etc/hosts file in your Host/Fedora 11:

      192.168.1.126 openerpweb.com

      And check with a browser the following URL from your Fedora 11: http://openerpweb.com
      Pay attention to the final output of the script, as it details the remaining setting up from the Web interface.

      My Ubuntu’s Virtual Machines are running on Fedora 11 KVM and were easily set up by “virt-manager”.

      Hope this answers your question. Thanks for your feedback!

      Comment by opensourceconsultant | July 5, 2009

    • Hey,
      I’m Having A little problem with these hosts aswell.
      On our company router there is only one port open namely 3389
      the router is forwarding this port to a local ip address 192.168.0.5 on the same port. How can I solve this problem and have the option to connect to the openerp server from outside the company. Please help me out here.
      Kind regards

      Comment by edg1 | November 3, 2009

      • Hi edg1,

        What OS is running on 192.168.0.5? One solution is Apache’s mod_proxy for internal/external HTTP proxying to other servers on other ports (proxypass, reverseproxypass, etc). Port forwarding with IP rewriting could be achieved with iptables (linux), but the first solution is simpler.

        Comment by opensourceconsultant | November 4, 2009

  5. It works now!
    Thanks you so much.
    Thanks to your tip:
    ——
    Add (or modify) the following line to /etc/hosts file in your Host/Fedora 11:

    192.168.1.126 openerpweb.com
    ——

    This was the only thing I had to do :-)

    Again my compliments

    Michael

    Comment by Michael | July 5, 2009

  6. Dude, huge props for an all in one script like this. I just ran it on a machine I had half configured and it looks like it is working. Amazing.

    Only thing is it is not liking my password, perhaps something changed it along the way, I’ll have a look.

    The only other problem is the openerp server wasn’t started so I had to manually start it. But I can add that to rc.

    Once again, THANK YOU!

    Comment by Paul Drayton | July 14, 2009

    • Weird… openerp-server should be started automatically by default.

      Openerp-Web is set up by this script to automatically start on system startup (openerp-web is not yet an ubuntu package)

      The script is only supposed to work on fresh installations of Ubuntu 9.04

      Comment by I. Fernández | July 16, 2009

  7. using this script to install openerp on ubuntu9.04 server,but there are a syntax error: “sh: 72: syntax error: “(” unexpected (expecting “done”)
    my language is chinese.

    Comment by hu | July 17, 2009

    • A new update of the script has been uploaded after adding a few semicolons. There’s no need though..

      Change applied in line #72:

      for lang in `apt-cache pkgnames language-pack-gnome- | grep -i base`;
      do
      array=( “${array[@]}” “$lang” )
      done

      Comment by opensourceconsultant | July 20, 2009

  8. Hello. Thank you for this great info! Keep up the good job!

    Comment by johnny | August 7, 2009

  9. Thank you so much for this script.

    I could install openerp 5 on ubuntu 9.04FR.
    I could create a new openerp database
    and connect with both openerp-client and https://openerpweb.com.

    But now, it is impossible to add new modules :

    Any help is welcome
    Thanks in advance

    Python 2.5.4: /usr/bin/python2.5
    Sat Aug 8 13:34:47 2009

    A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
    /usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py in _run(self=)
    119 applyFilters(‘before_main’)
    120 if self.execute_main:
    121 self.main()

    Comment by Gilles | August 8, 2009

    • Sorry , it works now, I just had to restart my virtual machine

      Comment by Gilles | August 8, 2009

  10. Hello,
    Sorry for seeming a bit stupid ;)
    I have tried to install this script on a fresh VB Kubuntu 9.04:
    ~$ sh openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

    I typ in my admin password -> “enter”
    then do “enter” for the IP
    and get:
    72: Syntax error: “(” unexpected (expecting “done”)

    What am I doing wrong?

    Thank you for any help

    Comment by Fred | August 11, 2009

    • Hi Fred,

      Make sure your script version is V1.1 by looking at the beginning of the script. That’s the version available on the current link.

      I tested it out without getting that error. I am able to type admin password and IP address, and get the default values by entering ENTER.

      This is the related code that can be used for testing:

      echo
      echo “—————————————————————————”
      echo “Please enter the Administrator Password ”
      echo “You will need to remember this password to administer your database ”
      echo “Press ENTER for default one (openerp)”
      echo “—————————————————————————”
      read passwvar
      if [ -z "$passwvar" ];
      then
      passwvar=openerp
      fi
      echo “\”your Administrator Password is\” = “$passwvar””
      echo
      echo “———————————————————————”
      echo “Modifying /etc/hosts file. Enter your IP address: ”
      echo “Press ENTER for default one (127.0.1.1)”
      read ipaddrvar
      if [ -z "$ipaddrvar" ];
      then
      ipaddrvar=127.0.1.1
      fi
      echo “\”your IP address is\” = “$ipaddrvar””
      echo “———————————————————————“

      Comment by I. Fernández | August 11, 2009

      • Hi I.Fernandez,

        Thank you.

        I have version 1.1

        I tried this on my HD JJ install as well and get the same error.

        How do I test with “echo”.
        Sorry am not 100% cli advanced :(

        Comment by Fred | August 11, 2009

  11. 1) Copy the previous code to a new file like “test.sh”
    2) Add the line “#!/bin/bash” to the beginning of that file.
    3) ~$ chmod +x test.sh
    4) ~$ ./test.sh

    BTW, I run my script with the following commands:

    $ chmod +x openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

    $ ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

    Comment by I. Fernández | August 11, 2009

  12. Thank you for that.

    Looks like:
    ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

    did the trick. Installing now.

    Will repost back if i have any install problems.
    Cheers

    Comment by Fred | August 11, 2009

    • Install went perfectly. Now I can test.

      Thank you very much for the script and the help.

      Will post this on the kubuntu forum for others to read.

      Cheers

      Comment by Fred | August 11, 2009

  13. New installer of OpenERP 5.0.2 for Linux is now available at:
    http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/

    Comment by I. Fernández | August 14, 2009

  14. Hello,
    the install went well on a virtual machine so I decided to try it on a fresh 9.04 server install.

    The install goes as planned but giving openerp,com into my browser just shows me the tomcat “It works” page.

    What do I need to tweek?

    Comment by Fred | August 21, 2009

    • Hi Fred,

      Make sure your DNS name of your OpenERP web service is available from your browser/PC. Apache is set up with “ServerName” and “VirtualHosts” directives: the OpenERP Web backend is transparently reached when Apache (which acts as frontend) receives the corresponding DNS name for OpenERP. This behaviour can be easily changed if you are familiar with Apache settings.

      The DNS name by default is “openerpweb.com”. The output of the script explains how to modify your local DNS system.

      BTW, this script with OpenERP 5.0.0-3-1 and OpenERP Web 5.0.1 is now obsolete. OpenERP 5.0.2 is already stable and easier to set up. I recommend you my last post: http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/

      Comment by I. Fernández | August 21, 2009

  15. Sorry that was a typo.
    It should read: openerpweb.com

    I used the default DNS at install.

    This is my /etc/hosts file:
    127.0.0.1 localhost
    127.0.1.1 fintanerp.quicknet.ch fintanerp
    127.0.1.1 openerpweb.com

    I tried the new script but it tells me it can only install on 8.04. I guess it doesn’t like 9.04 :(

    Comment by Fred | August 21, 2009

  16. Modify your /etc/hosts to only have one line per IP address:

    127.0.0.1 localhost
    127.0.1.1 fintanerp.quicknet.ch fintanerp openerpweb.com

    The new script requires you to install 8.04. Ubuntu Server 9.04 is not compatible nor tested with OpenERP. This is why Ubuntu 9.04 is so trouble when installing OpenERP: basically OpenERP is not yet compatible with 9.04’s python 2.6.

    Ubuntu 8.04 LTS Server is “Long Term Support” (mantained until 2013), while 9.04 is only supported until 2010.

    Ubuntu 8.04 is officially supported by OpenERP 5.0.2. My recommendation is to set up OpenERP 5.0.2 on Ubuntu 8.04.3 LTS Server if you want to avoid troubles. This is why the script expects to deal with this release.

    Comment by I. Fernández | August 21, 2009

    • Okay my /etc/hosts now reads:
      127.0.0.1 localhost
      127.0.1.1 fintanerp.quicknet.ch fintanerp openerpweb.com

      Still getting the tomcat page ???

      It worked fine on my 9.04 quest vmware installation.

      Comment by Fred | August 21, 2009

      • tomcat? Tomcat is not installed by the script nor is required by OpenERP. Install a fresh copy of Ubuntu Server without Tomcat.

        Try the new script out on 8.04 and if you continue having problems I do recommend you to become familiar with Apache & OpenERP Web.

        Comment by I. Fernández | August 21, 2009

  17. Hi !

    Thanks you for this “easy-to-use” script !
    I install it and its work well. After that, I try to install phpldapadmin in order to administrate my ldap server and when I open the URL I have this error message from cherrypy :

    NotFound: (404, “The path ‘/phpldapadmin’ was not found.”)

    I guess its a problem with the redirection from apache ? I try to find where I can fix it but without success. Can you help me please ?

    Thanks a lot

    Corentin

    Comment by Corentin | September 11, 2009

  18. Apache config files:

    /etc/apache2/sites-enabled/000-default
    /etc/apache2/sites-enabled/default-ssl
    /etc/apache2/apache2.conf

    AFAIK OpenERP is unable to work properly with relative URLs (http://servername/openerp). I made a simple config on Apache to redirect all the incoming traffic to localhost on port 8080 (OpenERP). This is just simple and fine on dedicated virtual or physical systems.

    BTW, this post is obsolete. Take a look at:
    http://opensourceconsulting.wordpress.com/2009/09/09/openerp-5-0-3-installer-for-dummies/

    Comment by I. Fernández | September 11, 2009

  19. [...] script d’installation automatique (ubuntu 9.04) pour openerp-server et client + webclient. Utilise les paquets officiels + patchs dont quelques passages sont repris dans cette page. En gros, ce script reprend le contenu de HowToforge – openerp – jaunty (mêmes posteurs…). [...]

    Pingback by OpenERP (anciennement TinyERP) « john-web | November 21, 2009


Sorry, the comment form is closed at this time.

Follow

Get every new post delivered to your Inbox.

Join 31 other followers

%d bloggers like this: