Skip to content

kastmada/InstallScript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odoo Install Script

This script is based on the install script from Yenthe666 but goes a bit further and has been improved. This script will also give you the ability to define an xmlrpc_port in the .conf file that is generated under /etc/ This script can be safely used in a multi-odoo code base server because the default Odoo port is changed BEFORE the Odoo is started. It is also optimized for Debian 10 and multiple instances under NGINX.

Script also enables the Uncomplicated Firewall rules for selected ports (http, https, ssh, odoo, longpolling).

Installing Nginx

If you set the parameter INSTALL_NGINX to True you should also configure workers. Without workers you will probably get connection loss issues. Look at the deployment guide from Odoo on how to configure workers.

Workers configuration sample:

Server with 4 CPU, 8 Thread 60 concurrent users 60 users / 6 = 10 <- theorical number of worker needed (4 * 2) + 1 = 9 <- theorical maximal number of worker We’ll use 8 workers + 1 for cron. We’ll also use a monitoring system to measure cpu load, and check if it’s between 7 and 7.5 . RAM = 9 * ((0.8150) + (0.21024)) ~= 3Go RAM for Odoo in /etc/odoo.conf:

[options]
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 8

Installation procedure

1. Download the script:
sudo wget https://raw.githubusercontent.com/kastmada/InstallScript/14.0/odoo_install_debian.sh
2. Modify the parameters as you wish.

There are a few things you can configure, this is the most used list:
OE_USER will be the username for the system user.
GENERATE_RANDOM_PASSWORD if this is set to True the script will generate a random password, if set to Falsewe'll set the password that is configured in OE_SUPERADMIN. By default the value is True and the script will generate a random and secure password.
INSTALL_WKHTMLTOPDF set to False if you do not want to install Wkhtmltopdf, if you want to install it you should set it to True.
OE_PORT is the port where Odoo should run on, for example 8069.
OE_VERSION is the Odoo version to install, for example 14.0 for Odoo V14.
IS_ENTERPRISE will install the Enterprise version on top of 14.0 if you set it to True, set it to False if you want the community version of Odoo 14.
OE_SUPERADMIN is the master password for this Odoo installation.
INSTALL_NGINX is set to False by default. Set this to True if you want to install Nginx.
WEBSITE_NAME Set the website name here for nginx configuration
WEBSITE_NAME Set the website name here for nginx configuration
ENABLE_SSL Set this to True to install certbot and configure nginx with https using a free Let's Encrypted certificate
ADMIN_EMAIL Email is needed to register for Let's Encrypt registration. Replace the default placeholder with an email of your organisation.
INSTALL_NGINX and ENABLE_SSL must be set to True and the placeholder in ADMIN_EMAIL must be replaced with a valid email address for certbot installation
By enabling SSL though Let's Encrypt you agree to the following policies

3. Make the script executable

sudo chmod +x odoo_install_debian.sh
4. Execute the script:
sudo ./odoo_install_debian.sh

About

Odoo install script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%