You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

In this short article you’ll be able to install and configure osTicket on CentOS 8 Linux. osTicket is a powerful alternative to commercial ticketing system available in the market. This osTicket installation on CentOS 8 uses Apache as web server, MariaDB as a database of choice and PHP 7.4. In our previous guide we covered installation of osTicket on Ubuntu.

For users new to osTicket it is an open source ticketing management system fit for support use cases of any size. osTicket is developed using PHP programming language. The software comes with a simple yet intuitive and powerful web interface to help you manage, organize, track and archive all support ticket requests in your company.

Features of osTicket Ticketing System

Here are some key features of osTicket system. All features are available in the official osTicket feature page.

  • Custom Fields: Customize the data collected from users when submitting a ticket to help get straight to the issue.
  • Custom Columns and Queues: A custom queue is a view of tickets based on a custom criteria that you specify. A custom column is an additional field that is not displayed initially when viewing the ticket tab
  • Ticket Filters: Define rules to route incoming tickets to the right department, agents, as well as trigger actions.
  • Help Topics: Configurable help topics for web tickets allow you to route inquiries to exactly the right department for swift resolution.
  • Agent Collision Avoidance: Ticket locking mechanism to allow staff to lock tickets during response to avoid conflicting or dual responses.
  • Assign, Transfer, & Referral: Transfer tickets between departments to make sure it’s being handled by the correct agents, or assign tickets to a particular agent or team of agents.
  • Auto-Responder: Configurable automatic reply sent out when a new ticket is opened or a message is received.
  • Thread Action: Agents have the ability to create a Ticket or Task from a Ticket’s thread entry or from a Task’s thread entry.
  • Service Level Agreements: All support requests and responses are archived online for end users.
  • Advanced Search: Narrow down your search criteria with Advanced Search.
  • Tasks: Create an internal to-do list for agents.

Install osTicket on CentOS 8 Linux System

Below are the next steps you’ll use to install osTicket on CentOS 8 Linux system. There are dependencies to be installed which osTicket will need to run.

Step 1: Update system

Update your system before you start the installation of dependencies and osTicket on CentOS 8.

sudo yum -y update
sudo yum -y install yum-utils

You can also set server hostname ( Optional):

sudo hostnamectl set-hostname osticket.computingforgeeks.com

Check and reboot if restart is required:

echo "checking if reboot is required.."
echo ""
sudo needs-restarting -r
RESULT=$?
if [ $RESULT -eq 1 ]; then
  echo "Reboot $HOSTNAME to install updates.."
  sudo reboot
else
  echo "No reboot required"
fi

Step 2: Install and Configure MariaDB database

You will need one MySQL database with a valid user, password, and hostname handy during installation. MySQL user specified need to have FULL privileges on the database created.

Run the commands below to install MariaDB server on CentOS 8 system:

sudo yum -y install @mariadb

Start and enable the database service:

sudo systemctl enable --now mariadb

Secure your Database server after installation:

$ sudo mysql_secure_installation

Confirm authentication as root user is working:

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

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]>

The next step is creation of osTicket database. Login to your database server as root user and create a database for osTicket:

$ mysql -u root -p
CREATE DATABASE osticket_db;
GRANT ALL PRIVILEGES ON osticket_db.* TO [email protected] IDENTIFIED BY "[email protected]";
FLUSH PRIVILEGES;
QUIT;

Test database shell connectivity:

$ mysql -u osticket_user -p'[email protected]'
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 10.3.27-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| osticket_db        |
+--------------------+
2 rows in set (0.001 sec)

MariaDB [(none)]> \q
Bye

Step 3: Install Apache Web Server on CentOS 8

Apache httpd web server is not installed by default on CentOS 8. Run the following commands to download and install it.

sudo yum -y install httpd

Once installed you can start the service with the command below:

sudo systemctl enable --now httpd

Confirm the service status:

$ systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-03-29 09:46:54 UTC; 26s ago
     Docs: man:httpd.service(8)
 Main PID: 4498 (httpd)
   Status: "Total requests: 1; Idle/Busy workers 100/0;Requests/sec: 0.0526; Bytes served/sec:  33 B/sec"
    Tasks: 213 (limit: 11232)
   Memory: 27.5M
   CGroup: /system.slice/httpd.service
           ├─4498 /usr/sbin/httpd -DFOREGROUND
           ├─4499 /usr/sbin/httpd -DFOREGROUND
           ├─4500 /usr/sbin/httpd -DFOREGROUND
           ├─4501 /usr/sbin/httpd -DFOREGROUND
           └─4502 /usr/sbin/httpd -DFOREGROUND

Mar 29 09:46:54 osticket.computingforgeeks.com systemd[1]: Starting The Apache HTTP Server...
Mar 29 09:46:54 osticket.computingforgeeks.com systemd[1]: Started The Apache HTTP Server.
Mar 29 09:46:54 osticket.computingforgeeks.com httpd[4498]: Server configured, listening on: port 80

Step 3: Install PHP on CentOS 8

The next step is installation of PHP 7.4 on CentOS 8. Add EPEL and Remi repisitories:

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf -y install yum-utils

Reset php AppStream module:

sudo dnf module reset php

Enable PHP 7.4 module:

sudo dnf module install php:remi-7.4 -y

Install other PHP 7.4 extensions:

sudo dnf -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap,apcu}

The version of PHP that will be installed is v7.4:

$ php -v
PHP 7.4.16 (cli) (built: Mar  2 2021 10:35:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies

Step 4: Download and Install osTicket on CentOS 8

At this point, you should be ready to download the latest release of osTicket.

sudo yum -y install curl wget unzip vim

Download latest release of osTicket:

curl -s https://api.github.com/repos/osTicket/osTicket/releases/latest \
  | grep browser_download_url \
  | grep "browser_download_url" \
  | cut -d '"' -f 4 \
  | wget -i -

Extract downloaded osTicket archive:

unzip osTicket-v*.zip -d osTicket

You will get two directories after extraction: scripts and upload

$ ls -1 osTicket
scripts
upload

Move osTicket folder to /var/www directory:

sudo mv osTicket /var/www/

Next create an osTicket configuration file:

sudo cp /var/www/osTicket/upload/include/ost-sampleconfig.php /var/www/osTicket/upload/include/ost-config.php 

Change ownership of osTicket web directory to apache user and group.

sudo chown -R apache:apache /var/www/osTicket

Step 5: Configure Apache Web Server

Create VirtualHost configuration file for osTicket on Apache configurations directory:

sudo vim /etc/httpd/conf.d/osticket.conf

Add and modify the following contents.

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/osTicket/upload
     ServerName osticket.example.com
     ServerAlias www.osticket.example.com
     <Directory /var/www/osTicket/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog /var/log/httpd/osticket_error.log
     CustomLog /var/log/httpd/osticket_access.log combined
</VirtualHost>

Replace:

  • [email protected] with website admin email address
  • osticket.example.com with your domain name.
  • /var/www/osTicket/upload with the path to your osTicket files.

Confirm config syntax:

$ sudo apachectl -t
Syntax OK

Enable php-fpm service:

sudo systemctl enable --now php-fpm

Confirm the service is started without an error:

$ systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-03-29 10:08:38 UTC; 6s ago
 Main PID: 6570 (php-fpm)
   Status: "Ready to handle connections"
    Tasks: 6 (limit: 11232)
   Memory: 25.7M
   CGroup: /system.slice/php-fpm.service
           ├─6570 php-fpm: master process (/etc/php-fpm.conf)
           ├─6571 php-fpm: pool www
           ├─6572 php-fpm: pool www
           ├─6573 php-fpm: pool www
           ├─6574 php-fpm: pool www
           └─6575 php-fpm: pool www

Mar 29 10:08:38 osticket.computingforgeeks.com systemd[1]: Starting The PHP FastCGI Process Manager...
Mar 29 10:08:38 osticket.computingforgeeks.com systemd[1]: Started The PHP FastCGI Process Manager.

If you have SELinux in enforcing mode, then label file contexts correctly:

sudo setsebool -P httpd_can_network_connect 1
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/osTicket(/.*)?"
sudo restorecon -Rv /var/www/osTicket/

Restart httpd service:

sudo systemctl restart httpd

Open http and https ports in the firwalld:

sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --reload

Step 6: Install and configure osTicket on CentOS 8

Now that everything is set, finalize the installation by visiting the osTicket Web console on http://osticket.example.com in your web browser.

Confirm the software requirements checks passes on your CentOS 8 system:

Install osTicket CentOS 8 01

Fill the required information:

Install osTicket CentOS 8 02

Under “Database Settings” provide database connection details

  • MySQL Database: osticket_db
  • MySQL Username: osticket_user
  • MySQL Password: [email protected]
os ticket install ubuntu 18.04 03

Then click “Install Now” button to start installation.

On successful installation, you will get below page:

Install osTicket CentOS 8 03

Now change the permission of ost-config.php to remove write access as shown below.

sudo chmod 0644 /var/www/osTicket/upload/include/ost-config.php

Also, remove setup directory:

sudo rm -rf /var/www/osTicket/upload/setup/

Take note of all your access URLs.

Your osTicket URL:
//osticket.computingforgeeks.com/
Your Staff Control Panel:
//osticket.computingforgeeks.com/scp
osTicket Forums:
http://osticket.com/forum/
osTicket Community Wiki:
http://osticket.com/wiki/

To log in to backend system ( Staff control panel), use domain.com/scp

os ticket install ubuntu 18.04 05 admin

Now try to access Your Staff Control Panel:

os ticket install ubuntu 18.04 07 admin

In our next article we look at how you can secure osTicket with Let’s Encrypt SSL certificates.

How To Secure osTicket with Let’s Encrypt SSL Certificates

Similar articles:

Install UVdesk Helpdesk Ticketing System On CentOS 8

Install Attendize Ticket & Event Management System on Ubuntu

Install OTRS Ticketing system on Ubuntu

As an appreciation for the content we put out,
we would be thrilled if you support us!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here