How can I download and install Odoo 9?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Odoo can be found on Github, you can find Odoo 9 here.
At the time of writing Odoo V9 is not yet officially released but it is confirmed that the database model has been locked (confirmed by Olivier Dony on Twitter). You can already install it on Ubuntu/Linux but there is no official Windows installer yet. To install it on Ubuntu you can follow the following steps:
1. Create a new file
sudo nano odoo_install.sh
2. Copy the code from my Github install script (credit do André Schenkels for the original version) and paste it in your new file (odoo_install.sh). This is the code:
#!/bin/bash
################################################################################
# Script for Installation: ODOO Saas4/Trunk server on Ubuntu 14.04 LTS
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
#
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
# in one Ubuntu because of the different xmlrpc_ports
#-------------------------------------------------------------------------------
# USAGE:
#
# odoo-install
#
# EXAMPLE:
# ./odoo-install
#
################################################################################
##fixed parameters
#odoo
OE_USER="odoo"
OE_HOME="/$OE_USER"
OE_HOME_EXT="/$OE_USER/$OE_USER-server"
#The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
#Set to true if you want to install it, false if you don't need it or have it already installed.
INSTALL_WKHTMLTOPDF="True"
#Choose the Odoo version which you want to install. For example: 9.0, 8.0, 7.0 or saas-6. When using 'trunk' the master version will be installed.
OE_VERSION="8.0"
#set the superadmin password
OE_SUPERADMIN="admin"
OE_CONFIG="$OE_USER-server"
#--------------------------------------------------
# Update Server
#--------------------------------------------------
echo -e "\n---- Update Server ----"
sudo apt-get update
sudo apt-get upgrade -y
#--------------------------------------------------
# Install PostgreSQL Server
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql -y
echo -e "\n---- PostgreSQL $PG_VERSION Settings ----"
sudo sed -i s/"#listen_addresses = 'localhost'"/"listen_addresses = '*'"/g /etc/postgresql/9.3/main/postgresql.conf
echo -e "\n---- Creating the ODOO PostgreSQL User ----"
sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
#--------------------------------------------------
# Install Dependencies
#--------------------------------------------------
echo -e "\n---- Install tool packages ----"
sudo apt-get install wget subversion git bzr bzrtools python-pip -y
echo -e "\n---- Install python packages ----"
sudo apt-get install python-dateutil python-feedparser 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 python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y
echo -e "\n---- Install python libraries ----"
sudo pip install gdata
#--------------------------------------------------
# Install Wkhtmltopdf if needed
#--------------------------------------------------
if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
echo -e "\n---- Install wkhtml and place on correct place for ODOO 8 ----"
sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
else
echo "Wkhtmltopdf isn't installed due to the choice of the user!"
fi
echo -e "\n---- Create ODOO system user ----"
sudo adduser --system --quiet --shell=/bin/bash --home=$OE_HOME --gecos 'ODOO' --group $OE_USER
#The user should also be added to the sudo'ers group.
sudo adduser $OE_USER sudo
echo -e "\n---- Create Log directory ----"
sudo mkdir /var/log/$OE_USER
sudo chown $OE_USER:$OE_USER /var/log/$OE_USER
#--------------------------------------------------
# Install ODOO
#--------------------------------------------------
echo -e "\n==== Installing ODOO Server ===="
sudo git clone --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/
echo -e "\n---- Create custom module directory ----"
sudo su $OE_USER -c "mkdir $OE_HOME/custom"
sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"
echo -e "\n---- Setting permissions on home folder ----"
sudo chown -R $OE_USER:$OE_USER $OE_HOME/*
echo -e "* Create server config file"
sudo cp $OE_HOME_EXT/debian/openerp-server.conf /etc/$OE_CONFIG.conf
sudo chown $OE_USER:$OE_USER /etc/$OE_CONFIG.conf
sudo chmod 640 /etc/$OE_CONFIG.conf
echo -e "* Change server config file"
sudo sed -i s/"db_user = .*"/"db_user = $OE_USER"/g /etc/$OE_CONFIG.conf
sudo sed -i s/"; admin_passwd.*"/"admin_passwd = $OE_SUPERADMIN"/g /etc/$OE_CONFIG.conf
sudo su root -c "echo 'logfile = /var/log/$OE_USER/$OE_CONFIG$1.log' >> /etc/$OE_CONFIG.conf"
sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/$OE_CONFIG.conf"
echo -e "* Create startup file"
sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"
sudo su root -c "echo 'sudo -u $OE_USER $OE_HOME_EXT/openerp-server --config=/etc/$OE_CONFIG.conf' >> $OE_HOME_EXT/start.sh"
sudo chmod 755 $OE_HOME_EXT/start.sh
#--------------------------------------------------
# Adding ODOO as a deamon (initscript)
#--------------------------------------------------
echo -e "* Create init file"
echo '#!/bin/sh' >> ~/$OE_CONFIG
echo '### BEGIN INIT INFO' >> ~/$OE_CONFIG
echo '# Provides: $OE_CONFIG' >> ~/$OE_CONFIG
echo '# Required-Start: $remote_fs $syslog' >> ~/$OE_CONFIG
echo '# Required-Stop: $remote_fs $syslog' >> ~/$OE_CONFIG
echo '# Should-Start: $network' >> ~/$OE_CONFIG
echo '# Should-Stop: $network' >> ~/$OE_CONFIG
echo '# Default-Start: 2 3 4 5' >> ~/$OE_CONFIG
echo '# Default-Stop: 0 1 6' >> ~/$OE_CONFIG
echo '# Short-Description: Enterprise Business Applications' >> ~/$OE_CONFIG
echo '# Description: ODOO Business Applications' >> ~/$OE_CONFIG
echo '### END INIT INFO' >> ~/$OE_CONFIG
echo 'PATH=/bin:/sbin:/usr/bin' >> ~/$OE_CONFIG
echo "DAEMON=$OE_HOME_EXT/openerp-server" >> ~/$OE_CONFIG
echo "NAME=$OE_CONFIG" >> ~/$OE_CONFIG
echo "DESC=$OE_CONFIG" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Specify the user name (Default: odoo).' >> ~/$OE_CONFIG
echo "USER=$OE_USER" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Specify an alternate config file (Default: /etc/openerp-server.conf).' >> ~/$OE_CONFIG
echo "CONFIGFILE=\"/etc/$OE_CONFIG.conf\"" >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# pidfile' >> ~/$OE_CONFIG
echo 'PIDFILE=/var/run/$NAME.pid' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo '# Additional options that are passed to the Daemon.' >> ~/$OE_CONFIG
echo 'DAEMON_OPTS="-c $CONFIGFILE"' >> ~/$OE_CONFIG
echo '[ -x $DAEMON ] || exit 0' >> ~/$OE_CONFIG
echo '[ -f $CONFIGFILE ] || exit 0' >> ~/$OE_CONFIG
echo 'checkpid() {' >> ~/$OE_CONFIG
echo '[ -f $PIDFILE ] || return 1' >> ~/$OE_CONFIG
echo 'pid=`cat $PIDFILE`' >> ~/$OE_CONFIG
echo '[ -d /proc/$pid ] && return 0' >> ~/$OE_CONFIG
echo 'return 1' >> ~/$OE_CONFIG
echo '}' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'case "${1}" in' >> ~/$OE_CONFIG
echo 'start)' >> ~/$OE_CONFIG
echo 'echo -n "Starting ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --start --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--chuid ${USER} --background --make-pidfile \' >> ~/$OE_CONFIG
echo '--exec ${DAEMON} -- ${DAEMON_OPTS}' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo 'stop)' >> ~/$OE_CONFIG
echo 'echo -n "Stopping ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--oknodo' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'restart|force-reload)' >> ~/$OE_CONFIG
echo 'echo -n "Restarting ${DESC}: "' >> ~/$OE_CONFIG
echo 'start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--oknodo' >> ~/$OE_CONFIG
echo 'sleep 1' >> ~/$OE_CONFIG
echo 'start-stop-daemon --start --quiet --pidfile ${PIDFILE} \' >> ~/$OE_CONFIG
echo '--chuid ${USER} --background --make-pidfile \' >> ~/$OE_CONFIG
echo '--exec ${DAEMON} -- ${DAEMON_OPTS}' >> ~/$OE_CONFIG
echo 'echo "${NAME}."' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '*)' >> ~/$OE_CONFIG
echo 'N=/etc/init.d/${NAME}' >> ~/$OE_CONFIG
echo 'echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2' >> ~/$OE_CONFIG
echo 'exit 1' >> ~/$OE_CONFIG
echo ';;' >> ~/$OE_CONFIG
echo '' >> ~/$OE_CONFIG
echo 'esac' >> ~/$OE_CONFIG
echo 'exit 0' >> ~/$OE_CONFIG
echo -e "* Security Init File"
sudo mv ~/$OE_CONFIG /etc/init.d/$OE_CONFIG
sudo chmod 755 /etc/init.d/$OE_CONFIG
sudo chown root: /etc/init.d/$OE_CONFIG
echo -e "* Change default xmlrpc port"
sudo su root -c "echo 'xmlrpc_port = $OE_PORT' >> /etc/$OE_CONFIG.conf"
echo -e "* Start ODOO on Startup"
sudo update-rc.d $OE_CONFIG defaults
echo -e "* Starting Odoo Service"
sudo su root -c "/etc/init.d/$OE_CONFIG start"
echo "-----------------------------------------------------------"
echo "Done! The Odoo server is up and running. Specifications:"
echo "Port: $OE_PORT"
echo "User service: $OE_USER"
echo "User PostgreSQL: $OE_USER"
echo "Code location: $OE_USER"
echo "Addons folder: $OE_USER/$OE_CONFIG/addons/"
echo "Start Odoo service: sudo service $OE_CONFIG start"
echo "Stop Odoo service: sudo service $OE_CONFIG stop"
echo "Restart Odoo service: sudo service $OE_CONFIG restart"
echo "-----------------------------------------------------------"
Note: the port will only be changed if you provide the -c command when starting Odoo for example.
3. Make the file executable
sudo chmod +x odoo_install.sh
4. Execute the script and wait until Odoo is fully installed.
sudo ./odoo_install.sh
5. Go to http://localhost:8069 and you have yourself a nice and clean Odoo 9.
Note: Odoo 9 needs node-less! This script is built to work with all versions but I'd rather not install an extra package if not needed. If this is not yet installed on your system you should install less with the following command:
sudo apt-get install node-less
Good effort ! +1 @Yenthe
Thanks @Emipro! I've noticed with V8 that a lot of people didn't know how to install it and there where very little (good) examples so I thought lets prevent that for V9.
Don't forget the new Odoo 9.0 dependencies - a full list is at https://github.com/odoo/odoo/blob/9.0/requirements.txt - and I don't think that's a full list. I found it easier to discover dependencies downloading from https://nightly.odoo.com/master/nightly/deb/ and using dpkg -i and watching for warnings.
@Ray thanks for the heads-up and the link. I've got two dev servers running with Odoo 9 that are installed with my script and so far I couldn't find any problems at all so I don't think I'm really missing something vital?
python-ofxparse, python-suds, python-decorator, python-gevent, are in requirements.txt and I don't see them in your script. flanker is required for email validation, but I didn't get that working yet. I think ofxparse may only be for the enterprise addons. The dpkg method also told me to install antiword graphviz and ghostscript. Still working it all out myself!
@Ray they seem to be in requirements.txt but I haven't found any troubles running everything without these libs. I guess I'll soon have to give them a try too and add them in the V9 script. Decided to split install scripts on my Github for = 9.0. Keep me updated of your progress too? :)
A suite of open-source business apps written in Python will be release soon in Q4 2015. In new release of Odoo 9 you can see major changes in accounting section. one more thing to keep in mind that Odoo v9 Enterprise version will have some interesting features that will not be in Odoo v9 Community.
You can download a .deb or .rpm file of odoo 9 from nightly source and install it in the ubuntu or any other debian distribution. but it will not give you easy control over odoo. This How to guide will allow you to install odoo manually.
Here is our “How to” guide to install Odoo v9 on ubuntu 14.04 LTS.
Update The System
First get newest versions possible as per version requirements of dependencies of packages existing on the machine using.
sudo apt-get update && sudo apt-get dist-upgrade
Create User
Create Odoo System User that will own and run the odoo application.
sudo adduser --system --home=/opt/odoo --group odoo
Here we have specified /opt/odoo as home, so when ever you change user to odoo it will by default land to /opt/odoo.
we gonna put all the odoo code under /opt/odoo. you can change the path of your choice, and do the configuration accordingly.after creating user you can login with the created user by below command.
sudo su - odoo -s /bin/bash
you can press ctrl + d or write exit and press enter to logout.
Install and Configure Postgres
sudo apt-get install postgresql
This command will install postgres 9.1 by default in ubuntu 14.04 or any debian distribution. if you want to use any specific version of postgres(i.e 9.3, 9.4) you need to update the source list. for example to install postgres-9.4 you can follow below steps.
Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository using vim or nano editor
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
Import the repository signing key, and update the package lists
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
and update the packages using
sudo apt-get update
after that you can search/install the available/supported postgres version
sudo apt-get install postgresql-9.4
After installing postgres 9.4, change to the postgres user so we have the necessary privileges to configure the database
sudo su - postgres
Now create a new database user with access to create and drop database.
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Enter password for new role: ********
Enter it again: ********
Finally exit from the postgres user account:
exit
Install the necessary libraries
sudp apt-get install python-pip python-dev libevent-dev gcc libxml2-dev libxslt-dev node-less
Note
Odoo 9 is depends on node-less
After installing this system libraries we can install python libraries using pip. Create requirement.txt file in server. create the file using below command and paste the content from this file.
sudo nano /tmp/requirement.txt
press ctrl + x and y to save & exit the file
after creating requirement.txt file it’s time to install odoo python library
sudo pip install -r /tmp/requirements.txt
After that all the dependencies for installing Odoo 9.0 are now satisfied.
for Qweb templating we need to install wkhtmltopdf. download deb file of wkhtmltopdf 32 bit or wkhtmltopdf 64 bit.
Here We have downloaded wkhtmltopdf in /tmp directory. You can go to the download directory using cd and run the command depending on your file name.
for 64 bit:
sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
for 32 bit:
sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-i386.deb
Install the Odoo server
Install Git:
sudo apt-get install git
Switch to the Odoo user:
sudo su - odoo -s /bin/bash
Grab a copy of the most current Odoo 9(master) branch (Note the “.” at the end of this command!):
git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch .
Info
This might take a little while depending on the speed of your Internet connection.
–depth 1 to the command will only retrieves the latest version without all the history. The download is now quite a bit faster.
Once it’s finished exit from the odoo user using crtl+d:
Configuring the Odoo application
The default configuration file for the server is under /opt/odoo/debian/openerp-server.conf. we’ll copy that file to where we need it and change it’s ownership and permissions:
sudo cp /opt/odoo/debian/openerp-server.conf /etc/odoo-server.conf
sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
Above commands make the file owned and writable only by the odoo user and group and only readable by odoo and root.
To allow odoo to use default addons you need to change the addons_path line in config file addons_path = /usr/lib/python2.7/dist-packages/openerp/addons in the config file to addons_path = /opt/odoo/addons.
you can also change other line as per your server deployment needs.
Installing the Init script
This script will be used to start-up and shut down the odoo server automatically and also run the application as the defined user. we will user script /opt/odoo/debian/init by doing few small modifications. Here’s a link to the one I’ve already modified for Odoo 9.
Now you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it odoo-server. and you need to make it executable and owned by root:
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server
we also need to make log file /var/log/odoo/odoo-server.log and give access rights using
create odoo directory under /var/log/
sudo mkdir /var/log/odoo
go to the directory
cd /var/log/odoo
create file
cat > odoo-server.log
give the permission to writable by the odoo user
sudo chmod 755 /var/log/odoo/odoo-server.log
sudo chown odoo:root -R /var/log/odoo/
Testing the odoo server
To start the Odoo server type:
sudo /etc/init.d/odoo-server start
You should now be able to view the log file and see that the server has started.
sudo tail -f /var/log/odoo/odoo-server.log
If the log file looks OK, now point your web browser at the domain or IP address of your Odoo server which by default use port 8069. try below in your browser
http://IP_or_domain.com:8069
for the first time you will see database manager to create your first database.
Now it’s time to make sure the server stops properly too:
sudo /etc/init.d/odoo-server stop
Check the log file again to make sure odoo has stopped properly.
sudo tail -f /var/log/odoo/odoo-server.log
Atomizing Odoo server startup
If everything working well we can do a entry of odoo-sever in update-rc.d which will automatically start & stops the odoo server along with ubuntu,
sudo update-rc.d odoo-server defaults
you can try rebooting your server to check whether the odoo service is working fine or not.
aneesh, One thing to tack onto your directions, postgresql-server-dev-all needs to be installed BEFORE running the pip install - or the install will fail. On top of that, when trying to run pip install on the requirements.txt file, I get the errors below. Unsure what the hang up on this is. #include "lber.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Cleaning up... Removing temporary dir /tmp/pip_build_root... Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Y_uVK_-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/python-ldap Exception information: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install requirement.install(install_options, global_options, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 707, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "/usr/lib/python2.7/dist-packages/pip/util.py", line 715, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Y_uVK_-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/python-ldap
Is there a way to install Odoo 9 like Odoo 8 with a debian package?
Hello,
Visit this link may be this will help you.
http://openies.com/blog/install-openerp-odoo-9-on-ubuntu-server-14-04-lts/
Thanks.
Openies