I have tried out V9.0. and this round , it is not SO easy to install , so in this article , from what i learn and i will share here hopefully can help you all to try out Odoo V9.0 !
1. Update The System
$sudo apt-get update
$sudo apt-get dist-upgrade
2. Create User
$sudo adduser –system –home=/opt/odoo –group odoo
/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 try the login with the created user by below command.
$sudo su – odoo -s /bin/bash
3. Install and Configure Postgres Database
$sudo apt-get install postgresql
$deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
$wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$sudo apt-get update
$sudo apt-get install postgresql-9.4
$sudo su – postgres
$createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
4. Install the necessary libraries
$sudo apt-get install python-pip python-dev libevent-dev gcc libxml2-dev libxslt-dev node-less libldap2-dev libssl-dev
Note
-
On Linux, you can simply use their setup script.$ wget -qO- https://deb.nodesource.com/setup | bash –
$ apt-get install -y nodejs$apt-get install node-less Once you have npm working, install less and less-plugin-clean-css.$ sudo npm install -g less less-plugin-clean-cssOn debian and Ubuntu you also need to set a symbolic link from nodejs to node because the shebang line of lessc uses node.$ sudo ln -s /usr/bin/nodejs /usr/bin/node - $ sudo apt-get install libv8-dev
-
PLEASE RESTART SERVER or you may be facing error of : node: error while loading shared libraries: libv8.so.3.14.5: cannot open shared object file: …if after restarted the server , the error still not yet resolve then please install Odoo V9.0. BLOG module , after i installed the module , it work properly.
-
On OS X, install nodejs via your preferred package manager (macports, homebrew) then install less and less-plugin-clean-css.
-
$ sudo npm install -g less less-plugin-clean-css
-
On Windows, install nodejs then reboot and install less and less-plugin-clean-css.
C:>npm install -g less less-plugin-clean-css
$cd /tmp &
$rm requirements.txt &
$wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt
$sudo pip install -r requirements.txt
$sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
$sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-i386.deb
5. Install the Odoo server
$sudo apt-get install git
$sudo su – odoo -s /bin/bash
$git clone https://www.github.com/odoo/odoo –depth 1 –branch 9.0 –single-branch .
6. Other Information
6.1. Error of uploading images for Odoo V9.0 in ubuntu 14.04
Root Cause: Pillow (JPEG decoder) bug on ubuntu > 14.04Resolution: update jpeg library, then reinstall pillow.# install libjpeg-dev with aptsudo apt-get install libjpeg-dev# reinstall pillowpip install -I pillow
# restart Odoo, or else no effect until it is restarted.
6.2. Configuring the Odoo application
/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
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons
in the config file to addons_path = /opt/odoo/addons
. (Please refer to the documents on how to write your own config file )6.3. Installing the Init script
/opt/odoo/debian/init
by doing few small modifications. Here’s a sample of the startup script for Odoo 9.#!/bin/bash
### BEGIN INIT INFO
# Provides: odoo.py
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start odoo daemon at boot time
# Description: Enable service provided by daemon.
# X-Interactive: true
### END INIT INFO
## more info: http://wiki.debian.org/LSBInitScripts
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/opt/odoo/odoo.py
NAME=odoo
DESC=odoo-server
CONFIG=/etc/odoo/odoo-server.conf
LOGFILE=/var/log/odoo/odoo-server.log
PIDFILE=/var/run/${NAME}.pid
USER=odoo
export LOGNAME=$USER
test -x $DAEMON || exit 0
set -e
function _start() {
start-stop-daemon –start –quiet –pidfile $PIDFILE –chuid $USER:$USER –background –make-pidfile –exec $DAEMON — –config $CONFIG –logfile $LOGFILE
}
function _stop() {
start-stop-daemon –stop –quiet –pidfile $PIDFILE –oknodo –retry 3
rm -f $PIDFILE
}
function _status() {
start-stop-daemon –status –quiet –pidfile $PIDFILE
return $?
}
case “$1” in
start)
echo -n “Starting $DESC: “
_start
echo “ok”
;;
stop)
echo -n “Stopping $DESC: “
_stop
echo “ok”
;;
restart|force-reload)
echo -n “Restarting $DESC: “
_stop
sleep 1
_start
echo “ok”
;;
status)
echo -n “Status of $DESC: “
_status && echo “running” || echo “stopped”
;;
*)
N=/etc/init.d/$NAME
echo “Usage: $N {start|stop|restart|force-reload|status}” >&2
exit 1
;;
esac
exit 0
$sudo chmod 755 /etc/init.d/odoo-server
$sudo chown root: /etc/init.d/odoo-server
/var/log/odoo/odoo-server.log
and give proper access rights using the following commands ,
create odoo directory under /var/log/
$sudo mkdir /var/log/odoo
$cd /var/log/odoo
$touch odoo-server.log
$sudo chmod 755 /var/log/odoo/odoo-server.log
$sudo chown odoo:root -R /var/log/odoo/
6.4. Testing the new odoo server
$sudo /etc/init.d/odoo-server start
$sudo tail -f /var/log/odoo/odoo-server.log
http://IP_or_domain.com:8069
$sudo /etc/init.d/odoo-server stop
$sudo tail -f /var/log/odoo/odoo-server.log
6.5. Automate startup for Odoo server
$sudo update-rc.d odoo-server defaults
addition to 6.1 (the notorious pillow error),
If you're upgrading from v7 environment, and the fresh v9 server installation keep showing error:
(even after previous step has been done)
Browser "Internal Server Error"
"The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."
error log: "IOError: decoder jpeg not available"
then your new v9 installation is corrupted.
if continue run the server, you'll get other irrelevant errors,
i.e. "Qwebtemplate not found: External ID not found…", "OperationalError: Unable to use a closed cursor…",
that would lead you to the other end of the world.
Just drop the corrupted database,
stop the odoo service,
$ pip uninstall PIL
$ pip uninstall Pillow
then remove them from Python Library.
example in Ubuntu 14.04,
$ rm /usr/local/bin/python2.7/dist-packages/PIL
$ rm /usr/local/bin/python2.7/dist-packages/Pillow
(and whatever related egg folders)
reboot
$ pip install pillow
OK, now enjoy creating your new odoo v9~