This guide has been created for users who want to install and configure osTicket on CentOS 7 / RHEL 7 Linux machine. Securing osTicket after the setup with Let’s Encrypt SSL certificate will also be covered in this article. osTicket is an open source and powerful ticketing system that competes with commercial solutions. Its set of features will make you drop commercial software and choose osTicket. This software is written in PHP programming language.

Features of osTicket

Some key features available in osTicket are:

  • Ticket Filters: Define rules to route incoming tickets to the right department, agents, as well as trigger actions.
  • 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
  • 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.

For more details check out the official osTicket feature page.

Install osTicket on CentOS 7 / RHEL 7

Follow the next steps to install and configure osTicket on CentOS 7 / RHEL 7 Linux system. The only pre-requisites to this setup are user with sudo permissions and internet access from the server.

Step 1: Update CentOS / RHEL 7 system

We always recommend you perform installations on an updated Linux system.

sudo yum -y update

After the upgrade set correct hostname of the server:

sudo hostnamectl set-hostname osticket.computingforgeeks.com

Configure correct timezone and sync with NTP:

sudo timedatectl set-timezone Africa/Nairobi
sudo timedatectl set-ntp yes

Reboot the system after the upgrade:

sudo reboot -f

Step 2: Install and Configure MariaDB, httpd and PHP

We’ll need MySQL database server, Apache httpd web server, and PHP to run osTicket on CentOS 7 / RHEL 7 system.

1) Install and Configure MariaDB Database Server

Install stable release of MariaDB database server:

curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s --
sudo yum -y install MariaDB-server MariaDB-client MariaDB-backup

Start database service if your installation was successful.

sudo systemctl enable --now mariadb

Set root user password and perform other hardening steps on the server.

$ sudo mariadb-secure-installation
Switch to unix_socket authentication [Y/n] n
Change the 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

Create osTicket database and user

$ mysql -u root -p
CREATE DATABASE osticket;
GRANT ALL PRIVILEGES ON osticket.* TO osticket@localhost IDENTIFIED BY "Str0ngDBPassw0rd";
FLUSH PRIVILEGES;
QUIT;

Validate connectivity to database as osticket user:

$ mysql -u osticket -p'Str0ngDBPassw0rd'
Your MariaDB connection id is 13
Server version: 10.7.3-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)]> EXIT
Bye

2) Install and Configure Httpd Web Server

Run the following commands to install Apache Web server in your CentOS / RHEL 7 server:

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 Thu 2022-03-24 23:54:09 EAT; 8s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 2090 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd.service
           ├─2090 /usr/sbin/httpd -DFOREGROUND
           ├─2091 /usr/sbin/httpd -DFOREGROUND
           ├─2092 /usr/sbin/httpd -DFOREGROUND
           ├─2093 /usr/sbin/httpd -DFOREGROUND
           ├─2094 /usr/sbin/httpd -DFOREGROUND
           └─2095 /usr/sbin/httpd -DFOREGROUND

Mar 24 23:54:09 osticket.computingforgeeks.com systemd[1]: Starting The Apache HTTP Server...
Mar 24 23:54:09 osticket.computingforgeeks.com systemd[1]: Started The Apache HTTP Server.

3) Install PHP and required extensions

Enable EPEL repository:

### CentOS 7 ###
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

### RHEL 7 ###
sudo subscription-manager repos --enable=rhel-7-server-rpms \
  --enable=rhel-7-server-extras-rpms \
  --enable=rhel-7-server-optional-rpms
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Also add REMI which provides PHP 8.0 packages:

sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Enable PHP 8.0 Remi repository:

sudo yum -y install yum-utils
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php80

Install PHP and all the extensions required to run osTicket:

sudo yum -y install php
sudo yum -y install php-{fpm,mysqlnd,pear,cgi,common,curl,gettext,zip,opcache,apcu,imap,intl,gd,bcmath,mbstring}

Check the default version of PHP in your system. It should be 8.0

$ php -v
PHP 8.0.17 (cli) (built: Mar 15 2022 08:24:20) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.17, Copyright (c), by Zend Technologies

Step 3: Download osTicket on CentOS 7 / RHEL 7

You can find the latest release of osTicket from official product page.

sudo yum -y install curl wget unzip vim

Use curl and filtering to pull the latest release

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

unzip osTicket-v*.zip -d osTicket

Move created folder osTicket to /var/www directory:

sudo mv osTicket /var/www/

Create configuration file by copying sample one

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

Set correct permissions for the directory

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

Set correct file contexts if SELinux is enforced.

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

Step 4: Create osTicket configuration on httpd web server

Create a new VirtualHost configuration file for osTicket

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

Add and modify the following contents to suit your setup environment.

<VirtualHost *:80>
     DocumentRoot /var/www/osTicket/upload
     ServerAdmin [email protected]
     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>

Where:

  • /var/www/osTicket/upload is the path to osTicket web root
  • [email protected] is replaced with your website administrator email address
  • osticket.example.com is your osTicket FQDN website admin email address

Ensure there are no configuration syntax errors in your Httpd server.

$ sudo apachectl configtest
Syntax OK

Remove apache welcome page:

 sudo rm /etc/httpd/conf.d/welcome.conf

Restart your httpd service.

sudo systemctl restart httpd

If you have firewalld active, then open http and https ports.

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

Step 5: Finalize osTicket installation on CentOS 7 / RHEL 7

Visit your web server IP address or FQDN on http://osticket.example.com to complete web configuration for osTicket.

Confirm all the checks succeed.

osticket centos rhel0 checks

Fill the required information:

Under “Database Settings” provide database connection details

  • MySQL Database: osticket
  • MySQL Username: osticket
  • MySQL Password: Str0ngDBPassw0rd
install osticket configure database

Then click “Install Now” button to start installation. Once it’s finished, access URLs for different functions are shown.

install osticket congratulations

Update the permissions for ost-config.php file

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

Delete setup folder after successful installation of osTicket on CentOS 7|RHEL 7 server.

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

Save access URLs since you’ll need them.

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/

The staff control panel is osticketfqdn/scp

os ticket install ubuntu 18.04 05 admin

You should get dashboard similar to one below after login

os ticket install ubuntu 18.04 07 admin

Step 6 – Secure osTicker with Let’s Encrypt SSL Certificate

Secure your server installation by following our guide in the following link;

Similar articles:

LEAVE A REPLY

Please enter your comment!
Please enter your name here