ManagedCloud Servers

High performance handled and monitored by us 24/7/365. A complete solution to provide you with our in house expertise 24/7 tailored to your specific needs. We'll setup a bespoke server for your site using the latest tehnologies so you can get the most out of your hardware and get your website loading quickly and reliably. Find out more..

cPanelCloud Servers

Recommended - High performance cloud servers with no technical knowledge required. If you're hosting multiple websites already and you're looking to consolidate, or if you're looking to isolate yourself from the shared hosting environment but you don't have the time or knoweldge to manage a server, then the Managed cPanel Servers are for you. Find out more..

UnmanagedCloud Servers

Our unmanaged range gives you complete control at rock bottom prices and our cloud platform boasts super fast multipath 40Gb/s network, the latest Intel Xeon V3 CPUs and enterprise grade redundant SSDs. If you're a sysadmin look no further, we offer some of the best specification to price ratio servers available. Find out more..

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans

How to Install and Configure Dolibarr on CentOS 7

Dolibarr is a free and open source ERP/CRM for small and medium companies that can be used to manage your customers, invoices, orders, products, stocks, agenda, e-mailings, shipments easily.

Dolibarr comes with several feature modules for ERP and CMS that can be enabled or disabled as per your need. You can freely use, study, modify or distribute it according to its Free Software licence.

Dolibarr is a standalone web application that enables you to access it from the Internet or a LAN.

In this tutorial, we will learn how to install and configure Dolibarr on CentOS 7 server.

Requirements

-A server running CentOS 7. - A not root user with sudo privileges setup on your server.

Update the System

Before installing any packages, it is recommended to update your system with the latest stable version.

You can update it with the following command:

sudo yum update -y

Once your system is up to date, you can proceed to install required packages.

Install LAMP server

First, you will need to install Apache web server, PHP and other required packages on your system.

You can install all of them with the following command:

sudo yum install httpd php php-common php-cli php-gd php-pgsql openssl mod_ssl -y

Once the installation is complete, start Apache web server and enable it to start on boot with the following command:

sudo systemctl start httpd sudo systemctl enable httpd

Next, we will use PostgreSQL to store database. You can install it with the following command:

sudo yum install postgresql postgresql-server postgresql-libs -y

Once PostgreSQL is installed, you will need to initialize the PostgreSQL database before PostgreSQL service is started for the first time.

To do so, run the following command:

sudo postgresql-setup initdb

Next, you will need to make some changes in /var/lib/pgsql/data/pg_hba.conf file.

sudo nano /var/lib/pgsql/data/pg_hba.conf

Change the file from:

local   all             all                                     peer
host    all             all             127.0.0.1/32            ident
host    all             all             ::1/128                 ident

to

local   all             all                                     trust
host    all             all             127.0.0.1/32            trust
host    all             all             ::1/128                 trust

Save and close the file when you are finished, then start PostgreSQL and enable it to start at boot time:

sudo systemctl start postgresql sudo systemctl enable postgresql

Configure Database

Next, you will need to create a user and database for Dolibarr. First, login to Postgres console with the following command:

su - postgres

Next, create a user and database for dolibarr with the following command:

createuser dolibarr psql -h localhost -d template1 -c "alter user postgres with password 'password'" psql -h localhost -d template1 -c "alter user dolibarruser with password 'password'" psql create database dolibarrdb encoding 'UTF8' owner dolibarr;

Finally, exit from the postgres shell with the following command:

exit

It is recommended to use a strong password for the postgres and dolibarr PostgreSQL user accounts respectively.

Next, you will need to modify pg_hba.conf file located at /var/lib/pgsql/data/ directory:

sudo nano /var/lib/pgsql/data/pg_hba.conf

Change the file as shown below:

local   all             dolibarr                            md5
local   all             postgres                                md5
host    all             all             127.0.0.1/32            ident
host    all             all             ::1/128                 ident

Save and close the file, then restart PostgreSQL service for the changes to take effect:

sudo systemctl restart postgresql

Download Dolibarr

You can download the latest version of Dolibarr from their official website. Otherwise you can use wget command to download it:

wget http://www.dolibarr.org/files/dolibarr.tgz

Once the download is completed, extract the downloaded file with the following command:

tar -xvfz dolibarr.tgz

Next, move the extracted directory to the apache web root directory:

sudo mv dolibarr-4.0.4/htdocs /var/www/html/dolibarr

Next, give proper permission to the dolibarr directory:

sudo chown -R apache:apache /var/www/html/dolibarr

Once you are done, you can proceed to configure apache.

Configure Apache for Dolibarr

Now, you will need to create a apache virtual host configuration file for Dolibarr.

You can do this by creating dolibarr.conf file inside /etc/httpd/conf.d/ directory:

sudo nano /etc/httpd/conf.d/dolibarr.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin webmaster@your-domain.com
DocumentRoot /var/www/html/dolibarr
ServerName 192.168.15.193
ErrorLog /var/log/httpd/dolibarr-error_log
CustomLog /var/log/httpd/dolibarr-access_log combined

<Directory /var/www/html/dolibarr/> DirectoryIndex index.php Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>

Save and close the file when you are finished, then restart Apache using systemctl for the changes to take effect:

sudo systemctl restart httpd

Access Dolibarr Web Interface

Before accessing Dolibarr web interface, you will need to configure your firewall to allow port 80 so that the Apache web server's default port will be accessible externally. You can do this with the following command:

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

Next, reload your firewall service with the following command:

sudo firewall-cmd --reload

Once, everything is configured, open your web browser and type the URL http://192.168.15.193, you will be redirected to the Dolibarr setup wizard as shown in below image:

Here, choose the language as per your need, then click on the "Next step" button, you should see the following page:

Here, you should see all the requirements check. when all is well then click on the start button to begin the installation:

The above steps creates configuration config for us. Click on the "Next step" button, you should see the following page:

Here, you will need to define the web root directory and directory to store generated documents:

Here, provide your database credentials, then click on the "Next" button, you should see the following page:

Here, you should see the success messege of database object creation, then click on the "Next" button, you should see the following page:

Here, you will need to input Dolibarr admin credentials, then click on the "Next step" button. Once the installation is finished, you should see the Dolibarr login page as shown in below image:

Here, provide your admin credentials and click on the "Connection" button, you should see the Dolibarr default dashboard in below image:

Congratulations! You have successfully installed Dolibarr on your CentOS 7 server.

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans