pull/120/merge
MinhHQ 7 years ago committed by GitHub
commit 35bc23df1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,22 +1,22 @@
# [Odoo](https://www.odoo.com "Odoo's Homepage") Install Script # [Odoo](https://www.odoo.com "Odoo's Homepage") Install Script
This script is based on the install script from André Schenkels (https://github.com/aschenkels-ictstudio/openerp-install-scripts) This script is based on the install script from André Schenkels (https://github.com/aschenkels-ictstudio/openerp-install-scripts)
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/ but goes a bit further and has been improved. This script will also give you the ability to define an http_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. 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.
## Installation procedure ## Installation procedure
##### 1. Download the script: ##### 1. Download the script:
``` ```
sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/11.0/odoo_install.sh sudo wget https://raw.githubusercontent.com/minhhq09/InstallScript/12.0-test/odoo_install.sh
``` ```
##### 2. Modify the parameters as you wish. ##### 2. Modify the parameters as you wish.
There are a few things you can configure, this is the most used list:<br/> There are a few things you can configure, this is the most used list:<br/>
```OE_USER``` will be the username for the system user.<br/> ```OE_USER``` will be the username for the system user.<br/>
```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```.<br/> ```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```.<br/>
```OE_PORT``` is the port where Odoo should run on, for example 8069.<br/> ```OE_PORT``` is the port where Odoo should run on, for example 8069.<br/>
```OE_VERSION``` is the Odoo version to install, for example ```11.0``` for Odoo V11.<br/> ```OE_VERSION``` is the Odoo version to install, for example ```12.0``` for Odoo V12.<br/>
```IS_ENTERPRISE``` will install the Enterprise version on top of ```11.0``` if you set it to ```True```, set it to ```False``` if you want the community version of Odoo 11.<br/> ```IS_ENTERPRISE``` will install the Enterprise version on top of ```12.0``` if you set it to ```True```, set it to ```False``` if you want the community version of Odoo 12.<br/>
```OE_SUPERADMIN``` is the master password for this Odoo installation.<br/> ```OE_SUPERADMIN``` is the master password for this Odoo installation.<br/>
#### 3. Make the script executable #### 3. Make the script executable

@ -25,7 +25,7 @@ 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: 12.0, 11.0, 10.0, 9.0 or saas-18. When using 'master' the master version will be installed. #Choose the Odoo version which you want to install. For example: 12.0, 11.0, 10.0, 9.0 or saas-18. When using 'master' the master version will be installed.
OE_VERSION="saas-11.5" # Note that after v12 is released (03/10/2018) you should change this to 12.0 OE_VERSION="12.0"
# Set this to True if you want to install Odoo 12 Enterprise! # Set this to True if you want to install Odoo 12 Enterprise!
IS_ENTERPRISE="False" IS_ENTERPRISE="False"
#set the superadmin password #set the superadmin password
@ -35,10 +35,10 @@ OE_CONFIG="${OE_USER}-server"
## ##
### WKHTMLTOPDF download links ### WKHTMLTOPDF download links
## === 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 wkhtmltox installed, for a danger note refer to ## in order to have correct version of wkhtmltox installed, for a danger note refer to
## https://www.odoo.com/documentation/8.0/setup/install.html#deb ): ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-i386.deb WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_i386.deb
#-------------------------------------------------- #--------------------------------------------------
# Update Server # Update Server
@ -51,7 +51,7 @@ sudo apt-get upgrade -y
# Install PostgreSQL Server # Install PostgreSQL Server
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----" echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql -y sudo apt-get install postgresql postgresql-server-dev-10 build-essential -y
echo -e "\n---- Creating the ODOO PostgreSQL User ----" echo -e "\n---- Creating the ODOO PostgreSQL User ----"
sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
@ -60,7 +60,7 @@ sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
# Install Dependencies # Install Dependencies
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n--- Installing Python 3 + pip3 --" echo -e "\n--- Installing Python 3 + pip3 --"
sudo apt-get install python3 python3-pip git gdebi-core -y sudo apt-get install python3 python3-pip python3-pil python3-lxml python-ldap3 python3-dev python3-setuptools git gdebi-core libldap2-dev libsasl2-dev libxml2-dev libxslt1-dev libjpeg-dev -y
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
@ -71,6 +71,7 @@ sudo apt-get install node-less -y
#-------------------------------------------------- #--------------------------------------------------
if [ $INSTALL_WKHTMLTOPDF = "True" ]; then if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 12 ----" echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 12 ----"
sudo apt install xfonts-base xfonts-75dpi -y
#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
@ -145,7 +146,7 @@ sudo touch /etc/${OE_CONFIG}.conf
echo -e "* Creating server config file" echo -e "* Creating server config file"
sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/${OE_CONFIG}.conf" sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/${OE_CONFIG}.conf"
sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf" sudo su root -c "printf 'admin_passwd = ${OE_SUPERADMIN}\n' >> /etc/${OE_CONFIG}.conf"
sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf" sudo su root -c "printf 'http_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf" sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"
if [ $IS_ENTERPRISE = "True" ]; then if [ $IS_ENTERPRISE = "True" ]; then
sudo su root -c "printf 'addons_path=${OE_HOME}/enterprise/addons,${OE_HOME_EXT}/addons\n' >> /etc/${OE_CONFIG}.conf" sudo su root -c "printf 'addons_path=${OE_HOME}/enterprise/addons,${OE_HOME_EXT}/addons\n' >> /etc/${OE_CONFIG}.conf"

Loading…
Cancel
Save