• Get In Touch
May 15, 2017

How to Install and Configure SugarCRM on CentOS v.7.1

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

SugarCRM is a free and open source customer relationship management web application written in PHP language. It is used to manage customer orders and billing history.

SugarCRM comes with three editions Open Source Edition, Professional Edition and Enterprise Edition.

SugarCRM’s source code is available to any user, so you can easily customize it as per your business need.

This tutorial will explain you how to install SugarCRM on CentOS 7.1 server.

Prerequisites

  • A CentOS 7.1 operating system with minimal installation.
  • A normal user with sudo privileges.

Update the System

First, login to your server with sudo user and update the system with the latest stable version using the following command:

sudo yum -y update

After updating system restart your system.

Install Apache Web Server

Before starting, Apache web server is required to install SugarCRM. You can install it by running the following command:

sudo yum -y install httpd

After installing Apache web server, start the apache service and enable it to start at boot time by running the following command:

sudo systemctl start httpd
sudo systemctl enable httpd

Install PHP

You will also need to install PHP and other required modules in your system. You can install it with the following command:

sudo yum -y install php php-mysqlnd php-opcache php-mbstring php-gd

After installing PHP, you will need to tune the PHP settings. To do so, edit the php.ini file:

sudo nano /etc/php.ini

Change the following line:

upload_max_filesize = 50M

Save and close the file.

Install MariaDB Server

MariaDB is a fork of the MySQL relational database management system. You can install it by running the following command:

sudo yum -y install mariadb mariadb-server

Next, start the MariaDB service and enable it to start at boot time with the following command:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Next, secure MariaDB installation with the following command:

sudo mysql_secure_installation

Answer all of the questions:

/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!
Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Your MariaDb installation is now secure.

Next, login to MariaDB console with the following command:

mysql -u root -p

Enter your root password when prompt, then create a database user and password for SugarCRM.

MariaDB [(none)]>CREATE DATABASE sugarcrm;

Next, create a user and password with the following command:

MariaDB [(none)]>CREATE USER 'crm'@'localhost' IDENTIFIED BY 'yourpassword';

Next, grant privileges to the SugarCRM database with the following command:

MariaDB [(none)]>GRANT ALL PRIVILEGES ON sugarcrm.* TO 'crm'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;

Next, run the FLUSH PRIVILEGES command so that the privileges table will be reloaded by MySQL and we can use new credential:

MariaDB [(none)]>FLUSH PRIVILEGES;

Finally, exit from the MariaDB console with the following command:

MariaDB [(none)]>exit;

Install SugarCRM

You can download the latest version of the SugarCRM from their official website.

After downloading SugarCRM, extract the downloaded archive with the following command:

unzip SugarCE-6.5.24.zip

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

sudo mv SugarCE-6.5.24 /var/www/html/sugarcrm

Next, change the ownership of the sugarcrm directory with the following command:

sudo chown -R apache:apache /var/www/html/sugarcrm
Next, create Apache virtual host for SugarCRM. To do so, create a sugarcrm.conf file:

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

Add the following lines:

<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/sugarcrm"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/sugar-error_log"
CustomLog "/var/log/httpd/sugar-access_log" combined

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

Save and close the file. Restart the apache service for the changes to take effects:

sudo systemctl restart httpd

Configure Firewall

By default SugarCRM runs on port 80, so you will need to allow HTTP on port 80 through firewalld.

You can allow it using the following command:

sudo firewall-cmd --zone=public --add-service=http --permanent

Next, reload the firewalld by running the following command:

sudo firewall-cmd --reload

After configuring firewalld, you can proceed to install SugarCRM through web.

SugarCRM Web Installation

Now, start the installation process of SugarCRM through Web browser.

To do so, open your web browser and navigate to URL http://yourdomain.com. You will redirect to the SugarCRM setup wizard shown as below screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1873509389.png” alt=”” />

To start setup click on the Next button you will see the license agreement in following screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1673972291.png” alt=”” />

Accept the license agreement and click on the Next button you will see the following screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/508664655.png” alt=”” />

Choose the first option then click on the Next button you will see the following screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1583638220.png” alt=”” />

Select the database type and click on the Next button you will see the database configuration wizard in below screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1762276939.png” alt=”” />

Provide all the database related details then click on the Next button you will see the admin user creation page in the following screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/889699610.png” alt=”” />

Provide the admin username and password as per your requirements and then click on the Next button.

Then, confirm all the settings and click on the Next button you will see the following screenshot:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1267563737.png” alt=”” />

Now, click on the Next button to complete the setup and redirect to the SugarCRM login page as shown below:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/592985852.png” alt=”” />

Finally, provide your admin user credentials to log in your SugarCRM default dash board as shown below:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1010319858.png” alt=”” />

Finally, you have successfully installed SugarCRM on CentOS 7.1 server. You have also setup SugarCRM through your web browser.

Enjoy!

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

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]