I’ve found that if you insist on installing Odoo on CentOS, like I do, doing it on CentOS 7 is the easiest and quickest way of going about it.
If you have a fresh CentOS 7 minimal install that’s great, if not, you’ll need to uninstall mariadb and mariadb-server before you can proceed.
NOTE: Make sure you’re not using mariadb for any other application before you uninstall it.
To uninstall issue the following at shell:
yum remove mariadb mariadb-server
We will not install the Epel repo:
yum install epel-release
Now we install the PostgreSQL Server:
yum install postgresql-server
Since this is the first time installing PostgreSQL Server, we’ll need to initialize the database:
The result should be something like:
Initializing database ... OK
To start the PostgreSQL Server:
systemctl start postgresql
To add PostgreSQL Server to the startup:
systemctl enable postgresql
Add the Odoo Repo to the server at /etc/yum.repos.d/odoo.repo
[odoo-nightly] name=Odoo Nightly repository baseurl=http://nightly.odoo.com/9.0/nightly/rpm/ enabled=1 gpgcheck=1 gpgkey=https://nightly.odoo.com/odoo.key
Now we’re ready to install Odoo, issue the following to get started:
yum install odoo
To start Oddo:
systemctl start odoo
To add Odoo to startup:
systemctl enable odoo
Edit Odoo’s master configuration file, location: /etc/odoo/openerp-server.conf and set a Master password,
admin_passwd = REAL-PASSWORD
service odoo restart OR systemctl odoo restart
To print PDF reports you’ll need to install wkhtmltopdf, and to install wkhtmltopdf you’ll need to install the following dependencies
yum install libX11 libXext libpng fontconfig xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi libXrender
You’ll now need to download the appropriate version of wkhtmltopdf from wkhtmltopdf.org/downloads.html. In this case it was:
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm rpm -ivh /PATH/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
You’ll now need to allow the port Odoo’s webserver operates at
firewall-cmd --zone=public --add-port=8069/tcp --permanent
Restart the firewall:
Note: I’ve allowed the port to be access by anyone on the internet, as long as this server is connected to the internet. You’ll need to play with the firewall if you want to restrict access to the port.
Hit the server in your browser to bring up the initial setup page:
Enter the Master Password you set earlier, a db name and a password which would be the admin password for the database you’re creating.
And that’s that, you’re done!
Note: I usually keep SELINUX disabled, so if you experience any kind of issue following the installation steps above, try disabling SELINUX. Make sure to reboot afterwards.