[MIG][19.0]install script: V19 compatibility

pull/458/head
Yenthe Van Ginneken 3 months ago committed by GitHub
commit 69c841276b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
################################################################################ ################################################################################
# Script for installing Odoo on Ubuntu 16.04, 18.04, 20.04 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 # Author: Yenthe Van Ginneken
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu server. It can install multiple Odoo instances # 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" 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. # 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 # IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 17.0
OE_VERSION="17.0" OE_VERSION="19.0"
# Set this to True if you want to install the Odoo enterprise version! # Set this to True if you want to install the Odoo enterprise version!
IS_ENTERPRISE="False" IS_ENTERPRISE="False"
# Installs postgreSQL V14 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance # Installs postgreSQL V16 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance
INSTALL_POSTGRESQL_FOURTEEN="True" INSTALL_POSTGRESQL_SIXTEEN="True"
# Set this to True if you want to install Nginx! # Set this to True if you want to install Nginx!
INSTALL_NGINX="False" 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 # 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, ## === 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 ## in order to have correct version of wkhtmltopdf installed, for a danger note refer to
## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ): ## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ):
## https://www.odoo.com/documentation/16.0/administration/install.html ## https://www.odoo.com/documentation/19.0/administration/install.html
# Check if the operating system is Ubuntu 22.04 # Check if the operating system is Ubuntu 24.04
if [[ $(lsb_release -r -s) == "22.04" ]]; then if [[ $(lsb_release -r -s) == "24.04" ]]; then
WKHTMLTOX_X64="https://packages.ubuntu.com/jammy/wkhtmltopdf" WKHTMLTOX_X64="https://packages.ubuntu.com/jammy/wkhtmltopdf"
WKHTMLTOX_X32="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 22.04 #No Same link works for both 64 and 32-bit on Ubuntu 24.04
else else
# For older versions of Ubuntu # 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" 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 # Install PostgreSQL Server
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----" echo -e "\n---- Install PostgreSQL Server ----"
if [ $INSTALL_POSTGRESQL_FOURTEEN = "True" ]; then if [ $$INSTALL_POSTGRESQL_SIXTEEN = "True" ]; then
echo -e "\n---- Installing postgreSQL V14 due to the user it's choise ----" echo -e "\n---- Installing postgreSQL V16 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 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 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 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 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 ----" 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 ----" echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
sudo apt-get install nodejs npm -y sudo apt-get install nodejs npm -y
@ -121,8 +121,8 @@ if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
sudo wget $_url sudo wget $_url
if [[ $(lsb_release -r -s) == "22.04" ]]; then if [[ $(lsb_release -r -s) == "24.04" ]]; then
# Ubuntu 22.04 LTS # Ubuntu 24.04 LTS
sudo apt install wkhtmltopdf -y sudo apt install wkhtmltopdf -y
else else
# For older versions of Ubuntu # 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 if [ $IS_ENTERPRISE = "True" ]; then
# Odoo Enterprise install! # Odoo Enterprise install!
sudo pip3 install psycopg2-binary pdfminer.six sudo pip3 install psycopg2-binary pdfminer.six --break-system-packages
echo -e "\n--- Create symlink for node"
sudo ln -s /usr/bin/nodejs /usr/bin/node
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"
@ -171,7 +169,7 @@ if [ $IS_ENTERPRISE = "True" ]; then
echo -e "\n---- Added Enterprise code under $OE_HOME/enterprise/addons ----" echo -e "\n---- Added Enterprise code under $OE_HOME/enterprise/addons ----"
echo -e "\n---- Installing Enterprise specific libraries ----" 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
sudo npm install -g less-plugin-clean-css sudo npm install -g less-plugin-clean-css
fi fi
@ -399,11 +397,12 @@ if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL !=
echo "SSL/HTTPS is enabled!" echo "SSL/HTTPS is enabled!"
else else
echo "SSL/HTTPS isn't enabled due to choice of the user or because of a misconfiguration!" echo "SSL/HTTPS isn't enabled due to choice of the user or because of a misconfiguration!"
if $ADMIN_EMAIL = "odoo@example.com";then if [ "$ADMIN_EMAIL" = "odoo@example.com" ]; then
echo "Certbot does not support registering odoo@example.com. You should use real e-mail address." echo "Certbot does not support registering odoo@example.com. You should use real e-mail address."
fi 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
fi fi

Loading…
Cancel
Save