How to install OpenERP V7.0 on Ubuntu 12.04 from launchpad repository?
17 Answers
OpenERP V7.0 installation on ubuntu 12.04 x64 Server
just after a clean installation of ubuntu 12.04 x64 Server LTS
Commands are complete so you can copy paste these commands below to and complete the process as a newbie.
Installation from launchpad makes update and patching easier. If you just want to try openERP I recommend you to install with a .deb package. Installation with .deb package just takes 1-2 minutes.
Update apt source list
sudo apt-get update
Download and install updates
sudo apt-get upgrade
install required packages for openerp
sudo apt-get install graphviz ghostscript postgresql-client \
python-dateutil python-feedparser python-matplotlib \
python-ldap python-libxslt1 python-lxml python-mako \
python-openid python-psycopg2 python-pybabel python-pychart \
python-pydot python-pyparsing python-reportlab python-simplejson \
python-tz python-vatnumber python-vobject python-webdav \
python-werkzeug python-xlwt python-yaml python-imaging
install some other packages that we will probably need in future
sudo apt-get install gcc python-dev mc bzr python-setuptools python-babel \
python-feedparser python-reportlab-accel python-zsi python-openssl \
python-egenix-mxdatetime python-jinja2 python-unittest2 python-mock \
python-docutils lptools make python-psutil python-paramiko poppler-utils \
python-pdftools antiword postgresql
install gdata client (since ubuntu package is old we download and install from source)
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.tar.gz
tar zxvf gdata-2.0.17.tar.gz
cd gdata-2.0.17/
sudo python setup.py install
create a new openerp system user for openerp and other related processes
sudo adduser openerp --home /opt/openerp
Create database user for openerp
cd ..
sudo -u postgres createuser -s openerp
move to the install directory
sudo su openerp
mkdir /opt/openerp/v7
cd /opt/openerp/v7
run the bazaar to download the latest revision from launchpad
(this will take long if an error occurs just rerun command)
bzr branch lp:openerp-web/7.0 web
(this will take longer if an error occurs just rerun command)
bzr branch lp:openobject-server/7.0 server
(this will take much more longer if an error occurs just rerun last command)
bzr branch lp:openobject-addons/7.0 addons
It would be nice if you check if the downloaded revision no pass the tests from http://runbot.openerp.com
Exit from openerp user shell
exit
Copy OpenERP configuration file to /etc
sudo cp /opt/openerp/v7/server/install/openerp-server.conf /etc/openerp-server.conf
Edit the configuration file
sudo nano /etc/openerp-server.conf
Write your database operation password and remove the semicolon of that line. Also add the addons_path to the end of file, my file looks like below.
[options]
; This is the password that allows database operations:
admin_passwd = PASSWORD
db_host = False
db_port = False
db_user = openerp
db_password = False
addons_path = /opt/openerp/v7/addons,/opt/openerp/v7/web/addons
;Log settings
logfile = /var/log/openerp/openerp-server.log
log_level = error
Change the file permissions and file ownership to the openerp user.
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf
Create log directory for openerp
sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp
Copy Logrotate file from source to /etc/logrotate.d folder
sudo cp /opt/openerp/v7/server/install/openerp-server.logrotate /etc/logrotate.d/openerp-server
sudo chmod 755 /etc/logrotate.d/openerp-server
Run the server
sudo su openerp
cd /opt/openerp/v7/server/
./openerp-server -c /etc/openerp-server.conf &
test your installation from http://yourserverIP:8069 you should see screen below.
Starting Server Up Automatically
After playing with init script in source I decided to use Open Sourcerer's init script since it is clean and nice. You can download the original from: http://www.theopensourcerer.com/wp-content/uploads/2012/12/openerp-server
We just need to change the location of the daemon. below is the init script you can copy paste this to the file.
#!/bin/sh
### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enterprise Resource Management software
# Description: Open ERP is a complete ERP and CRM software.
### END INIT INFO
PATH=/bin:/sbin:/usr/bin
DAEMON=/opt/openerp/v7/server/openerp-server
NAME=openerp-server
DESC=openerp-server
# Specify the user name (Default: openerp).
USER=openerp
# Specify an alternate config file (Default: /etc/openerp-server.conf).
CONFIGFILE="/etc/openerp-server.conf"
# pidfile
PIDFILE=/var/run/$NAME.pid
# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c $CONFIGFILE"
[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0
checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d /proc/$pid ] && return 0
return 1
}
case "${1}" in
start)
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
stop)
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
echo "${NAME}."
;;
restart|force-reload)
echo -n "Restarting ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
sleep 1
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
You can download this edited copy with the following command First Exit from openerp users shell
exit
sudo nano /etc/init.d/openerp-server
Make the init script executable.
sudo chmod +x /etc/init.d/openerp-server
Add openerp-server to system startup
sudo update-rc.d openerp-server defaults
Restart the server to check if init script works
sudo shutdown -r now
After restart you should be able to connect to the server via http://yourip:8069
Notes:
- Used some parts from this nice tutorial: http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/
- I tested above commands with a clean ubuntu 12.04 install and OpenERP works as expected.
To update this installation to the latest revision
sudo /etc/init.d/openerp-server stop
sudo su openerp
cd /opt/openerp/v7/addons/
bzr pull
cd /opt/openerp/v7/web/
bzr pull
cd /opt/openerp/v7/server/
bzr pull
It would be nice if you check if the downloaded revision no pass the tests of http://runbot.openerp.com You should run the server with your database name and update your database with the following command.
./openerp-server -c /etc/openerp-server.conf -u all -d YOURDATABASENAME
To Apply a Patch
To apply a patch you should have a patch file or URL of the patch file.
Cd to the project folder (addons,web,server etc).
apply patch with bzr command bzr patch
.
to apply a patch to the addons branch:
cd /opt/openerp/v7/addons/
bzr patch PATCH_FILE_NAME_OR_URL
To install an additional independent V7 test server on the same OS
On production you would need to test some code changes or patches or some new modules. To be able to test without risking your production server a test server is a good idea. Best option is to have a virtual machine with openerp installed. However if you like to have an seperate openerp setup.
coming...
Notes:
Why 64 bit not 32
I am using an x64 version of ubuntu because my server has more than 4GB of RAM. And 64 is bigger than 32 :) "Unless you have specific reasons to choose 32-bit, we recommend 64-bit to utilise the full capacity of your hardware." https://help.ubuntu.com/community/32bit_and_64bit you can read related article.
openerp user
My openerp user is just a normal user (not a system user) who can login to the system. I choose to have it this way since I login as openerp user and do required tasks with this uid. You should select a secure password. Some Linux experts thinks this is not secure enough, keep in mind.
Postgresql openerp role
openerp postgresql role is superuser in my installation, it is not required to but it is easier for me. Some Linux experts thinks this is not secure enough, keep in mind.
init.d script for autostart
I just found out that there is also a suitable init.d script for debian already "hidden" :) in the source of OpenERP server in the file /opt/openerp/v7/server/debian/openerp.init
you can change the pathnames and use this file also.
Please give your feedback about instructions above so I can enhance it.
Thanks for feedback @Rex. Your installation is fine do not change anything, please have a look at this video on how to install modules http://youtu.be/S1bKPUL6nUU
@Ahmet, It appears I have a bug (#1094212) for which a patch has been issued. From landing page there is a zip file which contains three files (_init_.py; _openerp_.py; res_partner_.py). But I am unclear from your instructions on how to install this patch. In this format am I just to replace the existing files with those in the zip file? Thanks in advance for your help.
I'm having some issues using this method.When I want to create a database user for openerp with: sudo -u postgres createuser -s openerp I end up getting: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_MESSAGES = "en_CA.UTF-8", LC_COLLATE = "en_CA.UTF-8", LC_CTYPE = "en_CA.UTF-8", LANG = "en_CA.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). could not change directory to "/root"
I'm following the installation step a couple of times and it works well. The remmaining question is regarding the update. Can somebody explain how this really works. Currently I'm stopping the openERP Server with /etc/init.d/openerp-server stop. After that I'm running /openerp-server -c /etc/openerp-server.conf -uall -d <db_name> but no output is given. How do I know the Update runs well? When I can start the regular server again. How can I do this with many databases, one by one? Many thanks for advise
The above mentioned procedure is much too complicated IMHO.
The way I installed OE V7 on Ubuntu 12.04: Add to /etc/apt/sources.lst (warning: no space between http: and //):
deb http://nightly.openerp.com/7.0/nightly/deb/ ./
Reread the sources and get the sources:
sudo apt-get update
Now install openERP and all the dependencies:
sudo apt-get install openerp
Next you have to configure postgreSQL:
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
After typing the password for the user postgres, exit this user:
exit
To be sure, restart the computer:
sudo reboot
Now you can login using the webbrowser.
Updating is easy:
sudo apt-get upgrade
or:
sudo apt-get install openerp
I tested it, works well. It is of course much better to install via package manager, however the Ahmet answer is still very good for inside view of what happens - of course only package maintainers should do this procedure one time, so the other one million people do not need to repeat this - that is what computers are for :)
It seems this method no longer works. Perhaps something in the nightly changed the install process? Idk what it could be but it no longer does the trick. Sucks because it was the fastest and simplest method. Is there another method that is just as fast as this? All the tutorials I come across are much more involved than this and whenever someone else does an install it takes over a day's worth of work and I think there's got to be a better way like this process.
Recently I have experienced problem due to the change of the python version supported by Ubunty. To resolve the issue: 1) create /etc/profile.d/openerp_env.sh and add the following line export PYTHONPATH=/usr/lib/python2.6/dist-packages 2) modify /usr/bin/openerp-server script and replace first line with #!/usr/bin/env python
@Jordan, thanks for this. I will try it out when I get a chance. I tried a million different ways yesterday to install v7 and couldn't get anything to work. I ended up having to use a server image that I took as a backup in order to get it installed correctly. So I will try your method and thanks again for posting.
Hi there,
Both options listed by Ahmet and patrick are just fine and just depends on several factors and the most important of all is how frequently will you update your installation and how many installations do you manage. If they are local installs or installs in the cloud are also points to consider when choosing the right option.
For my specific needs I think that bzr option is preferrable because it allows me to easily update the systems I manage more frequently and the routines listed on the points "bzr branch ...." does not need to be as slow as described if you just want to have the files itself, and not all revisions from launchpad.
You can change the "bzr branch ...." with the "bzr checkout --lighweight lp:xxxxxxxxxx". This way, only the files will be downloaded and not the full revisions and you will be abble to still using bzr pull (thank you odony for your explanations).
Besides that, most of the process can be done automatically via sh script which will handle the hard part of the task. For this you just have to create your .sh file and call it from ubuntu command prompt with "sudo sh /file_location/file_name.sh"
Also note that the launchpad instalation option will allow you to have more control of OpenERP setup process, including where to install, it is easier to maintain and you can use addons sources other than the one used by Tiny ERP (the deb version also allows that but will be harder to maintain).
If you frequently update your OpenERP version, I advise the lanchpad option, if not you can always use the deb version. Remember that everytime you run apt-get update/upgrade with the deb option, ubuntu will make a full download of the deb file located on nightly (about 60MB at this time).
Great posts
Regards
Paulo Matos
hello all, Thank you for the procedure I followed to the letter except that I have a connection problem here is my log: Thank you for your help :-)
2013-07-31 20:42:21,392 2311 ERROR ? openerp.sql_db: Connection to the database failed Traceback (most recent call last): File "/opt/openerp/server/openerp/sql_db.py", line 440, in borrow result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async) OperationalError: FATAL: password authentication failed for user "openerp" 2013-07-31 20:42:21,393 2311 ERROR ? openerp.netsvc: FATAL: password authentication failed for user "openerp" Traceback (most recent call last): File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch return fn(params) File "/opt/openerp/server/openerp/service/web_services.py", line 359, in exp_list cr = db.cursor() File "/opt/openerp/server/openerp/sql_db.py", line 484, in cursor return Cursor(self._pool, self.dbname, serialized=serialized) File "/opt/openerp/server/openerp/sql_db.py", line 182, in __init__ self._cnx = pool.borrow(dsn(dbname)) File "/opt/openerp/server/openerp/sql_db.py", line 377, in _locked return fun(self, args, *kwargs) File "/opt/openerp/server/openerp/sql_db.py", line 440, in borrow result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async) OperationalError: FATAL: password authentication failed for user "openerp" 2013-07-31 20:42:21,397 2311 INFO ? werkzeug: 192.168.1.11 - - [31/Jul/2013 20:42:21] "GET / HTTP/1.1" 500 -*
Please input 2 commands line:
$export LC_ALL=en_US.UTF-8 $export LANG=en_US.UTF-8
Regards from Vietnam.
hey brother, Thanks for the so clear and helpful article. Can I ask a question to you : I want to set up two vertion oe in my ubuntu server.One for demo , and one for test.But I don't know how to configure the second oe.Can I new a postgresql user for the second to solve the problem...And where can I change the 8069 port to other...
Hello,
Thanks for the useful article.
Iâm about to upgrade from v7.0 to v8 (trunk) but before doing that would like to know what would happen to the existing v7 installation. V7 is standard system without any custom modules. Itâs been configured for certain processes and it contains some 20-30 installed modules. Also master data and order data (sales orders, purchase orders etc. ) exists in the system.
In order to âmigrateâ v7 setup to v8 what should I do? Could you still use the Nightly update or should it be done via Launchpad? And which ever is the preferred way, what would be the additional steps required for getting the âmigrationâ done?
After I click "Create Database"
Client Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 774, in create params['create_admin_pwd']) File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 122, in dispatch return fn(*params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 167, in exp_create_database self._create_empty_database(db_name) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 136, in _create_empty_database cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "%s" """ % (name, chosen_template)) File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper return f(self, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute res = self._obj.execute(query, params)
DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.
If I am using the open source bzr way, how do I get the patch url when using the command below?
bzr patch PATCH_FILE_NAME_OR_URL
is there a launchpad where i can access all patches? any help? Thanks.
Her is a simple solution,
http://madurad.wordpress.com/2014/07/23/odoo-8-installing-and-configuring-in-ubuntu-server/
Hello All,
This is great Post, I have success fully install OpenERP on my VMware (Ubuntu 12.10 LTS 64-bit), but unfortunenately openerp-server can't run automatically, I had check and found no error. Thanks.
Best Regards,
Syarbel Budiman
I get the same error as Juan Miguel, do you know how to solve it?
Thanks.
Traceback (most recent call last):
File "./openerp-gevent", line 11, in <module>
openerp.cli.main()
File "/home/ubuntu/odoo/openerp/cli/__init__.py", line 71, in main
o.run(args)
File "/home/ubuntu/odoo/openerp/cli/server.py", line 174, in run
main(args)
File "/home/ubuntu/odoo/openerp/cli/server.py", line 139, in main
openerp.tools.config.parse_config(args)
File "/home/ubuntu/odoo/openerp/tools/config.py", line 327, in parse_config
openerp.netsvc.init_logger()
File "/home/ubuntu/odoo/openerp/netsvc.py", line 136, in init_logger
resetlocale()
File "/home/ubuntu/odoo/openerp/tools/translate.py", line 992, in resetlocale
for ln in get_locales():
File "/home/ubuntu/odoo/openerp/tools/translate.py", line 960, in get_locales
lang = locale.getdefaultlocale()[0]
File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Hi dear Odoo Friends. I have three questions:
First (and for me most important) question:
I'm using virtual box in order to configure Ubuntu 12.04 Server. I'm hosting Wordpress there, configured Port Forwarding for HTTP(8080/80), SSH(2222,22). So I configured the Apache Server in order to get access via Virtual box guest addition. And I can call wordpress from my host machine with: wordpress.dev:8080
but! How can I access odoo? what IP or DNS do I have to choose and how can I configure the dns? For wordpress in configured /apache2/sites-available/wordpress.dev
I'm not using ubuntu this long in order to deploy applications. So when everyone says http://[ip or dns name of server]:8069. What server is meant? The new odoo server and not the apache2 have running anyway right?
So where do I get a dns for that?
Don't I have to create a port in virtual host (port forwarding)
(Because as I can see in the most Video tutorials on youtube most people use ubuntu desktop and after odoo installation they call odoo from their guest machine, what is boring in a way. Calling it from the host computer would be cooler)
Second issue:
I followed André Schenkels steps. When I came to the point where I have to check the server
1) $ python /opt/odoo/server/openerp-server --config=/etc/odoo-server.conf
I had to correct the path to /opt/odoo/odoo/openerp-server. I mean in the command before even André used
the path odoo odoo for installation. So I guess 1) must be corrected?
Third thing:
I had to reainstall a LOT OF MODULES (had a second terminal window open in order to install the python modules (some I had to install with pip, so I had to install pip on my new virtual machine (ubuntu 12.04 Server)
Did I do something wrong, or didn't Andre concinder all the modules which are required?
Not to forget, that it is stopping after i try: python /opt/odoo/server/openerp-server --config=/etc/odoo-server.conf. I get no output and the process ins't stopped. only ctrl c helps. Is that indicating that my server is running?
all the best and thanks for your answers!
Malte
sorry, comment function is not working ...
- do you know whether the community backport version (ocb) of OpenERP/Odoo is available via github already? would you mind to add the right link for that?
- I suggest to put your howto in a separate thread
best ...Gunnar
You can install Odoo from Github in almost the same way as from Launchpad
Create a user for the OpenERP application
sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --gecos 'ODOO' --group odoo
Install PostgreSQL database and add odoo as a postgres superuser
sudo apt-get install postgresql -y
sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true
Add password to openerp postgres user
sudo su postgres
psql template1
ALTER ROLE odoo WITH password 'XXXXX';
\q
exit
Change the postgesql.conf file to accept connections on all interfaces (development use only)
sudo vi /etc/postgresql/9.3/main/postgresql.conf
Find the listen parameter and remove the # and listen to adress *
listen_address = '*'
Change the pg_hba.conf file to change the way authentication takes place
sudo vi /etc/postgresql/9.3/main/pg_hba.conf
Find the following line
local all all peer hosts all all 127.0.0.1/32 md5
to:
local all all md5 hosts all all 127.0.0.1/32 md5
If you want to connect to the postgres database from your machine you need to add a new line to the Ipv4 part of this file: Example is for a network 192.168.1.0/24.
host all all 192.168.1.0/24 MD5
Install the required dependicies for ODOO
sudo apt-get install python-dateutil python-feedparser python-gdata python-ldap \ python-libxslt1 python-lxml python-mako python-openid python-psycopg2 \ python-pybabel python-pychart python-pydot python-pyparsing python-reportlab \ python-simplejson python-tz python-vatnumber python-vobject python-webdav \ python-werkzeug python-xlwt python-yaml python-zsi python-docutils \ python-psutil bzr git wget python-mock python-unittest2 python-jinja2 -y
Install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.tar.gz
tar zxvf gdata-2.0.17.tar.gz
cd gdata-2.0.17/
sudo python setup.py install
Install ODOO 7.0 from Github
sudo su - odoo
git clone https://www.github.com/odoo/odoo --branch 7.0
chown -R odoo: *
exit
Configure the ODOO application
sudo cp /opt/odoo/odoo/install/openerp-server.conf /etc/odoo-server.conf
sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
In the /etc/odoo-server.conf file you need to following lines.
sudo vi /etc/odoo-server.conf
change the line: (in vi use a to start editing)
db_user = openerp
db_password = false
with:
db_user = odoo
db_password = XXXXXX
(the password setup with the ALTER ROLE command)
addons_path = /opt/odoo/odoo/addons
logfile = /var/log/odoo/odoo-server.log
Save the file (ESC :w)
Create a dir for the log file and give the correct permissions
sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo
Check if the server works
sudo su odoo
python /opt/odoo/server/openerp-server --config=/etc/odoo-server.conf
Check it using your brwoser and go to: http://[ip or dns name of server]:8069
You should see the login screen or database creation of ODOO
Press CTRL+C to stop the server and use exit to get out of the openerp user shell
Installing a boot script (if you want a boot script)
sudo vi /etc/init.d/odoo-server
Use the follwing script: (first press the a to add lines and copy the script)
#!/bin/sh ### BEGIN INIT INFO # Provides: odoo-server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: $network # Should-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Business Applications # Description: ODOO Business Applications. ### END INIT INFO PATH=/bin:/sbin:/usr/bin DAEMON=/opt/odoo/server/openerp-server NAME=odoo-server DESC=odoo-server # Specify the user name (Default: openerp). USER=odoo # Specify an alternate config file (Default: /etc/odoo-server.conf). CONFIGFILE="/etc/odoo-server.conf" # pidfile PIDFILE=/var/run/$NAME.pid # Additional options that are passed to the Daemon. DAEMON_OPTS="-c $CONFIGFILE" [ -x $DAEMON ] || exit 0 [ -f $CONFIGFILE ] || exit 0 checkpid() { [ -f $PIDFILE ] || return 1 pid=`cat $PIDFILE` [ -d /proc/$pid ] && return 0 return 1 } case "${1}" in start) echo -n "Starting ${DESC}: " start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ --chuid ${USER} --background --make-pidfile \ --exec ${DAEMON} -- ${DAEMON_OPTS} echo "${NAME}." ;; stop) echo -n "Stopping ${DESC}: " start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ --oknodo echo "${NAME}." ;; restart|force-reload) echo -n "Restarting ${DESC}: " start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ --oknodo sleep 1 start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ --chuid ${USER} --background --make-pidfile \ --exec ${DAEMON} -- ${DAEMON_OPTS} echo "${NAME}." ;; *) N=/etc/init.d/${NAME} echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0
Save the file (ESC :w)
Check if the server works
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server
sudo /etc/init.d/odoo-server start
You should now be able to view the logfile and see that the server has started
less /var/log/odoo/odoo-server.log
and check it using your brwoser and go to: http://[ip or dns name of server]:8069
You should see the login screen or database creation of OpenERP
Change the (super)admin password of openerp. Click on Manage Databases (perhaps you're already here). Change the password.
It adds the password in plain text in the /etc/odoo-server.conf file, that's why we changed the permissions on this file!
Stop the server
sudo /etc/init.d/odoo-server stop
Automatic Startup and Shutdown
sudo update-rc.d odoo-server defaults
If you reboot the server everything should be working.
Hi Guys !!
We are an IT development company based in India, We are Gold partners with Oracle and are experts in ERP implementation.
We have also developed a Mini ERP to meet the needs of the SME's.
We get very good reviews for our end-to-end IT services from our clients.
We can cater to any requirement in IT and that too in affordable prices.
Why should a modest budget mean you have to compromise on the quality of the services or products.
Do give us a call to discuss your needs and rest assured for the best services.
Best Regards,
Akash Verma
Sr. Business Development Manager
SRDT Pvt. Ltd.
+91-8176047544
I did follow all the instructions, step by step, BUT when i try to run the server, i got this error:
openerp@erp7:~/v7/server$ Traceback (most recent call last): File "./openerp-server", line 5, in <module> openerp.cli.main() File "/opt/openerp/v7/server/openerp/cli/__init__.py", line 61, in main o.run(args) File "/opt/openerp/v7/server/openerp/cli/server.py", line 265, in run main(args) File "/opt/openerp/v7/server/openerp/cli/server.py", line 225, in main openerp.netsvc.init_logger() File "/opt/openerp/v7/server/openerp/netsvc.py", line 154, in init_logger resetlocale() File "/opt/openerp/v7/server/openerp/tools/translate.py", line 1043, in resetlocale for ln in get_locales(): File "/opt/openerp/v7/server/openerp/tools/translate.py", line 1011, in get_locales lang = locale.getdefaultlocale()[0] File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale return _parse_localename(localename) File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 openerp@erp7:~/v7/server$
do you have any clues, why i got this?
thanks
any clues about this ?root@v7erp:~# sudo su - openerp -s /bin/bash openerp@v7erp:~$ /opt/openerp/v7/server/openerp-server 2013-06-09 18:09:28,395 23526 INFO ? openerp: OpenERP version 7.0 2013-06-09 18:09:28,395 23526 INFO ? openerp: addons paths: /opt/openerp/v7/server/openerp/addons 2013-06-09 18:09:28,396 23526 INFO ? openerp: database hostname: localhost 2013-06-09 18:09:28,396 23526 INFO ? openerp: database port: 5432 2013-06-09 18:09:28,396 23526 INFO ? openerp: database user: openerp 2013-06-09 18:09:28,398 23526 WARNING ? openerp.modules.module: module web: module not found 2013-06-09
Bzr is big memory consumption. When you are set the addons branch.It costed too much memory to lead your thread was killed.And your smaller server and web didn't.you can do like that bzr branch lp:openobject-addons addons -r1000 cd addons bzr pull -r2000 bzr pull -r3000 and so on
Dear Friend,
how can i do that: We just need to change the location of the daemon. below is the init script you can copy paste this to the file. ??
Very good. +1
I think that If you apply...
sudo apt-get install dist-upgrade
it is not necessary to "install gdata client (since ubuntu package is old we download and install from source)"
@tomas, since 12.04 is the Long Term Support version I am using this version of ubuntu. Gdata version is (2.0.14-2) in ubuntu 12.04. I prefer to stay on LTS channel.
something is wrong with this tutorial, openerp server do not start up !!! i did it step by step with no errors, something change ???
please help.
You must change openerp user password for server configuration. Find openerp-server.conf and edit
@Tomas I am installing to 12.04 since it is LTS version.
I have problem downloading the Bzr Server and it gives me this message although i have tried more than 20 times re-running the command bzr branch lp:openobject-server/7.0 server this message (bzr: ERROR: Connection error: while sending GET /%2Bbranch-id/243983/.bzr/repository/packs/a752a984c6ec4f40dd2a71d0c672b13a.pack: [Errno 2] No such file or directory)
Hi. Here you go.. http://codderlight.blogspot.in/search/label/openerp
I got this error rocker@rocker-EP31-DS3L:~$ sudo -u postgres createuser -s openerp createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? . Also it takes forever to clone a copy of addons I used this command "bzr branch lp:openobject-addons/7.0 addons". I don't mind downloading everything but it seems it is downloading individual file by file. Is there a way to download as an archive?