@ -1,6 +1,6 @@
#!/bin/bash
################################################################################
# Script for installing Odoo on Ubuntu 16.04, 18.04, 20.0 4 and 22 .04 (could be used for other version too)
# Script for installing Odoo 19 on Ubuntu 24.04 (could be used for other version too)
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu server. It can install multiple Odoo instances
@ -24,11 +24,11 @@ INSTALL_WKHTMLTOPDF="True"
OE_PORT = "8069"
# Choose the Odoo version which you want to install. For example: 16.0, 15.0, 14.0 or saas-22. When using 'master' the master version will be installed.
# IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 17.0
OE_VERSION = "1 7 .0"
OE_VERSION = "1 9 .0"
# Set this to True if you want to install the Odoo enterprise version!
IS_ENTERPRISE = "False"
# Installs postgreSQL V1 4 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance
INSTALL_POSTGRESQL_ FOUR TEEN= "True"
# Installs postgreSQL V1 6 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance
INSTALL_POSTGRESQL_ SIX TEEN= "True"
# Set this to True if you want to install Nginx!
INSTALL_NGINX = "False"
# Set the superadmin password - if GENERATE_RANDOM_PASSWORD is set to "True" we will automatically generate a random password, otherwise we use this one
@ -49,13 +49,13 @@ ADMIN_EMAIL="odoo@example.com"
## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
## in order to have correct version of wkhtmltopdf installed, for a danger note refer to
## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ):
## https://www.odoo.com/documentation/1 6 .0/administration/install.html
## https://www.odoo.com/documentation/1 9 .0/administration/install.html
# Check if the operating system is Ubuntu 2 2 .04
if [ [ $( lsb_release -r -s) = = "2 2 .04" ] ] ; then
# Check if the operating system is Ubuntu 2 4 .04
if [ [ $( lsb_release -r -s) = = "2 4 .04" ] ] ; then
WKHTMLTOX_X64 = "https://packages.ubuntu.com/jammy/wkhtmltopdf"
WKHTMLTOX_X32 = "https://packages.ubuntu.com/jammy/wkhtmltopdf"
#No Same link works for both 64 and 32-bit on Ubuntu 2 2 .04
#No Same link works for both 64 and 32-bit on Ubuntu 2 4 .04
else
# For older versions of Ubuntu
WKHTMLTOX_X64 = " https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1. $( lsb_release -c -s) _amd64.deb "
@ -78,8 +78,8 @@ sudo apt-get install libpq-dev
# Install PostgreSQL Server
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
if [ $ INSTALL_POSTGRESQL_FOUR TEEN = "True" ] ; then
echo -e "\n---- Installing postgreSQL V1 4 due to the user it's choise ----"
if [ $ $INSTALL_POSTGRESQL_SIX TEEN = "True" ] ; then
echo -e "\n---- Installing postgreSQL V1 6 due to the user it's choise ----"
sudo curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
@ -101,7 +101,7 @@ sudo apt-get install python3 python3-pip
sudo apt-get install git python3-cffi build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libpng-dev libjpeg-dev gdebi -y
echo -e "\n---- Install python packages/requirements ----"
sudo -H pip3 install -r https://github.com/odoo/odoo/raw/${ OE_VERSION } /requirements.txt
sudo -H pip3 install -r https://github.com/odoo/odoo/raw/${ OE_VERSION } /requirements.txt --break-system-packages
echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
sudo apt-get install nodejs npm -y
@ -121,8 +121,8 @@ if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
sudo wget $_url
if [ [ $( lsb_release -r -s) = = "2 2 .04" ] ] ; then
# Ubuntu 2 2 .04 LTS
if [ [ $( lsb_release -r -s) = = "2 4 .04" ] ] ; then
# Ubuntu 2 4 .04 LTS
sudo apt install wkhtmltopdf -y
else
# For older versions of Ubuntu
@ -152,9 +152,7 @@ sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $
if [ $IS_ENTERPRISE = "True" ] ; then
# Odoo Enterprise install!
sudo pip3 install psycopg2-binary pdfminer.six
echo -e "\n--- Create symlink for node"
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo pip3 install psycopg2-binary pdfminer.six --break-system-packages
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise "
sudo su $OE_USER -c " mkdir $OE_HOME /enterprise/addons "
@ -171,7 +169,7 @@ if [ $IS_ENTERPRISE = "True" ]; then
echo -e " \n---- Added Enterprise code under $OE_HOME /enterprise/addons ---- "
echo -e "\n---- Installing Enterprise specific libraries ----"
sudo -H pip3 install num2words ofxparse dbfread ebaysdk firebase_admin pyOpenSSL
sudo -H pip3 install num2words ofxparse dbfread ebaysdk firebase_admin pyOpenSSL --break-system-packages
sudo npm install -g less
sudo npm install -g less-plugin-clean-css
fi
@ -399,11 +397,12 @@ if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL !=
echo "SSL/HTTPS is enabled!"
else
echo "SSL/HTTPS isn't enabled due to choice of the user or because of a misconfiguration!"
if $ADMIN_EMAIL = "odoo@example.com" ; then
echo "Certbot does not support registering odoo@example.com. You should use real e-mail address."
if [ " $ADMIN_EMAIL " = "odoo@example.com" ] ; then
echo "Certbot does not support registering odoo@example.com. You should use real e-mail address."
fi
if $WEBSITE_NAME = "_" ; then
echo "Website name is set as _. Cannot obtain SSL Certificate for _. You should use real website address."
if [ " $WEBSITE_NAME " = "_" ] ; then
echo "Website name is set as _. Cannot obtain SSL Certificate for _. You should use real website address."
fi
fi