{"id":18021,"date":"2015-11-14T14:56:00","date_gmt":"2015-11-14T20:56:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=18021"},"modified":"2022-12-08T09:39:26","modified_gmt":"2022-12-08T15:39:26","slug":"how-to-install-dolibarr-erp-crm-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-dolibarr-erp-crm-on-a-centos-7-vps\/","title":{"rendered":"How to Install Dolibarr ERP CRM on aCentOS 7"},"content":{"rendered":"
This step by step tutorial will show you how to install Dolibarr ERP CRM on a CentOS 7 VPS<\/strong> with Apache, PHP and PostgreSQL installed on it. Dolibarr is an open source web based ERP and CRM software that can be used to manage your business operations. Let’s start with the installation. Download the latest version of Dolibarr available at http:\/\/www.dolibarr.org to the server and extract it using the following commands:<\/p>\n We’ll configure Dollibar to use a PostgreSQL database, so remove MariaDB if it is already installed:<\/p>\n Install PHP, Apache web server and other prerequisite packages:<\/p>\n Install PostgreSQL:<\/p>\n Once PostgreSQL is installed, we have to initialize the PostgreSQL database before PostgreSQL service is started for the first time:<\/p>\n Edit the ‘\/var\/lib\/pgsql\/data\/pg_hba.conf’ configuration file<\/p>\n change:<\/p>\n to:<\/p>\n Start PostgreSQL and enable it to start at boot time:<\/p>\n Then, run the following commands from the command line:<\/p>\n Do not forget to change ‘postgespAssW0Rd’ and ‘Y0uRpAssW0Rd’ and use a strong password for the ‘postgres’ and ‘dolibarruser’ PostgreSQL user accounts respectively. Add\/modify the following lines:<\/p>\n Restart PostgreSQL service for the changes to take effect:<\/p>\n You can test a connection with the ‘dolibarruser’ user using the following command:<\/p>\n and type your dolibarr user password as password , then type \\q to quit if connection is okay. Create a ‘\/etc\/httpd\/conf.d\/vhosts.conf’ configuration file:<\/p>\n Add the following line:<\/p>\n Create a new ‘\/etc\/httpd\/vhosts.d’ directory where we will put all virtual hosts:<\/p>\n Create a virtual host for your domain name:<\/p>\n and add the following content to it:<\/p>\n <VirtualHost *:80> <Directory “\/var\/www\/html\/dolibarr\/”> Restart Apache using systemctl for the changes to take effect:<\/p>\n Open your favorite web browser, navigate to http:\/\/your-domain.com\/htdocs\/install\/ and follow the easy instructions. Set the following information about Dolibarr database:<\/p>\n On the next page ‘Dolibarr install or upgrade – Administrator login creation’, create a new administrator account:<\/p>\n For security reasons, you should add a file called install.lock in to the Dolibarr document root directory, in order to avoid malicious use of it:<\/p>\n Login to the Dolibarr administration back-end at http:\/\/your-domain.com\/htdocs\/admin\/ and configure Dolibarr according to your needs. PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" This step by step tutorial will show you how to install Dolibarr ERP CRM on a CentOS 7 VPS with … <\/p>\n
\nThis tutorial was tested and written for a CentOS 7 VPS<\/a>, but it should work on any RPM based Linux distribution.<\/p>\n
\nAt the time of writing this tutorial, the latest stable version of Dolibarr ERP CRM is 3.8.2 and it requires:<\/p>\n\n
cd \/var\/www\/html\/\r\nwget http:\/\/www.dolibarr.org\/files\/dolibarr.tgz\r\ntar xvfz dolibarr.tgz\r\nmv dolibarr-* dolibarr\r\nchown -R apache:apache \/var\/www\/html\/dolibarr<\/pre>\n
yum remove mariadb*<\/pre>\n
yum install php php-common php-cli php-gd php-pgsql httpd sudo openssl mod_ssl<\/pre>\n
yum install postgresql postgresql-server postgresql-libs<\/pre>\n
postgresql-setup initdb<\/pre>\n
vi \/var\/lib\/pgsql\/data\/pg_hba.conf<\/pre>\n
local all all peer\r\nhost all all 127.0.0.1\/32 ident\r\nhost all all ::1\/128 ident<\/pre>\n
local all all trust\r\nhost all all 127.0.0.1\/32 trust\r\nhost all all ::1\/128 trust<\/pre>\n
systemctl start postgresql\r\nsystemctl enable postgresql<\/pre>\n
sudo -s -u postgres\r\ncreateuser dolibarruser\r\npsql -h localhost -d template1 -c \"alter user postgres with password 'postgespAssW0Rd'\"\r\npsql -h localhost -d template1 -c \"alter user dolibarruser with password 'Y0uRpAssW0Rd'\"\r\npsql\r\ncreate database dolibarr encoding 'UTF8' owner dolibarruser;\r\nexit<\/pre>\n
\nEdit the ‘\/var\/lib\/pgsql\/data\/pg_hba.conf’ configuration file:<\/p>\nvi \/var\/lib\/pgsql\/data\/pg_hba.conf<\/pre>\n
local all dolibarruser md5\r\nlocal all postgres md5\r\nhost all all 127.0.0.1\/32 ident\r\nhost all all ::1\/128 ident<\/pre>\n
systemctl restart postgresql.service<\/pre>\n
psql -d postgres -U dolibarruser -W<\/pre>\n
\nStart Apache and enable it to start at boot time:<\/p>\nsystemctl start httpd\r\nsystemctl enable httpd<\/pre>\n
vi \/etc\/httpd\/conf.d\/vhosts.conf<\/pre>\n
IncludeOptional vhosts.d\/*.conf<\/pre>\n
mkdir \/etc\/httpd\/vhosts.d<\/pre>\n
cd \/etc\/httpd\/vhosts.d\r\nvi your-domain.conf<\/pre>\n
\nServerAdmin webmaster@your-domain.com
\nDocumentRoot “\/var\/www\/html\/dolibarr”
\nServerName your-domain.com
\nServerAlias www.your-domain.com
\nErrorLog “\/var\/log\/httpd\/your-domain.com-error_log”
\nCustomLog “\/var\/log\/httpd\/your-domain.com-access_log” combined<\/p>\n
\nDirectoryIndex index.php
\nOptions FollowSymLinks
\nAllowOverride All
\nRequire all granted
\n<\/Directory>
\n<\/VirtualHost><\/p>\nsystemctl restart httpd<\/pre>\n
Database name: dolibarr\r\nDatabase type: pgsql\r\nServer: localhost\r\nPort: 5432\r\nLogin: dolibarruser\r\nPassword: Y0uRpAssW0Rd<\/pre>\n
Dolibarr admin login :\u00a0\u00a0 \u00a0admin\r\nPassword : y0urAdm1npassw0rd\r\nRetype password a second time : y0urAdm1npassw0rd<\/pre>\n
touch \/var\/www\/html\/dolibarr\/htdocs\/install\/install.lock\r\nchown apache:apache \/var\/www\/html\/dolibarr\/htdocs\/install\/install.lock<\/pre>\n
\n
\nThat is it. The\u00a0Dolibarr installation is now complete.
\nOf course you don\u2019t have to do any of this if you use one of our CentOS Optimized Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Dolibarr ERP CRM <\/strong>software for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n