Skip to content

Instantly share code, notes, and snippets.

@jjackofall
Created September 20, 2022 07:53
Show Gist options
  • Save jjackofall/fd3aeabb5c88420b5cceb871d9b2d252 to your computer and use it in GitHub Desktop.
Save jjackofall/fd3aeabb5c88420b5cceb871d9b2d252 to your computer and use it in GitHub Desktop.
#!/bin/bash
#############################################################################################
# sudo chmod +x odoo-install.sh #
# Execute the script to install Odoo: #
# ./odoo-install #
# Add required details on .conf file #addons path, DataBase Name, User Name, User Password; #
# Open Pycharm and create New enviroment and edit configuration file; #
# Add Script path (/path/odoo-bin), Parameters (-c /path/odoo.conf); save and exit. #
# Run "pip install -r /path/requirement.txt" #
# To check Database is created or not # psql -U odoo -h localhost #
# #
# if not, run this command manually to setu psql; #
# Download PSQL and Create User and Database; #
# #
# sudo apt install postgresql postgresql-contrib #
# sudo -i -u postgres #
# createuser --interactive #
# createdb odoo #
# #
#Assigned User Authentication and Password; #
# psql #
# alter role odoo with superuser; #
# alter role odoo with password 'odoo'; #
#############################################################################################
# ODOO-11 ODOO-12 ODOO-13 #
# (Odoo-13) sudo apt install libpq-dev python3-dev #
#############################################################################################
### WKHTMLTOPDF download links
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb
# WKHTMLTOX_X32=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_i386.deb
#--------------------------------------------------
# Update Server
echo -e "\n---- Update Server ----"
# universe package is for Ubuntu 18.x
sudo add-apt-repository universe
sudo add-apt-repository ppa:mystic-mirage/pycharm
#-------------------------------------------------------------------------------
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
# libpng12-0 dependency for wkhtmltopdf
sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ xenial main"
sudo apt-get update
sudo apt-get upgrade -y
#---------------------------------------------------------
# Install PostgreSQL Server
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql postgresql-contrib -y
echo -e "\n---- Creating the ODOO-SuperUser in PostgreSQL ----"
sudo -u postgres psql -c "CREATE ROLE odoo WITH SUPERUSER CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD 'odoo';"
echo -e "\n---- Creating the ODOO DATABASE in PSQL ----"
sudo -u postgres psql -c 'create database odoo;'
#---------------------------------------------------------
# Install Dependencies
#---------------------------------------------------------
echo -e "\n--- Installing Python 3 + pip3 --"
sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libpng12-0 gdebi -y
# echo -e "\n---- Install python packages/requirements ----"
# sudo pip3 install -r https://github.com/odoo/odoo/raw/${OE_VERSION}/requirements.txt
echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
sudo apt-get install nodejs npm -y
sudo npm install -g rtlcss
# Install PyCharm
sudo apt install snapd snapd-xdg-open
# sudo apt-get install pycharm-community
echo -e "\n---- Installing Pycharm Community----"
sudo snap install pycharm-community --classic
# Install Vim editor
echo -e "\n---- Installing VIM editor----"
sudo apt-get install vim -y
# Install ODOO
#--------------------------------------------------
echo -e "\n==== Installing ODOO-10 Server File ===="
git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch /home/ksolves/Documents/odoo/odoo10
echo -e "\n==== Installing ODOO-12 Server File ===="
git clone https://www.github.com/odoo/odoo --depth 1 --branch 12.0 --single-branch /home/ksolves/Documents/odoo/odoo12
echo -e "\n==== Installing ODOO-11 Server File ===="
git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch /home/ksolves/Documents/odoo/odoo11
echo -e "\n==== Installing ODOO-13 Server File ===="
git clone https://www.github.com/odoo/odoo --depth 1 --branch 13.0 --single-branch /home/ksolves/Documents/odoo/odoo13
# Install Sublime
echo -e "\n---- Installing sublime----"
sudo apt-get install sublime-text
# Install Python3.7 with Enviroment
echo -e "\n==== Installing Python3.7 with enve ===="
sudo apt-get install python3.7*
sudo apt install libpq-dev python3-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment