Categorías: Sin categoría

Install Odoo 8 on CentOS 7

In this article, we will go through the installation of Odoo 8 on CentOS 7 machine. We will create a Python virtual environment and use the Odoo source code from Github.

Install and configure PostgreSQL 9.3

First of all, we need to install PostgreSQL. We’ll install PostgreSQL version 9.3 from the official PostgreSQL repository.
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
The following command will 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 be able 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  
We’ll install Python packages with pip, so let’s install pip from the EPEL repository:
yum --enablerepo=epel install python-pip  

Clone Odoo 8 from GitHub

We are going to clone the Odoo 8 repository from GitHub to the /opt/odoodirectory.
git clone --branch 8.0 /opt/odoo  
Later, if you want to update your Odoo repository to the latest version just rungit pull.

Create a virtual environment for Odoo

Create a new system user named odoo, change the owner ship of the /opt/odoodirectory to odoo user and group and switch to it, using the following commands:
useradd odoo  
chown -R odoo: /opt/odoo
su - odoo
Now we’ll create a virtual environment and install all necessary packages from therequirements.txt file:
/bin/virtualenv odoo
source odoo/bin/activate
pip install -r /opt/odoo/requirements.txt
The installation will take a few minutes so go grab a coffee.

Create configuration file and systemctl service

Next, we’ll create a basic configuration file and systemctl service for our Odoo instance.
cat > /etc/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

You can use the following command to view Odoo log: journalctl -f -u odoo.

Final steps

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. To open Odoo, point your browser at:http://<ip_address>:8069
Eugenio Chaparro

Publicado por
Eugenio Chaparro

Entradas recientes

🟢Editar código de un módulo en Dolibarr [04]

🟢Editar código de un módulo en Dolibarr [04]

En este tutorial vamos editar el código de nuestro módulo personas para poder personalizar algunas…

2 meses hace
🟢Crear un sub_módulo en Dolibarr [03]

🟢Crear un sub_módulo en Dolibarr [03]

En este tutorial vamos a crear un sub módulo llamado seguridad que será muy parecido…

2 meses hace
🟢Modificar un módulo en Dolibarr [02]

🟢Modificar un módulo en Dolibarr [02]

En este tutorial aprenderemos a editar el objeto personas del modulo persona que creamos en…

2 meses hace
🟢Constructor de módulos en Dolibarr

🟢Constructor de módulos en Dolibarr

Como mencionamos anteriormente Dolibarr es un proyecto realizado sobre la base de una política clara:…

2 meses hace
🟢Tickets en Dolibarr [19]

🟢Tickets en Dolibarr [19]

Los ticket en dolibarr nos ayudan a comunicar inconveniente en nuestros productos y servicios dentro…

2 meses hace
🟢Agenda en Dolibarr [18]

🟢Agenda en Dolibarr [18]

Las agendas en dolibarr nos ayudan a ver las actividades realizadas en proceso y por…

2 meses hace