Skip to content

Instantly share code, notes, and snippets.

@bistaray
Last active April 15, 2022 02:51
Show Gist options
  • Save bistaray/fdbbdbae14f49c0bab2587d117dcd3b8 to your computer and use it in GitHub Desktop.
Save bistaray/fdbbdbae14f49c0bab2587d117dcd3b8 to your computer and use it in GitHub Desktop.
Install Odoo v10 Enterprise (with Bista repositories)
#!/bin/bash
################################################################################
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04
# Author: Yenthe Van Ginneken
# Adjusted: Ray Carnes
# Assumes you already have an Ubuntu user called "odoo" with a home folder
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh
# Place this content in it and then make the file executable:
# sudo chmod +x odoo-install.sh
# Execute the script to install Odoo:
# ./odoo-install
################################################################################
WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-i386.deb
#--------------------------------------------------
# Update Server
#--------------------------------------------------
echo -e "\n---- Update Server ----"
sudo apt-get update
sudo apt-get upgrade -y
#--------------------------------------------------
# Install PostgreSQL Server
#--------------------------------------------------
service postgres status
if [ "$?" -gt "0" ]; then
echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql -y
else
echo -e "\n---- PostgreSQL Server already installed - skipping install ----"
fi
echo -e "\n---- Creating the ODOO PostgreSQL User ----"
sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true
#--------------------------------------------------
# Install Dependencies
#--------------------------------------------------
echo -e "\n---- Install tool packages ----"
sudo apt-get install wget subversion git bzr bzrtools python-pip gdebi-core -y
echo -e "\n---- Install python packages ----"
sudo apt-get install python-suds python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y
echo -e "\n---- Install python libraries ----"
sudo pip install gdata psycogreen ofxparse XlsxWriter
echo -e "\n--- Install other required packages"
sudo apt-get install node-clean-css -y
sudo apt-get install node-less -y
sudo apt-get install python-gevent -y
sudo apt-get install nodejs npm -y
sudo npm install -g less -y
sudo npm install -g less-plugin-clean-css -y
sudo ln -s /usr/bin/nodejs /usr/bin/node
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 10 ----"
#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
sudo git clone --depth 1 --branch 10.0 https://www.github.com/bistaray/odoo /opt/odoo10/odoo
sudo git clone --depth 1 --branch 10.0 https://www.github.com/bistaray/enterprise /opt/odoo10/enterprise
sudo cp /opt/odoo10/odoo/debian/odoo.conf /etc/odoo-server.conf
echo -e "\n---- Create Log directory ----"
sudo mkdir /var/log/odoo10
sudo chown odoo:odoo /var/log/odoo10
echo "\n---- Create startup script file ---"
sudo cat <<EOF > /etc/systemd/system/odoo10.service
[Unit]
Description=Odoo
Documentation=http://www.odoo.com/
[Service]
# Ubuntu/Debian convention:
Type=simple
User=odoo
ExecStart=/opt/odoo10/odoo/odoo-bin -c /etc/odoo-server.conf
[Install]
WantedBy=default.target
EOF
sudo chmod a+x /etc/systemd/system/odoo10.service
echo -e "\n---- Addons path ----"
echo -e "\n---- logfile ----"
echo -e "* Starting Odoo Service"
sudo systemctl start odoo10.service
echo -e "* Activating Odoo Service to autostart at boot time"
sudo systemctl enable odoo10.service
@5B-MAVERICKS
Copy link

Thanks ! Very useful !
But now, what should I do to actually use ODOO ?
I try to display the page htpp://ipaddress:8069... but error.
Then I rebooted the server, and now displaying "NOT FOUND".

@edivancarvalho
Copy link

aqui esta do mesmo jeito,

@nkagou
Copy link

nkagou commented May 22, 2017

it work for you?

@babeeshc88
Copy link

How to use odoo_10.0+e.latest_all.deb file to install odoo enterprise version?

@odooodoo1
Copy link

odooodoo1 commented Jun 11, 2017

hello
Good work
it not work the Repository. Can you fix it ???
remote: Repository not found.
fatal: repository 'https://github.com/bistaray/enterprise.git/' not found

http://localhost:8069 not work
localhost:8069/web/database/manager not work

Can you fix it ???

Thanks

@bistaray
Copy link
Author

The Bista repository is a private repository for Bista Employees.

@bistaray
Copy link
Author

Thanks @wdalhaj for the update.

@phuongkhpt
Copy link

Pls invite access repo Bista Employees.

@tesroom
Copy link

tesroom commented Oct 18, 2017

can you invite me to invite access repo Bista Employees?

@pmontseny
Copy link

Pls invite access repo Bista Employees.

@zhongwm
Copy link

zhongwm commented Oct 24, 2017

Please invite access repo Bista Employees.

@vcloud9ray
Copy link

Please contact Faisal for access to the repository.

@mehmetaktan
Copy link

Please invite access repo Bista Employees

@rfernandezb3
Copy link

Aún funciona?

@SalahAdDin
Copy link

does it still work?

@pok1800
Copy link

pok1800 commented Sep 11, 2018

Please invite access repo Bista Employees.

@RUSampson
Copy link

Plz invite for access this repos, thx

@gabr13l213
Copy link

Please invite access repo Bista Employees. thx

@SPIDER-L33T
Copy link

Please invite access repo Bista Employees

@joytao-zhu
Copy link

Please invite access repo Bista Employees

@karispk
Copy link

karispk commented May 5, 2019

Pls invite access repo Bista Employees.

Copy link

ghost commented Aug 3, 2019

Pls invite access repo Bista Employees

@jr1003
Copy link

jr1003 commented Oct 18, 2019

Pls invite access repo Bista Employees

@t3ch9
Copy link

t3ch9 commented Apr 24, 2020

Pls invite access repo Bista Employees.

@AnoodALhjaj
Copy link

Pls invite access repo Bista Employees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment