How to install osTicket on CentOS 8 Linux

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatshut down

In this short article, you will be able to install and configure osTicket on CentOS 8 Linux. osTicket is a powerful alternative to commercial ticketing systems on the market. This osTicket installation on CentOS 8 uses Apache as the web server, MariaDB as the preferred database, and PHP 7.4. In our previous guide, we introduced how to install osTicket on Ubuntu.

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

Functions of osTicket ticketing system

These are some of the key functions of the osTicket system.All functions are available in The official osTicket feature page.

  • Custom field: Customize the data collected from users when submitting a ticket to help you solve the problem directly.
  • Custom columns and queues: The custom queue is a ticket view based on the custom conditions you specify.Custom columns are additional fields and will not be displayed initially when viewing the “Tickets” tab
  • Ticket filter: Define rules to route incoming tickets to the correct department, agent, and trigger action.
  • Help topic: The configurable help topic for web tickets allows you to route queries to the correct department for quick resolution.
  • Avoid proxy collisions: The ticket locking mechanism allows staff to lock the ticket during the response to avoid conflicts or double responses.
  • Assignment, transfer and recommendation: Transfer tickets between departments to ensure that they are handled by the correct agents, or assign tickets to a specific agent or team of agents.
  • automatic response: When a new ticket is opened or a message is received, a configurable automatic reply is issued.
  • Thread action: The agent can create a ticket or task from the thread entry of the ticket or the thread entry of the task.
  • Service Level Agreement: All support requests and responses are archived online for use by end users.
  • Advanced Search: Use “Advanced Search” to narrow down the search criteria.
  • task: Create an internal to-do list for the agent.

Install osTicket on CentOS 8 Linux system

The following is the next step for installing osTicket on CentOS 8 Linux system. There are some dependencies that need to run osTicket.

Step 1: Update the system

Please update the system before starting to install dependencies and osTicket on CentOS 8.

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

You can also set the server hostname (optional):

sudo hostnamectl set-hostname osticket.computingforgeeks.com

Check and restart (if you need to restart):

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 a database with a valid MySQL database user, password, with CPU name Very convenient during the installation process. The specified MySQL user needs to have FULL privileges on the created database.

Run the following command to install MariaDB server on CentOS 8 system:

sudo yum -y install @mariadb

Start and enable the database service:

sudo systemctl enable --now mariadb

Protect the security of the database server after installation:

$ sudo mysql_secure_installation

Confirm that the authentication is working for the root user:

$ 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 to create the osTicket database. Log in to the database server as the 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 the database shell connection:

$ 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

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

sudo yum -y install httpd

After the installation is complete, you can start the service with the following command:

sudo systemctl enable --now httpd

Confirm 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 to install PHP 7.4 on CentOS 8. Add copies of EPEL and Remi:

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 the php AppStream module:

sudo dnf module reset php

Enable the 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 PHP version to 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 Latest release osTicket.

sudo yum -y install curl wget unzip vim

Download the latest version 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 the downloaded osTicket archive:

unzip osTicket-v*.zip -d osTicket

After unzipping, you will get two directories: scripts with upload

$ ls -1 osTicket
scripts
upload

Move the osTicket folder to the /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 the ownership of the osTicket Web directory to the apache user and group.

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

Step 5: Configure the Apache web server

Create a VirtualHost configuration file for osTicket in the Apache configuration directory:

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

Add and modify the following content.

<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>

instead:

  • [email protected] Use webmaster email address
  • osticket.example.com With your domain name.
  • /var/www/osTicket/upload And the path of the osTicket file.

Confirm the configuration syntax:

$ sudo apachectl -t
Syntax OK

Enable php-fpm service:

sudo systemctl enable --now php-fpm

Confirm that the service is started and there are no errors:

$ 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 put SELinux in enforcing mode, the file context is correctly marked:

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 the httpd service:

sudo systemctl restart httpd

Open http and https ports in firwalld:

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

Step 6: Install and configure osTicket on CentOS 8

Now that all settings have been completed, please visit the osTicket web console on the following website to complete the installation: https://osticket.example.com In your web browser.

Confirm that the software requirements check has passed your CentOS 8 system:

Fill in 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 the installation.

After successful installation, you will get the following page:Install osTicket CentOS 8 03

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

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

In addition, delete the installation directory:

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

Write down all your visit URLs.

Your osTicket URL://osticket.computingforgeeks.com/Your employee control panel://osticket.computingforgeeks.com/scp
osTicket Forum:https://osticket.com/forum/osTicket Community Wiki:https://osticket.com/wiki/

To log in to the back-end system (Staff control panel), use domain.com/scpOS ticket installation ubuntu 18.04 05 administrator

Now try to access the “Employee Control Panel”:OS ticket installation ubuntu 18.04 07 administrator

In our next article, we will introduce how to protect osTicket with a “Let’s Encrypt SSL” certificate.

How to protect osTicket by encrypting the SSL certificate

Similar articles:

Install UVdesk Helpdesk ticketing system on CentOS 8

Install Attendize Ticket & Event Management System on Ubuntu

Install OTRS ticketing system on Ubuntu

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatshut down

Related Posts