-
-
Save ravituvar/3884ec675815586570db1967a1952157 to your computer and use it in GitHub Desktop.
Install & run an odoo v10 Community Edition, in a Debian/distro by console without database Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://www.getopenerp.com/install-odoo-10-on-ubuntu-16-04/ | |
# Update & upgrade distro status | |
sudo apt-get update -s | |
sudo apt-get upgrade -s | |
# Install dev deps | |
sudo apt-get install -s git make gcc curl poppler-utils mc bzr lptools antiword | |
sudo apt-get install -s postgresql-client postgresql-client-common | |
# Install Python deps | |
sudo apt-get install -s python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako | |
sudo apt-get install -s python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing | |
sudo apt-get install -s python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug | |
sudo apt-get install -s python-xlwt python-yaml python-zsi python-pip python-pypdf python-passlib python-decorator python-dev | |
sudo apt-get install -s python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl | |
sudo apt-get install -s python-egenix-mxdatetime python-usb python-serial python-pydot python-psutil python-paramiko poppler-utils | |
sudo apt-get install -s python-pdftools python-requests python-xlsxwriter python-suds python-ofxparse python-gevent | |
sudo apt-get install -s python-software-properties | |
mkdir Downloads | |
cd Downloads | |
wget -O python-psycogreen_1.0-1_all.deb http://dk.archive.ubuntu.com/ubuntu/pool/universe/p/python-psycogreen/python-psycogreen_1.0-1_all.deb | |
sudo dpkg -i python-psycogreen_1.0-1_all.deb | |
# Install AWS Cli | |
sudo pip install awscli | |
# Install node with nvm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install 6.10.3 | |
npm install -g less less-plugin-clean-css | |
# Create an user for odoo | |
sudo adduser --system --home=/opt/odoo --group odoo | |
# Install Dependencies | |
cd /opt/odoo | |
# Install WKHTMLTOPDF | |
sudo wget http://ftp.es.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d-1+deb7u1_amd64.deb | |
sudo dpkg -i libjpeg8_8d-1+deb7u1_amd64.deb | |
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-wheezy-amd64.deb | |
sudo dpkg -i wkhtmltox-0.12.1_linux-wheezy-amd64.deb | |
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage | |
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf | |
# Install Google Data APIS | |
sudo wget https://pypi.python.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz | |
sudo tar zxvf gdata-2.0.18.tar.gz | |
sudo chown -R odoo: gdata-2.0.18 | |
sudo -s | |
cd gdata-2.0.18/ | |
python setup.py install | |
exit | |
# Download odoo from git | |
sudo -s | |
git clone --depth=1 --branch=10.0 https://github.com/odoo/odoo.git /opt/odoo/odoo | |
sudo mv odoo/ odoo-10.0/ | |
sudo chown -R odoo: odoo-10.0 | |
# Create log folder | |
sudo mkdir /var/log/odoo | |
sudo chown -R odoo:root /var/log/odoo | |
# Create a config file | |
sudo cp /opt/odoo/odoo-10.0/debian/odoo.conf /etc/odoo.conf | |
sudo chown odoo: /etc/odoo.conf | |
sudo nano /etc/odoo.conf | |
sudo echo ";Log Settings" >> /etc/odoo.conf | |
sudo echo "logfile = /var/log/odoo/odoo.log" >> /etc/odoo.conf | |
sudo echo "log_level = error" >> /etc/odoo.conf | |
# Edit with your configs | |
# Custom :) | |
# Run Odoo | |
cd /opt/odoo/odoo-10.0 | |
./odoo-bin --config=/etc/odoo.conf | |
# Install & sestup monit | |
# TODO pending monint run on machine startup and retry policies by ping localhost:8069 & localhost:443 | |
sudo apt-get install monit | |
sudo echo "check process nginx with pidfile /var/run/nginx.pid" > /etc/monit/conf.d/nginx.conf | |
sudo echo " start program = \"/sudo service nginx start\"" >> /etc/monit/conf.d/nginx.conf | |
sudo echo " stop program = \"/sudo service stop\"" >> /etc/monit/conf.d/nginx.conf | |
sudo echo "check process nginx with pidfile /var/run/nginx.pid" > /etc/monit/conf.d/odoo.conf | |
sudo echo " start program = \"sudo service odoo start\"" >> /etc/monit/conf.d/odoo.conf | |
sudo echo " stop program = \"sudo service odoo stop\"" >> /etc/monit/conf.d/odoo.conf | |
# Install nginx | |
# TODO pending to setup as proxy & https | |
sudo apt-get install nginx-light nginx-common | |
# Clean | |
sudo rm /opt/theme/unzip theme_taurus_ecommerce_10.0.1.0.0.zip | |
sudo rm /opt/theme/snippet_client_carousel_73lines.zip | |
sudo rm /opt/odoo/libjpeg8_8d-1+deb7u1_amd64.deb | |
sudo rm /opt/odoo/wkhtmltox-0.12.1_linux-wheezy-amd64.deb | |
sudo rm /opt/odoo/gdata-2.0.18.tar.gz | |
sudo apt-get clean | |
sudo apt-get autoclean | |
sudo apt-get check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment