How To Install OpenEduCat 13 on CentOS7

Introduction

In this tutorial, we’ll install and configure OpenEduCat version 13 on CentOS 7. We can use the same installation instructions for both server and desktop edition.We will cover how to install the software in two different ways, each of which have their own benefits depending on your specific needs.

Prerequisites

Before starting this tutorial, you will need:

  • A CentOS 7 Desktop or Server with a root, sudo-enabled user.
  • A good internet connection to download the packages via various internet repositories.

Option 1 :

Step by step guide to install guide. Execute each step as “root” user.

Step 1 — Add Odoo user to the system

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

Step 2 — Make Configuration Directory and Log Directory

sudo mkdir /etc/odoo && mkdir /var/log/odoo/

Step 3 — Installing Necessary OS Related Packages

sudo yum install https://centos7.iuscommunity.org/ius-release.rpm -y && sudo yum update -y && yum upgrade -y && sudo yum groupinstall 'Development Tools' -y && sudo yum install python36u python36u-devel python36-pillow python36-lxml npm nodejs libxml2-devel libjpeg-devel libxml2 libxslt libxslt-devel wget libpng libjpeg openssl icu libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi python3-pip python3-setuptools git openldap-devel -y

Step 4 — Installing PostgreSQL

rpm -Uvh https://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm && yum install postgresql10-server postgresql10 -y && /usr/pgsql-10/bin/postgresql-10-setup initdb && systemctl start postgresql-10.service && systemctl enable postgresql-10.service

Step 5 — Installing Node Packages Required by Odoo

sudo npm install -g less less-plugin-clean-css -y

Step 6 — Cloning Odoo 13 From Source Repository

git clone --depth=1 --branch=13.0 https://github.com/odoo/odoo.git /opt/odoo/odoo

Step 7 — Cloning OpenEduCat 13 From Source Repository

git clone --depth=1 --branch=13.0 https://github.com/openeducat/openeducat_erp.git /opt/odoo/openeducat

Step 8 — Change Ownership of Odoo Directory

sudo chown odoo:odoo /opt/odoo/ -R && sudo chown odoo:odoo /var/log/odoo/ -R

Step 9 — Installing Python Packages Required by Odoo

cd /opt/odoo/odoo && sudo pip3 install -r requirements.txt

Step 10 — Installing wkhtmltopdf

cd /tmp && wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm && rpm -Uvh wkhtmltox-0.12.5-1.centos7.x86_64.rpm

Step 11 — Linking wkhtmltopdf as Command

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/

Step 12 — Creating PostgreSQL user for Odoo

sudo su - postgres -c "createuser -s odoo"

Step 13 — Starting Odoo and Creating Config File

sudo su - odoo -c "/opt/odoo/odoo/odoo-bin --addons-path=/opt/odoo/odoo/addons -s --stop-after-init"

Step 14 — Moving Config File To Config Directory

sudo mv /opt/odoo/.odoorc /etc/odoo/odoo.conf

Step 15 — Modifying Configuration Parameters

sudo sed -i "s,^\(addons_path = \).*,\1"/opt/odoo/odoo/addons\\,/opt/odoo/openeducat/"," /etc/odoo/odoo.conf sudo sed -i "s,^\(logfile = \).*,\1"/var/log/odoo/odoo-server.log"," /etc/odoo/odoo.conf sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/odoo/odoo.conf sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/odoo/odoo.conf

Step 16 — Setting up Odoo Executable

sudo ln -s /opt/odoo/odoo/odoo-bin /usr/bin/odoo

Step 17 — Setting Up Odoo To Start at OS StartUp

sudo cp /opt/odoo/odoo/debian/odoo.service /etc/systemd/system/odoo.service && chmod +x /etc/systemd/system/odoo.service && sudo systemctl daemon-reload && sudo systemctl start odoo && sudo systemctl enable odoo && chkconfig --levels 2345 odoo on

Option 2 :

sudo yum install wget && sudo wget openeducat.org/i/oec12centos && bash oec12centos