@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/bash
################################################################################
################################################################################
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14 .04 (could be used for other version too)
# Script for installing Odoo on Ubuntu 14.04, 15.04 and 16 .04 (could be used for other version too)
# Author: Yenthe Van Ginneken
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
@ -24,10 +24,10 @@ OE_HOME_EXT="/$OE_USER/${OE_USER}-server"
INSTALL_WKHTMLTOPDF = "True"
INSTALL_WKHTMLTOPDF = "True"
#Set the default Odoo port (you still have to use -c /etc/odoo-server.conf for example to use this.)
#Set the default Odoo port (you still have to use -c /etc/odoo-server.conf for example to use this.)
OE_PORT = "8069"
OE_PORT = "8069"
#Choose the Odoo version which you want to install. For example: 10.0, 9.0, 8.0, 7.0 or saas-6. When using 'trunk' the master version will be installed.
#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.
#IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 10 .0
#IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 9 .0
OE_VERSION = "1 0 .0"
OE_VERSION = "1 1 .0"
# Set this to True if you want to install Odoo 10 Enterprise!
# Set this to True if you want to install Odoo 9 Enterprise!
IS_ENTERPRISE = "False"
IS_ENTERPRISE = "False"
#set the superadmin password
#set the superadmin password
OE_SUPERADMIN = "admin"
OE_SUPERADMIN = "admin"
@ -60,14 +60,20 @@ sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
#--------------------------------------------------
#--------------------------------------------------
# Install Dependencies
# Install Dependencies
#--------------------------------------------------
#--------------------------------------------------
echo -e "\n--- Installing Python 3 + pip3 --"
sudo apt-get install python3 python3-pip
echo -e "\n---- Install tool packages ----"
echo -e "\n---- Install tool packages ----"
sudo apt-get install wget git python-pip gdebi-core -y
sudo apt-get install wget git bzr python-pip gdebi-core -y
echo -e "\n---- Install python packages ----"
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 python-suds
sudo apt-get install python-pypdf2 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
sudo pip3 install pypdf2 Babel passlib Werkzeug decorator python-dateutil pyyaml psycopg2 psutil html2text docutils
echo -e "\n---- Install python libraries ----"
echo -e "\n---- Install python libraries ----"
sudo pip install gdata psycogreen ofxparse XlsxWriter xlrd
sudo pip install gdata psycogreen
# This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
sudo -H pip install suds
echo -e "\n--- Install other required packages"
echo -e "\n--- Install other required packages"
sudo apt-get install node-clean-css -y
sudo apt-get install node-clean-css -y
@ -78,7 +84,7 @@ sudo apt-get install python-gevent -y
# Install Wkhtmltopdf if needed
# Install Wkhtmltopdf if needed
#--------------------------------------------------
#--------------------------------------------------
if [ $INSTALL_WKHTMLTOPDF = "True" ] ; then
if [ $INSTALL_WKHTMLTOPDF = "True" ] ; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 1 0 ----"
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 1 1 ----"
#pick up correct one from x64 & x32 versions:
#pick up correct one from x64 & x32 versions:
if [ "`getconf LONG_BIT`" = = "64" ] ; then
if [ "`getconf LONG_BIT`" = = "64" ] ; then
_url = $WKHTMLTOX_X64
_url = $WKHTMLTOX_X64
@ -115,7 +121,7 @@ if [ $IS_ENTERPRISE = "True" ]; then
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise "
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise "
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise/addons "
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise/addons "
GITHUB_RESPONSE = $( sudo git clone --depth 1 --branch 10.0 https://www.github.com/odoo/enterprise " $OE_HOME /enterprise/addons " 2>& 1)
GITHUB_RESPONSE = $( sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise " $OE_HOME /enterprise/addons " 2>& 1)
while [ [ $GITHUB_RESPONSE = = *"Authentication" * ] ] ; do
while [ [ $GITHUB_RESPONSE = = *"Authentication" * ] ] ; do
echo "------------------------WARNING------------------------------"
echo "------------------------WARNING------------------------------"
echo "Your authentication with Github has failed! Please try again."
echo "Your authentication with Github has failed! Please try again."
@ -123,7 +129,7 @@ if [ $IS_ENTERPRISE = "True" ]; then
echo "TIP: Press ctrl+c to stop this script."
echo "TIP: Press ctrl+c to stop this script."
echo "-------------------------------------------------------------"
echo "-------------------------------------------------------------"
echo " "
echo " "
GITHUB_RESPONSE = $( sudo git clone --depth 1 --branch 10.0 https://www.github.com/odoo/enterprise " $OE_HOME /enterprise/addons " 2>& 1)
GITHUB_RESPONSE = $( sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise " $OE_HOME /enterprise/addons " 2>& 1)
done
done
echo -e " \n---- Added Enterprise code under $OE_HOME /enterprise/addons ---- "
echo -e " \n---- Added Enterprise code under $OE_HOME /enterprise/addons ---- "
@ -183,16 +189,12 @@ PATH=/bin:/sbin:/usr/bin
DAEMON = $OE_HOME_EXT /odoo-bin
DAEMON = $OE_HOME_EXT /odoo-bin
NAME = $OE_CONFIG
NAME = $OE_CONFIG
DESC = $OE_CONFIG
DESC = $OE_CONFIG
# Specify the user name (Default: odoo).
# Specify the user name (Default: odoo).
USER = $OE_USER
USER = $OE_USER
# Specify an alternate config file (Default: /etc/openerp-server.conf).
# Specify an alternate config file (Default: /etc/openerp-server.conf).
CONFIGFILE = " /etc/ ${ OE_CONFIG } .conf "
CONFIGFILE = " /etc/ ${ OE_CONFIG } .conf "
# pidfile
# pidfile
PIDFILE = /var/run/\$ { NAME} .pid
PIDFILE = /var/run/\$ { NAME} .pid
# Additional options that are passed to the Daemon.
# Additional options that are passed to the Daemon.
DAEMON_OPTS = "-c \$CONFIGFILE"
DAEMON_OPTS = "-c \$CONFIGFILE"
[ -x \$ DAEMON ] || exit 0
[ -x \$ DAEMON ] || exit 0
@ -203,7 +205,6 @@ pid=\`cat \$PIDFILE\`
[ -d /proc/\$ pid ] && return 0
[ -d /proc/\$ pid ] && return 0
return 1
return 1
}
}
case "\${1}" in
case "\${1}" in
start)
start)
echo -n "Starting \${DESC}: "
echo -n "Starting \${DESC}: "
@ -218,7 +219,6 @@ start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
--oknodo
--oknodo
echo "\${NAME}."
echo "\${NAME}."
; ;
; ;
restart| force-reload)
restart| force-reload)
echo -n "Restarting \${DESC}: "
echo -n "Restarting \${DESC}: "
start-stop-daemon --stop --quiet --pidfile \$ PIDFILE \
start-stop-daemon --stop --quiet --pidfile \$ PIDFILE \
@ -234,7 +234,6 @@ N=/etc/init.d/\$NAME
echo "Usage: \$NAME {start|stop|restart|force-reload}" >& 2
echo "Usage: \$NAME {start|stop|restart|force-reload}" >& 2
exit 1
exit 1
; ;
; ;
esac
esac
exit 0
exit 0
EOF
EOF