Live Helper Chat is a free and open source chat web application. It is written in PHP and uses MySQL/MariaDB to store its data. Live Helper Chat can be easily added to a website to engage with potential customers and also to provide support for existing users. It provides many features such as Co-browsing, unlimited operators, user screenshots, online user tracking, chat archiving, file upload, drag and drop any much more. It provides desktop clients for operators and also supports XMPP. It is widely used on many websites.
In this tutorial, we will install Live Helper Chat on CentOS 7.
Live Helper Chat does not require any special hardware requirements. It can be installed on servers with a small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run
sudo -i to switch to root user.
Installing Live Helper Chat
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once you have your system updated, you can proceed to install the LAMP stack. Start the LAMP installation by installing Apache web server and MariaDB, which is a fork of MySQL using the following command.
yum -y install httpd mariadb-server mariadb
Live Helper Chat can be installed on any version of PHP greater than 5.4. But as PHP 5.4 has reached the end of life. You can install PHP 7 for high performance. PHP 7 is not included in default YUM repository, hence you will need to add the Webtatic repository in your system. Webtatic repository requires EPEL repository to work. Run the following command to install EPEL repository.
yum -y install epel-release
yum -y update
Now install Webtatic repository using the following commands.
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y update
To install PHP 7.1 and all the required PHP modules, run the following command.
yum -y install php71w php71w-mysql php71w-cli php71w-gd php71w-bcmath php71w-pdo php71w-mbstring
Make sure that you are using only one of the PHP versions mentioned above. Once you have PHP installed, you can check the version of PHP using the following command.
You should get output similar to this.
[root@liptan-pc ~]# php -v PHP 7.1.1 (cli) (built: Jan 19 2017 20:35:16) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
You will also need to enable
Mod_rewrite in Apache web server by editing
/etc/httpd/conf/httpd.conf using your favorite text editor.
Find the following line.
<Directory "/var/www/html"> AllowOverride None
Change it to
Now start the Apache web server and enable it to start at boot time using the following command.
systemctl start httpd
systemctl enable httpd
To start MariaDB and enable it to start at boot time using the following commands.
systemctl start mariadb
systemctl enable mariadb
Now run the following commands to secure your MySQL or MariaDB installation.
It will run a small script which asks you to provide the root password for MariaDB. As we have just installed MariaDB, the root password is not set, just press enter to proceed further. It will ask you if you want to set a root password for your MariaDB installation, choose
y and set a strong password for the installation. It will also ask you for removing test databases and anonymous users. Most of the questions are self-explanatory and you should answer
y to all the questions.
To create a database we will need to login to MySQL command line first. Run the following command for same.
mysql -u root -p
This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your Live Helper Chat installation.
CREATE DATABASE livechat_data;
The above query will create a database named
livechat_data. For the database, you can use any name you prefer at the place of
livechat_data. Make sure that you use semicolon at the end of each query as the query always ends with a semicolon. Once the database is created you can create a new user and grant all the permissions to the user for the database. Using root user is not recommended for the databases. To create a new database user, run the following query.
CREATE USER 'livechat_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username
livechat_user. You can use any preferred username instead of
StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.
GRANT ALL PRIVILEGES ON livechat_data.* TO 'livechat_user'@'localhost';
Now run the following command to immediately apply the changes on the database privileges.
Exit from MySQL prompt using
As we have all the dependencies ready, we can now download the install package from the Live Helper Chat site.
The above command will download the latest installer archive. Extract the archive using the following command.
unzip master.zip -d /var/www/html/
If you don't have
unzip installed, you can run
yum -y install unzip. The above command will extract the files in web root directory of Apache under
Now create a virtual host for the chat application. Run the following command for same.
Paste the following lines into the file.
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "/var/www/html/livehelperchat-master/lhc_web" ServerName chat.yourdomain.com ServerAlias www.chat.yourdomain.com ErrorLog "/var/log/httpd/chat.yourdomain.com-error_log" CustomLog "/var/log/httpd/chat.yourdomain.com-access_log" combined </VirtualHost>
chat.yourdomain.com with any domain or sub-domain you want to use to access the application. Save the file and exit from the editor. Run the following command to restart your Apache server.
systemctl restart httpd
Now you will need to provide the ownership of the application to web server user using the following command.
chown -R apache:apache /var/www/html
You may also need to allow HTTP traffic on port
80 through the firewall if you are running one. Run the following commands for same.
firewall-cmd --zone=public --permanent --add-service=http
Now complete the installation using a web browser. Go to the following link using your favorite web browser.
You will see the system requirement check interface.
If you have followed this tutorial correctly you will see that you have all the requirements installed and configured. Click Next button to proceed further.
In this step of the installation, you will need to provide the username and password of the database user which we have created earlier. Leave the default value of the host and port fields. Provide the name of the database and click Next to go to the next step.
In this final step, you will need to provide the administrator credentials.
Provide the name of the administrator and default department. Finally, click Finish button to finish the installation of the Live Chat Helper. Now you can access the frontend of the application by going to the following URL.
You will see the default form as shown below.
This form is totally configurable. It can be configured by going to the site administration dashboard which can be accessed on the following link.
You will see the following interface.
Live Helper Chat is now ready to configure and use.
In this tutorial, we have learned how to install Live Helper Chat on CentOS 7. You can now easily install Live Helper Chat to add the chat box on your to engage potential customers as well as to provide support to existing customers.