From 7a51557ef6b2e710d57ae21c39e346b1b56fa9f1 Mon Sep 17 00:00:00 2001 From: Swapnesh Date: Sat, 13 Sep 2025 20:36:25 +0530 Subject: [PATCH 1/2] [MIG][18.0]install script --- odoo_install.sh | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 3bd0b90..9938c30 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -1,6 +1,6 @@ #!/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 #------------------------------------------------------------------------------- # 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="17.0" +OE_VERSION="19.0" # Set this to True if you want to install the Odoo enterprise version! -IS_ENTERPRISE="False" -# Installs postgreSQL V14 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance -INSTALL_POSTGRESQL_FOURTEEN="True" +IS_ENTERPRISE="True" +# Installs postgreSQL V16 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance +INSTALL_POSTGRESQL_SIXTEEN="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 @@ -41,7 +41,7 @@ WEBSITE_NAME="_" # Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.) LONGPOLLING_PORT="8072" # Set to "True" to install certbot and have ssl enabled, "False" to use http -ENABLE_SSL="True" +ENABLE_SSL="False" # Provide Email to register ssl certificate ADMIN_EMAIL="odoo@example.com" ## @@ -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/16.0/administration/install.html +## https://www.odoo.com/documentation/19.0/administration/install.html -# Check if the operating system is Ubuntu 22.04 -if [[ $(lsb_release -r -s) == "22.04" ]]; then +# Check if the operating system is Ubuntu 24.04 +if [[ $(lsb_release -r -s) == "24.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 22.04 + #No Same link works for both 64 and 32-bit on Ubuntu 24.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_FOURTEEN = "True" ]; then - echo -e "\n---- Installing postgreSQL V14 due to the user it's choise ----" +if [ $$INSTALL_POSTGRESQL_SIXTEEN = "True" ]; then + 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 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) == "22.04" ]]; then - # Ubuntu 22.04 LTS + if [[ $(lsb_release -r -s) == "24.04" ]]; then + # Ubuntu 24.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 From d4c6a3b8166204a232818411670d1dec4781f845 Mon Sep 17 00:00:00 2001 From: Swapnesh Date: Sat, 13 Sep 2025 20:58:36 +0530 Subject: [PATCH 2/2] [FIX][19.0]set default old values --- odoo_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 9938c30..4051f14 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -26,7 +26,7 @@ OE_PORT="8069" # IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 17.0 OE_VERSION="19.0" # Set this to True if you want to install the Odoo enterprise version! -IS_ENTERPRISE="True" +IS_ENTERPRISE="False" # Installs postgreSQL V16 instead of defaults (e.g V12 for Ubuntu 20/22) - this improves performance INSTALL_POSTGRESQL_SIXTEEN="True" # Set this to True if you want to install Nginx! @@ -41,7 +41,7 @@ WEBSITE_NAME="_" # Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.) LONGPOLLING_PORT="8072" # Set to "True" to install certbot and have ssl enabled, "False" to use http -ENABLE_SSL="False" +ENABLE_SSL="True" # Provide Email to register ssl certificate ADMIN_EMAIL="odoo@example.com" ##