Setting up osTicket Support Ticket System

In this tutorial we will show you how to install and configuration of osTicket on your RHEL/CentOS 7 server.

osTicket is a widely-used, free and trusted open source support ticket system. It seamlessly routes inquiries created via email, web-forms and phone calls into a simple, easy-to-use, multi-user, web-based customer support platform.

To configure the osTicket Support Ticket System the steps are:

1) Install all the required prerequisites.

We have to install all the required prerequisites, including PHP modules; If you are not configured yum server, refer the link Configure the Yum Server in Centos7/RHEL7/Fedora22.

# yum install httpd mariadb mariadb-server wget unzip php php-mysql php-fpm php-cli php-xml php-common php-gd php-imap php-mbstring php-opcache php-apcu php-intl

#yum install httpd mariadb mariadb-server wget unzip php php-mysql php-fpm php-cli php-xml 
php-common php-gd php-imap php-mbstring php-opcache php-apcu php-intl

During the installation of above PHP modules, some of the packages (php-fpm,php-imap,php-mbstring,php-opcache,php-apcu,php-intl and php-imap) didn’t install.

To install these packages we need to install epel and remi repository. Now first we are downloading the epel rpm using wget command and then install it.

# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

 

# ls
anaconda-ks.cfg  epel-release-latest-7.noarch.rpm
# rpm -ivh epel-release-latest-7.noarch.rpm
warning: epel-release-latest-7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-9                 ################################# [100%]
#

Similarly for remi repository.

# wget http://rpms.famillecollet.com/enterprise/7/remi/x86_64/remi-release-7.2-1.el7.remi.noarch.rpm
# rpm -ivh remi-release-7.2-1.el7.remi.noarch.rpm
warning: remi-release-7.2-1.el7.remi.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:remi-release-7.2-1.el7.remi      ################################# [100%]
#

Enable the remi repository by edit  the  /etc/yum.repos.d/remi.repo file.

#vim /etc/yum.repos.d/remi.repo

# Repository: http://rpms.remirepo.net/
# Blog:       http://blog.remirepo.net/
# Forum:      http://forum.remirepo.net/

[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

After save the remi repo file, We need to update the all repositories and then install the packages.

# yum repolist all && yum install php-fpm php-imap php-mbstring php-opcache  php-apcu php-intl php-imap

# yum repolist all && yum install php-fpm php-imap php-mbstring php-opcache  php-apcu php-intl php-imap

2) Download the osTicket  latest stable version.

First thing to do is to go to osTicket’s download page and download the latest stable version of osTicket. We have to full-fill mandatory field like name, email , refer the below screen shot.

osticket1_ittroubleshooter_in

 

Click on “ok” button to save the setup, refer the screen shot.

osticket2_ittroubleshooter_in

Before move the setup on Linux box, First we have created the osticket dir on /opt location.

# mkdir -p /opt/osticket

On below screen shot, We are using the Winscp  to move osTicket setup from window 10 to Linux box.

osticket3_ittroubleshooter_in

Unpack the osTicket archive.

# cd /opt/osticket/
# ls
osTicket-v1.10.zip
# unzip osTicket-v1.10.zip

After extract the zip, we’ll make the soft-link of upload directory  with the default root directory of Apache.

# ls
osTicket-v1.10.zip  scripts  upload
# ln -s /opt/osticket/upload /var/www/html/support

If you have SELinux enabled on the system, run the following command.

#chcon -R -t httpd_sys_rw_content_t /var/www/html/support/

3) Change the Ownership and Permission.

We will need to change some directories permissions;

# chown apache: -R /var/www/html/support /opt/osticket

Then, we’ll also need to copy a sample configuration file to its default configuration file.

# cd /var/www/html/support/
# cp include/ost-sampleconfig.php include/ost-config.php

4) Start and enable the Apache web service.

# systemctl start httpd
#  systemctl enable httpd

5) Setting up MariaDB for osTicket.

Now, we are going to configure MariaDB, we need to create a password for the root user of mariadb so that we can use it to login and create the database for our osTicket installation.

Before creating the password and configuring the database, we need to start and enable the service of mariadb.

# systemctl start mariadb && systemctl enable mariadb
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'
# mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n] y
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

Now osticket need a database system to store the data. So, we’ll need to first login into the mariadb command environment.

# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.35-MariaDB MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database osticketdb;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'osticketuser'@'localhost' IDENTIFIED BY 'ostpasswduser';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL ON osticketdb.* TO 'osticketuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

6) Allow the apache default port on firewall.

[root@dbserver ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent
success
[root@dbserver ~]# firewall-cmd --reload
success
[root@dbserver ~]#

7) Accessing osTicket using browser.

Navigate to http://<osTicket server ip add>/support/ (In our case http://192.168.1.2/support/) it will open the http://192.168.1.2/support/setup/install.php page. It will show all the required packages are installed or not, refer below screen shot.

osticket4_ittroubleshooter_in_new

As below screen shot, configuration file is not writable. So change the file permission from 0644 to 0666 then hit Done, Continue button.

# cd /var/www/html/support/include/
# chmod 0666 include/ost-config.php

osticket5_ittroubleshooter_in_new

On next page you have to fill out the information of system settings, admin user and database settings.

osticket6_ittroubleshooter_in

Fill out the information of admin user.

osticket7_ittroubleshooter_in

And on the last section you have to enter the database name,username and password. Which we have mentioned above.

osticket8_ittroubleshooter_in

 

After the installation has been completed successfully, we will be welcomed by a Congratulations screen.

osticket9_ittroubleshooter_in

If we click on http://192.168.1.2/support, we will be redirected to the osTicket support page, refer below screen shot.

osticket12_ittroubleshooter_in

Similarly, when we click on http://192.168.1.2/support/scp, it will navigate to login into the admin panel page.

osticket10_ittroubleshooter_in

Here, we need to  to enter the login details which we have created above while configuring the database and other information in the web installer.

osticket11_ittroubleshooter_in

After successful login on osticket control panel, we will be able to access our dashboard and other admin sections, refer above screen shot.

On last we will now need to delete the setup directory for security reasons. for that we will need to run the following command.

#rm -rf /var/www/html/support/setup/

Congratulations! We have successfully installed osTicket. Hope this post will help Linux/Unix beginners. Please share you feedback and Comments. Stay tune for more updates with ittroubleshooter.in …!!!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz