Oode
Oode
/bin/bash
# to run the script "sudo /bin/sh odoo_dev.sh"
################################################################################
# Script for preparing Odoo developing platform on Ubuntu 14.04, 15.04 and 16.04
(could be used for other version too)
# Author: Mahmoud Abdel Latif
# Mobile No: +201002688172
# Email: [email protected]
# Website: http://www.mah007.com
#-------------------------------------------------------------------------------
# This script will make ur computer ready for developing on ODOO from 8 to 11
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo_developing.sh
# Place this content in it and then make the file executable:
# sudo chmod +x odoo_developing.sh
# git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
# Execute the script to install Odoo:
# ./odoo-developing
################################################################################
##fixed parameters
#odoo instead of odoo use ur user name .EG OE_USER="mahmoud"
OE_USER="odoo"
#The default port where this Odoo instance will run under (provided you use the
command -c in the terminal)
#Set to true if you want to install it, false if you don't need it or have it
already installed.
INSTALL_WKHTMLTOPDF="True"
# Set this to True if you want to install Odoo 9 10 11 Enterprise! ( you can use
enterprise normaly too ;) )
IS_ENTERPRISE="True"
##
### WKHTMLTOPDF download 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
## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-
1.xenial_amd64.deb
WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-
1.xenial_i386.deb
#--------------------------------------------------
# Update Server
#--------------------------------------------------
echo -e "\n---- Update Server ----"
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install default-jre -y
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install default-jdk -y
sudo apt-get update
sudo apt-get install oracle-java8-installer -y
sudo add-apt-repository ppa:mystic-mirage/pycharm
sudo apt-get update
#--------------------------------------------------
# Install PostgreSQL Server
#--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql postgresql-server-dev-* -y
#--------------------------------------------------
# Install Dependencies
#--------------------------------------------------
echo -e "\n---- Install tool packages ----"
sudo apt-get install wget subversion git bzr bzrtools python-pip python3-pip gdebi-
core -y pysassc
#--------------------------------------------------
# Install Wkhtmltopdf if needed
#--------------------------------------------------
if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9
----"
#pick up correct one from x64 & x32 versions:
if [ "`getconf LONG_BIT`" == "64" ];then
_url=$WKHTMLTOX_X64
else
_url=$WKHTMLTOX_X32
fi
sudo wget $_url
sudo gdebi --n `basename $_url`
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
else
echo "Wkhtmltopdf isn't installed due to the choice of the user!"
fi
if [ $IS_ENTERPRISE = "True" ]; then
# Odoo Enterprise install!
fi
sudo ln -s /usr/bin/nodejs /usr/bin/node
echo "-----------------------------------------------------------"
echo "Done! The Odoo developing platform is ready:"
echo "Restart restart ur computer and start developing and have fun ;)"
echo "-----------------------------------------------------------"