How to Install osTicket on CentOS 7

osTicket is a free and open-source customer support ticketing system and widely-used globally. It seamlessly integrate with inquiries created via email, phone and web-based forms into a simple easy-to-use multi-user web interface. Manage, organize and archive all your support requests and responses in one place while providing your customers with accountability and responsiveness they deserve. It is a simple, lightweight, reliable, open source, web-based and easy to setup and use help desk ticketing system.

In this tutorial, we will explain how to install and configure osTicket on CentOS 7


  • HTTP server running Apache
  • PHP version 7.0 to 7.3, 7.3 is recommended
  • PHP Extensions - mysqli, gd, gettext, imap, json, mbstring, xml, intl, apcu, opcache
  • MySQL database version 5.0 or greater or MariaDB equivalent
Update System

sudo yum update

Install Basic Packages

sudo yum install vim git wget unzip

Change SELinux mode to Permissive

Edit the /etc/selinux/config file as follows and reboot the system

sudo vim /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.

# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.


Install PHP

For installing PHP 7EPEL and Remi repository need to install and enable on CentOS 7 system with the below commands.

sudo yum install
sudo yum install

Install yum-utils, it is a collection of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration. Use the yum-config-manager program to enable Remi repository as the default repository for installing PHP 7.3 version.

sudo yum install yum-utils
sudo yum-config-manager --enable remi-php73

Install PHP and the required extensions.

sudo yum install php php-cli php-fpm php-common php-mbstring php-curl php-gd php-mysql php-json php-xml php-imap php-intl php-pecl-apcu php-opcache php-zip

Install Apache

sudo yum install httpd

Start and enable the Apache services at boot time.

sudo systemctl start httpd
sudo systemctl enable httpd

Install MariaDB Database

By default CentOS 7 base repository provides MariaDB 5.5 version, which will work for osTicket application. But in this tutorial, we will install the latest version of MariaDB 10.4

Create repo for MariaDB 10.4

sudo vim /etc/yum.repos.d/MariaDB.repo

name = MariaDB
baseurl =

Install MariaDB and its dependencies

sudo yum install MariaDB-server

Start and enable the MariaDB Server services at boot time.

sudo systemctl start mariadb
sudo systemctl enable mariadb

Configure MariaDB

sudo mysql_secure_installation

Create Database for osTicket Server

sudo mysql -u root -p

create database osticketdb character set UTF8 collate utf8_bin;
create user 'osticketuser'@'localhost' identified BY 'Linuxyogi@123';
grant all privileges on osticketdb.* to osticketuser@localhost;
flush privileges;

Install osTicket

Create a new document root directory called "support" and download the osTicket latest release and extract the files.

cd /var/www/html/
sudo mkdir -p /var/www/html/support

mv upload/* /var/www/html/support/
rm -rf scripts upload

Change the ownership of support directory.

sudo chown -R apache:apache support

cd support/include/

sudo cp ost-sampleconfig.php ost-config.php

sudo chown -R apache:apache ost-config.php

Allow TCP ports 80 and 443 from Firewall for osTicket web installer and Dashboard access.

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --reload

Web Installation to Setup osTicket

Open browser and navigate to http://<server-ip>/support and make sure all prerequisites are marked green. Click Continue.


To proceed further temporarily disable the SELinux mode with the following command. This change is valid for the current runtime session only.

sudo setenforce 0

In this below step, configuration file permission need to be changed. So change the file permission of ost-config.php file from 0644 to 0666 then hit Done and Click Continue.

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

Fill the System Settings, Admin User details and osTicket Database name, Database username and Database password for Database connection. Click Install Now.

Information links of osTicket URL and admin panel will be available in below window.

Revert back the writable permission to read of the configuration file from 0666 to 0644 from terminal.

cd /var/www/html/support/include/
sudo chmod 0644 ost-config.php

Open browser and navigate to http://<server-ip>/support/scp for Admin panel.


As shown in below picture remove setup directory from terminal

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

Leave a Reply

Your email address will not be published. Required fields are marked *