How to Install Odoo 8 on CentOS 7


Install and configure PostgreSQL 9.3

rpm -Uvh
yum -y install postgresql93 postgresql93-server postgresql93-devel –disablerepo=* –enablerepo=pgdg93

After installing the packages, we’ll initialize the database, enable the service on boot and start the PostgreSQL server.

/usr/pgsql-9.3/bin/postgresql93-setup initdb
systemctl enable postgresql-9.3.service
systemctl start postgresql-9.3

create a new PostgreSQL user named odoo:

su – postgres -c “createuser -s odoo” 2> /dev/null || true

Install all nessesary packages

We need the development tools installed:

yum -y groupinstall “Development tools”

Next, we’ll install a few dependencies:

yum -y install zlib-devel bzip2-devel openssl openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel git libpng libjpeg libXext curl xorg-x11-font-utils fontconfig python-virtualenv libevent-devel libxml2-devel libxslt-devel openldap-devel openjpeg-devel freetype-devel libjpeg-turbo-devel libtiff-devel kernel-devel

Enable EPEL Repository:

rpm -ivh epel-release-7-5.noarch.rpm

To print documents in Odoo we’ll need the wkhtmltopdf package, which is available in the EPEL repository.

To install wkhtmltopdf run the following command:

yum –enablerepo=epel install wkhtmltopdf

let’s install pip from the EPEL repository:

yum –enablerepo=epel install python-pip

Clone Odoo 8 repository from GitHub to the /opt/odoo directory.

git clone –branch 8.0 /opt/odoo

Create a Environment for Odoo

useradd odoo
chown -R odoo: /opt/odoo
su – odoo

Now we’ll create a virtual environment and install all necessary packages from the requirements.txt file:

/bin/virtualenv odoo
source odoo/bin/activate
pip install -r /opt/odoo/requirements.txt

Create configuration file and systemctl service

cat > /etc/odoo/odoo-server.conf << EOF
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/addons
no-xmlrpc = True
no-xmlrpcs = True
no-netrpc = True
log_db = False
log_handler = [‘[\'[“[\\\’:INFO\\\’]”]\’]’]
log_level = info
logfile = False
login_message = False
logrotate = True
syslog = False

cat > /usr/lib/systemd/system/odoo.service << EOF
Description=Odoo 8.0 ERP and CRM server

ExecStart=/home/odoo/odoo/bin/python /opt/odoo/openerp-server –config=/etc/odoo-server.conf


Use the following command to view Odoo log: journalctl -f -u odoo

And the last but not the least
We also need to open port 8069 in our firewall:

firewall-cmd –zone=public –add-port=8069/tcp –permanent
firewall-cmd –reload

Finally, we’ll enable Odoo on boot and start the service:

systemctl enable odoo.service
systemctl start odoo

That’s it, Odoo installation is complete. point your browser at: http://<ip_address>:8069

Leave a Reply