Successfully reported this slideshow.
Your SlideShare is downloading. ×

Odoo V8 Installation

Odoo V8 : Easy installation within few minutes
What is in for you in this presentation ?
After following this pres...
Pre-install Instructions
We will see Odoo V8 installation just afte...

YouTube videos are no longer supported on SlideShare

View original on YouTube

Loading in …3

Check these out next

1 of 48 Ad

More Related Content

Slideshows for you (20)

Viewers also liked (20)


Similar to Odoo V8 Installation (20)

More from Emipro Technologies Pvt. Ltd. (15)


Recently uploaded (20)

Odoo V8 Installation

  1. 1. Odoo V8 : Easy installation within few minutes
  2. 2. What is in for you in this presentation ? After following this presentation you will be able to learn, ● Set up Odoo properly. ● Start Odoo in secure ssl mode. ● Redirect IP to domain in order to access Odoo from domain name. ● How to store attachments over physical place in server. ● Know the useful tips to maintain Odoo very well.
  3. 3. Pre-install Instructions We will see Odoo V8 installation just after purchasing blank server on cloud. Platform Ubuntu : 12.04 We have marked some slides as “optional” so those settings might not be necessary if there is need of only basic installation.
  4. 4. Pre-install Instructions It is advisable that you run following two commands, after loading new server. ● sudo apt-get update ● sudo apt-get upgrade
  5. 5. Install PostgreSQL database ● sudo apt-get install postgresql Create database user ● sudo su postgres ● createuser -s odoo (This user shall be super user) Set password for database user ● psql template1 ● alter user odoo with password 'odoo'; Setting complex password for database user is advisable.
  6. 6. Setup pg_hba.conf ● vi /etc/postgresql/9.1/main/pg_hba.conf Add following line in vi editor: ● local all odoo md5 Do not forget to restart PostgresSQL database server, after this change /etc/init.d/postgresql restart
  7. 7. Required Packages needs to be install prior to set up Odoo. sudo apt-get install 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-zsi python-docutils python-psutil wget python-unittest2 python-mock python- jinja2 python-dev libpq-dev poppler-utils python-pdftools antiword python- setuptools python-pybabel python-decorator python-requests python-pyPdf python-passlib
  8. 8. odoo opt conf logbackup filestoreodoo custom_addons Standard Directory Structure
  9. 9. Add system user ● sudo adduser --system --home=/opt/odoo --group odoo ● sudo su - odoo -s /bin/bash ● When this command is executed, you will be in odoo’s home directory: /opt/odoo Install git & clone V8 branch ● sudo apt-get install git ● Goto odoo folder in /opt directory ● sudo git clone -b 8.0
  10. 10. Install git & clone V8 branch ● By cloning odoo from github there will be one folder created with all necessary files in /opt/odoo/odoo folder.
  11. 11. Create backup directory. ● Create a backup folder under /opt/odoo/backup It is advisable that to keep database backup of your live server in this folder. ● Backup file format shall be dbname_dd_mm_yyyy.sql
  12. 12. Create configuration file for Odoo. ● mkdir /opt/odoo/conf ● sudo cp /opt/odoo/odoo/debian/openerp-server.conf /opt/odoo/conf/odoo_server.conf ● sudo chown odoo.odoo /opt/odoo/conf/odoo_server.conf ● sudo chmod 777 /opt/odoo/conf/odoo_server.conf ● Open odoo_server.conf file and set the necessary options.
  13. 13. General options of odoo_server.conf ● admin_password :- Super password for creating, restoring and backing up databases ● db_host :- Database host ( use localhost if there is local database to be used ) ● db_port :- Default port of PostgreSQL database ● db_user :- Database user ● db_password :- Database user password ● addons_path :- Custom addons & Odoo addons path ● logfile :- Log file path ● logrotate :- This will create rotate log file on each day by datewise. ● xmlrpc_port :- Port on which Odoo runs. ( Default is 8069) ● data_dir :- To store attachments on physical drive & also store Odoo Apps
  14. 14. Advance options of odoo_server.conf ( Optional !! use only if specific need ) ● workers :- <no of worker> ( Using this option, we can achieve multi instance of Odoo server in order to serve more client requests. ) ● email_from :- Specify the SMTP email address for sending email ● smtp_server :- Specify the SMTP server for sending email ● smtp_port :- Specify the SMTP port ● smtp_ssl :- If passed, SMTP connections will be encrypted with SSL (STARTTLS) ● smtp_user :- Specify the SMTP username for sending email ● smtp_password :- Specify the SMTP password for sending email ● csv_internal_sep :- Specify the default separator for csv file
  15. 15. Example of my odoo_server.conf file. [options] ; This is the password that allows database operations: admin_passwd = your_custom_super_password db_host = localhost db_port = 5432 db_user = odoo db_password = odoo addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo/openerp/addons,/opt/odoo/custom_addons logfile = /opt/odoo/log/odoo.log logrotate = True data_dir = /opt/odoo/filestore
  16. 16. Create log folder for Odoo. ● mkdir /opt/odoo/log ● sudo touch /opt/odoo/log/odoo.log If logrotate option is used in odoo_server.conf file then, system will rotate log file each day with datewise names inside /opt/odoo/log/ folder.
  17. 17. Create custom_addons folder for storing customised / community modules. ● Add custom addon folder's path into addon_path option of odoo_server.conf file. It is not good to transfer custom/community modules to Odoo's default addon folders. Instead, we shall transfer them to custom_addons folder. ● We have already setup path in odoo_server.conf file's addons_path option.
  18. 18. Create filestore folder for Odoo ( Optional !! use only if specific need ) ● sudo mkdir /opt/odoo/filestore It's advisable that you store all files/attachments to physical folder instead of saving them on database. When so many files are saved in database then it's size will be too much large. That can cause too much problems. ● We have already setup “data_dir” option to odoo_server.conf file in previous slide. ● By setting that option, by default your all attachments will store on physical folder under /opt/odoo/filestore folder. Separate folder per each database will be created and under that folder & your attachment will be stored over there. All your attachment will be created in encrypted mode.
  19. 19. Create filestore folder for Odoo ( Optional !! use only if specific need ) ● Another feature of “data_dir” option is, when you install any App from Settings >> Modules >> Apps menu, automatically module will downloaded to /opt/odoo/filestore/addons folder.
  20. 20. Make directory as under : ● sudo mkdir /var/lib/odoo ● chown -R odoo.root /var/lib/odoo
  21. 21. Setup wkhtmltopdf : ● It is required for to convert all Odoo reports from html to pdf. ● sudo wget - ● sudo dpkg -i wkhtmltox- ● sudo cp /usr/local/bin/wkhtmltopdf /usr/bin ● sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
  22. 22. Setup Odoo init file ● sudo cp /opt/odoo/odoo/debian/init /etc/init.d/odoo ( In case if you don't want to copy file and generate your own then I have written the ideal file content on next slide) ● sudo chmod 777 /etc/init.d/odoo ● Let us first understand the necessary options of that file
  23. 23. Setup Odoo init file : ( Main options to configure properly inside that file ) ● DAEMON ( Odoo executable file path ) ● NAME (Service Name) ● DESC (Service Description) ● CONFIG (Odoo configuration file we made earlier ) ● LOGFILE ( No need to define here because we already included in conf file earlier in odoo_server.conf ) ● PIDFILE ( This file will contain process ID for Odoo. ) ● USER ( System user which we added earlier ) ● export LOGNAME=$USER
  24. 24. Setup Odoo init file : ● In case if you don't want to copy that file and generate own file then I have added ideal content on next slide. Those will be in 5 parts. Just copy and paste them to /etc/init.d/odoo file. ● Let's see.
  25. 25. Setup Odoo init file : ( Part 1 ) #!/bin/bash ### BEGIN INIT INFO # Provides: # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start odoo daemon at boot time # Description: Enable service provided by daemon. # X-Interactive: true ### END INIT INFO ## more info:
  26. 26. Setup Odoo init file : ( Part 2 ) . /lib/lsb/init-functions PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin DAEMON=/opt/odoo/odoo/ NAME=odoo DESC=odoo CONFIG=/opt/odoo/conf/odoo_server.conf PIDFILE=/var/run/${NAME}.pid USER=odoo export LOGNAME=$USER test -x $DAEMON || exit 0 set -e
  27. 27. Setup Odoo init file : ( Part 3 ) function _start() { start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:root --background --make-pidfile --exec $DAEMON -- --config $CONFIG } function _stop() { start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --retry 3 rm -f $PIDFILE } function _status() { start-stop-daemon --status --quiet --pidfile $PIDFILE return $? }
  28. 28. Setup Odoo init file : ( Part 4 ) case "$1" in start) echo -n "Starting $DESC: " _start echo "ok" ;; stop) echo -n "Stopping $DESC: " _stop echo "ok" ;; restart|force-reload) echo -n "Restarting $DESC: " _stop sleep 1 _start echo "ok" ;;
  29. 29. Setup Odoo init file : ( Part 5 ) status) echo -n "Status of $DESC: " _status && echo "running" || echo "stopped" ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0
  30. 30. Let's start Odoo ● /etc/init.d/odoo start ( in order to start Odoo system ) ● /etc/init.d/odoo stop ( in order to stop Odoo system ) ● /etc/init.d/odoo restart ( in order to restart Odoo system ) ● /etc/init.d/odoo status ( in order to see status of Odoo service )
  31. 31. Odoo Setup is done !!
  32. 32. Autostart setting of Odoo at server startup time : ● By executing following command your Odoo instance will be started automatically when your ubuntu server will be restart. ● sudo update-rc.d odoo defaults
  33. 33. Installation Complete Up to now we have successfully set up Odoo system by all proper configurations with perfect steps and with standard directory structure. We will see some useful tips on next slide.
  34. 34. Tips ● Don't forget to update github branch on time to time in order to get latest update from Odoo. ( /opt/odoo/odoo) ● Don't forget to take backup of your live database at regular interval. ● Use db_backup_ept module for automatic backup of your database. ( Download from our website. ) ● Tranfer community module into custom_addons instead of direct move to Odoo's standard addon folder.
  35. 35. Tips ● Never set an easy password for Database user. ● Set complex password for super admin which is specified in odoo_server.conf as admin_passwd option and make it enable. ● Run your Odoo server on secure ssl mode. ( Don't know how to do it ? Don't worry. In next slides we have added exclusively for you.) ● Always follow standard directory structure for Odoo setup. (We have shown standard directory structure in previous slide.)
  36. 36. Tips ● Start your server in multi worker mode in order to make Odoo's processing fast. ( workers option in odoo_server.conf ) ● Setup file/attachment storage over physical disk instead of in database tables. ● Test html-->pdf reports in order to verify proper wkhtmltopdf installation. ● Transfer your database backup to another place at some amount of time. In case of accidential crash of your server you can restore your database.
  37. 37. Tips ● Backup and transfer your community modules to another place at some amount of time. ● Clear /tmp folder of your server at regular time. ● At least server capacity shall be 4 GB RAM ( minimum), 100 GB HDD & 8 core CPUs. ● Skip installation of unnecessary modules. ● Use plug & play approach in which module shall be installed only when that feature is needed.
  38. 38. Tips ● Set proper access rights & rules in case of multi user access in your Odoo system. ● Set custom filters in order to prevent large amount of unnecessary data in list view. ( For instance, I prefer to set custom filter of only “my tasks”. So that out of numerous tasks for whole staff of company, I can see only mine which matters most of the time. )
  39. 39. Tips ● Community modules are not advisable to install directly on live server. It may crash your live server sometimes !!! Instead, first craft them with some Odoo experts and let them install for you after proper testing.
  40. 40. Set up Odoo in ssl mode (Optional) ● sudo apt-get install apache2 ● sudo a2enmod ssl proxy_http headers rewrite ● sudo mkdir /etc/ssl/openerp ● Go inside that folder and apply following commands. ● openssl genrsa -des3 -out oeserver.pkey 1024 ● openssl rsa -in oeserver.pkey -out oeserver.key ● openssl req -new -key oeserver.key -out oeserver.csr ● openssl x509 -req -days 365 -in oeserver.csr -signkey oeserver.key -out oeserver.crt
  41. 41. Set up Odoo in ssl mode (Optional) ● touch /etc/apache2/sites-available/openerp ● Open that file for editing. ● vi /etc/apache2/sites-available/openerp ● Add content which is specified on next slide
  42. 42. Set up Odoo in ssl mode (Optional) <VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/openerp/oeserver.crt SSLCertificateKeyFile /etc/ssl/openerp/oeserver.key ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyVia On ProxyPass / http://[your IP]:8069/ <location /> ProxyPassReverse / </location> RequestHeader set “X-Forwarded-Proto” “https” SetEnv proxy-nokeepalive 1 </VirtualHost>
  43. 43. Set up Odoo in ssl mode (Optional) ● sudo a2ensite openerp ● service apache2 reload ( Reload apache server ) ● Access your ERP by following url in browser.
  44. 44. Access ERP from domain instead of IP (Optional) ● If I want to access my Odoo with domain name like instead of ● In case of If you want to access ERP by your domain name then you need to set your virtualhost file like in next slide.
  45. 45. Access ERP from domain instead of IP (Optional) <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName SSLEngine on SSLCertificateFile /etc/ssl/openerp/oeserver.crt SSLCertificateKeyFile /etc/ssl/openerp/oeserver.key ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyVia On ProxyPass / ProxyPassReverse / ProxyPreserveHost On ProxyErrorOverride Off RequestHeader set “X-Forwarded-Proto” “https” ErrorLog /var/log/apache2/webclient-error.log CustomLog /var/log/apache2/webclient-access.log combined SetEnv proxy-nokeepalive 1 </VirtualHost>
  46. 46. Thank you ! We have covered almost all necessary settings for Odoo installation with live example. Even if you face any problem then don't worry ! You are just an inch away from us by an email
  47. 47. We are social too !! We'll :) to see you at these platforms!