In this short article you’ll be able to install and configure osTicket on CentOS 8|RHEL 8|Oracle Linux 8 system. 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 8.0. 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|RHEL 8|Oracle Linux 8 Linux System
Below are the next steps you’ll use to install osTicket on CentOS 8|RHEL 8|Oracle Linux 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:
sudo yum -y update
sudo yum -y install yum-utils
You can also set server hostname ( Optional):
sudo hostnamectl set-hostname osticket.computingpost.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 / RHEL / Oracle Linux 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
Apache httpd web server is not installed by default. 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.computingpost.com systemd[1]: Starting The Apache HTTP Server...
Mar 29 09:46:54 osticket.computingpost.com systemd[1]: Started The Apache HTTP Server.
Mar 29 09:46:54 osticket.computingpost.com httpd[4498]: Server configured, listening on: port 80
Step 4: Install PHP and required dependencies
The next step is installation of PHP 8.0 required to run osTicket. Add EPEL and Remi repositories:
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 -y
Enable PHP 8.0 module:
sudo dnf module install php:remi-8.0 -y
Install other PHP extensions required to run osTicket:
sudo dnf -y install php php-{fpm,mysqlnd,pear,cgi,common,curl,gettext,zip,opcache,apcu,imap,intl,gd,bcmath} -y
The version of PHP that will be installed is v8.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 5: Install osTicket on CentOS 8|RHEL 8|Oracle Linux 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 6: 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
Remove apache welcome page:
sudo rm /etc/httpd/conf.d/welcome.conf
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.computingpost.com systemd[1]: Starting The PHP FastCGI Process Manager...
Mar 29 10:08:38 osticket.computingpost.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 7: Configure osTicket on CentOS 8|RHEL 8|Oracle Linux 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 system:
Fill the required information:
Under “Database Settings” provide database connection details
- MySQL Database: osticket_db
- MySQL Username: osticket_user
- MySQL Password: [email protected]
Then click “Install Now” button to start installation.
On successful installation, you will get below page:
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.computingpost.com/ |
Your Staff Control Panel: //osticket.computingpost.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
Now try to access Your Staff Control Panel:
In our next article we look at how you can secure osTicket with Let’s Encrypt SSL certificates.