×
Community Blog How to Install Live Helper Chat on CentOS 7

How to Install Live Helper Chat on CentOS 7

In this tutorial, we will learn how to install and configure Live Helper Chat on an Alibaba Cloud Elastic Compute Service (ECS) CentOS 7 server.

By Hitesh Jethva, Alibaba Cloud Community Blog author.

Introduction

Live helper chat is a free, open source and flexible chat web application written in PHP.

In this tutorial, we will learn how to install and configure Live Helper Chat on an Alibaba Cloud Elastic Compute Service (ECS) CentOS 7 server.

Prerequisites

  • A fresh Alibaba Cloud instance with CentOS 7 installed.
  • A root password is set up to your instance.

Create a new ECS instance and connect to your instance as the root user.

Once you are logged into your CentOS 7 instance, run the following command to update your base system with the latest available packages.

yum update -y

Getting Started

Before starting, you will need to disable Selinux on your server. You can do this by editing /etc/selinux/config file:

nano /etc/selinux/config

Make the following changes:

SELINUX=disabled

Save and close the file. Then, restart your server to apply the changes.

Install Apache, PHP and MariaDB

Live helper chat runs on web server, written in PHP language and use MariaDB to store their data. So, you will need to install Apache, MariaDB, PHP and other PHP libraries to your instance. You can install all of them with the following command:

yum install httpd mariadb mariadb-server php php-cli php-mysqli php-mysql php-gd php-bcmath php-pdo php-mbstring -y

Once all the packages are installed, start Apache and MariaDB service and enable them to start on boot time with the following command:

systemctl start httpd
systemctl start mariadb
systemctl enable httpd
systemctl enable mariadb

You can now check the status of MariaDB service with the following command:

systemctl status mariadb

Configure MariaDB

By default, MariaDB is not secured, so you will need to secure it first. You can secure it with the following command:

mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: 
Re-enter new password: 
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Once MariaDB is secured, log in to MariaDB shell with the following command:

mysql -u root -p

Enter your root password when prompt, then create a database and user for Live Helper Chat with the following command:

MariaDB [(none)]>CREATE DATABASE livechatdb;
MariaDB [(none)]>CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

Next, grant all the privileges to the livechatdb with the following command:

MariaDB [(none)]>GRANT ALL PRIVILEGES ON livechatdb.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Next, flush the privileges and exit from the MariaDB shell with the following command:

MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>EXIT;

Install Live Helper Chat

First, you will need to download the latest version of Live Helper Chat from Git repository. You can download it with the following command:

wget https://github.com/remdex/livehelperchat/archive/master.zip

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

unzip master.zip

Next, copy the extracted directory to the Apache web root directory with the following command:

cp -r livehelperchat-master /var/www/html/livehelperchat

Next, give proper permissions to the livehelperchat directory with the following command:

chown -R apache:apache /var/www/html/livehelperchat

chmod -R 775 /var/www/html/livehelperchat

Configure Apache for Live Helper Chat

Next, you will need to create an apache virtual host file for Live Helper Chat. You can do this with the following command:

nano /etc/httpd/conf.d/livehelperchat.conf

Add the following lines:

<VirtualHost *:80>
    ServerAdmin admin@your-domain.com
    DocumentRoot "/var/www/html/livehelperchat/lhc_web"
    ServerName your-domain.com
    ErrorLog "/var/log/httpd/livehelperchat-error_log"
    CustomLog "/var/log/httpd/livehelperchat-access_log" combined
</VirtualHost>

Save and close the file, when you are finished.

Next, enable mod_rewrite module for apache by editing /etc/httpd/conf/httpd.conf file:

nano /etc/httpd/conf/httpd.conf

Make the following changes:

<Directory "/var/www/html">
 AllowOverride All

Save and close the file. Then, restart Apache service with the following command:

systemctl restart httpd

You can now check the status of Apache service with the following command:

systemctl status httpd

Access Live Helper Chat

Before accessing Live Helper Chat web interface, you will need to allow port 80 through firewalld. You can do it with the following command:

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

Next, reload the firewalld to apply all the changes with the following command:

firewall-cmd --reload

Now, open your web browser and type the URL http://your-domain.com. You will be redirected to the following page:

1

Make sure all the requirements are satisfied. Then, click on the Next button, you should see the following page:

2

Provide your database username, database name and password. Then, click on the Next button. You should see the following page:

3

Next, provide your administrator username, email address and password. Then, click on the Finish installation button. You should see the following page:

4

Now, click on the Login here button. You should see the following page:

5

Now, provide your admin username and password. Then, click on the Login button. You will be redirected to the Live Helper Chat dashboard page:

6

Congratulations! You have successfully installed Live Helper Chat on an ECS CentoS 7 server.

0 1 1
Share on

Hiteshjethva

39 posts | 4 followers

You may also like

Comments

Hiteshjethva

39 posts | 4 followers

Related Products