Odoo - OpenERP - How to install OpenERP Odoo v8 from github or HiTechnologia gitlab server complete guide ?

Support
Support
5000
| 2 1 2
Asked on 8/25/15, 2:21 PM
0
vote
3204 Views

To install Odoo v8.0 on Ubuntu 14.04 LTS from github or HiTechnologia gitlab server:

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install git apache2 postgresql python-pip

sudo adduser --system --shell=/bin/bash --home=/opt/odoo --group odoo

sudo su - postgres

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

exit

Then copy & paste below text to install all required apts, libraries, apps etc... for Odoo v8.

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi \
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 \
graphviz ghostscript postgresql-client python-dateutil python-feedparser python-gdata \
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-imaging python-matplotlib python-passlib node-less poppler-utils \
zip unzip ccze rsync libauthen-sasl-cyrus-perl libauthen-sasl-perl libdbi-perl libdbd-pg-perl

Install gdata for Google 

cd /opt/odoo
sudo wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.tar.gz
sudo tar zxvf gdata-2.0.17.tar.gz
sudo chown -R odoo:odoo *
sudo chmod -R 775 *
cd gdata-2.0.17/
sudo python setup.py install
cd ..
sudo pip install gdata --upgrade

In Gengo Module needed otherwise not required

sudo pip install gengo

WARNING Demo openerp.addons.base_gengo.wizard.base_gengo_translations: 

Gengo library not found, Gengo features disabled. 

If you plan to use it, please install the gengo library from http://pypi.python.org/pypi/gengo

Run Below if Send To Printer Module Required. (base_report_to_printer & printer_tray)

This module requires pycups https://pypi.python.org/pypi/pycups
1) sudo apt-get install cups
2) sudo apt-get install libcups2-dev
3) sudo apt-get install python-dev OR sudo apt-get install python3-dev
4) sudo easy_install pycups OR sudo pip install pycups

Run Below if Odoo - OpenERP - autobackup module required:  

ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP?
sudo pip install pysftp

To Install wkhtmltopdf:

sudo apt-get --purge remove wkhtmltopdf
sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
sudo chown root:root /usr/bin/wkhtmltopdf
sudo chmod +x /usr/bin/wkhtmltopdf
sudo chown -R odoo: *
sudo chmod -R 775 *

To Clone repo from Github or HiTechnologia GitLab Server

sudo git clone http://hitechnologia.com:8090/hitechnologia/test.git --branch development
sudo git clone http://hitechnologia.com:8090/hitechnologia/test.git

sudo git clone https://www.github.com/odoo/odoo.git --branch 8.0 (optional to select branch 8.0)
sudo chown -R odoo:odoo *

To setup odoo-server.conf file setting:

sudo nano /etc/odoo-server.conf
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = pgsqlpassword
addons_path = /opt/odoo/odoo/addons
logfile = /var/log/odoo/odoo-server.log
; logrotate = True
dbfilter = .*
list_db = True

sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo

Installing a boot script (boot script for Odoo - to auto start Odoo Service)

sudo nano /etc/init.d/odoo-server
Use the following script: (copy & paste the text in asterik lines) 
*******************************************************************************
#!/bin/sh
### BEGIN INIT INFO
# Provides: odoo-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Business Applications
# Description: ODOO Business Applications.
### END INIT INFO
PATH=/bin:/sbin:/usr/bin
DAEMON=/opt/odoo/odoo/openerp-server
NAME=odoo-server
DESC=odoo-server

# Specify the user name (Default: openerp).
USER=odoo

# Specify an alternate config file (Default: /etc/odoo-server.conf).
CONFIGFILE="/etc/odoo-server.conf"

# pidfile
PIDFILE=/var/run/$NAME.pid

# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c $CONFIGFILE"
[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0
checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d /proc/$pid ] && return 0
return 1
}

case "${1}" in
start)
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
stop)
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
echo "${NAME}."
;;

restart|force-reload)
echo -n "Restarting ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
sleep 1
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;

esac
exit 0 

sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server
sudo /etc/init.d/odoo-server start

You should now be able to view the logfile and see that the server has started
less /var/log/odoo/odoo-server.log
Stop the server
sudo /etc/init.d/odoo-server stop

Automatic Startup and Shutdown
sudo update-rc.d odoo-server defaults
If you reboot the server everything should be working.
ps aux | grep odoo
odoo      3257 12.2  5.9 456372 60064 ?        Sl   22:43    0:00 python /opt/odoo/odoo/openerp-server -c /etc/odoo-server.conf
root        3264  0.0  0.2  11744  2184 pts/0    S+   22:43   0:00 grep --color=auto odoo

Security - Install Clam AntiVirus to protect server from virus. 

sudo apt-get install aptitude
sudo aptitude -y install clamav
sudo freshclam
# clamscan --infected --remove --recursive /home

Support
Support
5000
| 2 1 2
Answered on 8/25/15, 2:34 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/25/15, 2:21 PM
Seen: 3204 times
Last updated: 8/25/15, 2:53 PM