By Hitesh Jethva, Alibaba Cloud Community Blog author.
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.
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
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.
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
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;
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
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
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:
Make sure all the requirements are satisfied. Then, click on the Next button, you should see the following page:
Provide your database username, database name and password. Then, click on the Next button. You should see the following page:
Next, provide your administrator username, email address and password. Then, click on the Finish installation button. You should see the following page:
Now, click on the Login here button. You should see the following page:
Now, provide your admin username and password. Then, click on the Login button. You will be redirected to the Live Helper Chat dashboard page:
Congratulations! You have successfully installed Live Helper Chat on an ECS CentoS 7 server.
38 posts | 4 followers
FollowAlibaba Clouder - August 16, 2019
GhulamQadir - December 30, 2019
Alibaba Clouder - May 6, 2019
Sajid Qureshi - September 13, 2018
Alibaba Cloud Indonesia - October 24, 2023
Alibaba Clouder - November 19, 2019
38 posts | 4 followers
FollowThis solution provides tools and best practices to ensure a live stream is ingested, processed and distributed to a global audience.
Learn MoreAlibaba Cloud (in partnership with Whale Cloud) helps telcos build an all-in-one telecommunication and digital lifestyle platform based on DingTalk.
Learn MoreAn array of powerful multimedia services providing massive cloud storage and efficient content delivery for a smooth and rich user experience.
Learn MoreElastic and secure virtual cloud servers to cater all your cloud hosting needs.
Learn MoreMore Posts by Hiteshjethva