How to Install osTicket Open Source Ticketing System on CentOS 8. In this article we will introduce what osTicket is and move on to installation steps with downloading Apache, MariaDB and PHP.
What is osTicket
osTicket is a free, open source and one of the most popular support ticketing systems developed by Enhancesoft. You can use it as a help and support ticketing system as well as support assistance with clients and customers. It comes with a beautiful web interface that allows you to manage, organize and log all our support requests and responses in one single place. It is developed using PHP programming language and supports MariaDB and MySQL as a database backend. It can be installed on any dedicated server or cloud vps and is suited for small and midsize enterprise customers. osTicket provides more features and tools than other ticketing systems, and it is used by 15,000+ businesses all over the world.
osTicket only supports PHP version >= 8.0. So, you will need to install PHP version 8.0 or later to your server. By default, PHP 8.0 is not included in the CentOS 8 default repository. So you will need to add the EPEL and Remi PHP repository to your server.
First, install the EPEL and Remi PHP repository with the following command:
Once both repository are installed, list the available PHP versions using the following command:
dnf module list php
You will get the following output:
CentOS 8 - AppStream
Name Stream Profiles Summary
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
Remi's Modular repository for Enterprise Linux 8 - x86_64
Name Stream Profiles Summary
php remi-7.2 common [d], devel, minimal PHP scripting language
php remi-7.3 common [d], devel, minimal PHP scripting language
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
php remi-8.1 common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Now, reset the default PHP module and enable the PHP 8.0 module using the following command:
Next, you will need to secure the MariaDB and set the MariaDB root password. You can set it with the following command:
mysql_secure_installation
Answer all the questions to set a MariaDB root password and secure the installation:
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
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
Next, log in to the MariaDB shell using the command given below:
mysql -u root -p
Once you are log in, create a database and user with the following command:
CREATE DATABASE osticket;
CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'password';
Next, grant all the privileges to osTicket database with the following command:
GRANT ALL PRIVILEGES ON osticket.* TO osticket@localhost IDENTIFIED BY "password";
Next, flush the privileges and exit from the MariaDB shell with the following command:
FLUSH PRIVILEGES;
EXIT;
At this point, the MariaDB database is created and ready for use. You can now proceed to download the osTicket.
Next, you will need to create an Apache virtual host configuration file to serve osTicket over the internet. You can create it with the following command:
nano /etc/httpd/conf.d/osticket.conf
Add the following lines:
ServerAdmin admin@exampledomain.com
DocumentRoot /var/www/html/osticket/upload
ServerName osticket.exampledomain.com
Options FollowSymlinks
AllowOverride All
Require all granted
ErrorLog /var/log/httpd/osticket_error.log
CustomLog /var/log/httpd/osticket_access.log combined
Save and close the file when you are finished. Then, restart the Apache service to apply the configuration changes:
systemctl restart httpd
You can also check the status of the Apache service using the following command:
systemctl status httpd
You will get the following output:
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Fri 2022-03-11 06:05:29 UTC; 2s ago
Docs: man:httpd.service(8)
Main PID: 5933 (httpd)
Status: "Started, listening on: port 80"
Tasks: 213 (limit: 11412)
Memory: 24.3M
CGroup: /system.slice/httpd.service
├─5933 /usr/sbin/httpd -DFOREGROUND
├─5935 /usr/sbin/httpd -DFOREGROUND
├─5936 /usr/sbin/httpd -DFOREGROUND
├─5937 /usr/sbin/httpd -DFOREGROUND
└─5938 /usr/sbin/httpd -DFOREGROUND
Mar 11 06:05:29 centos8 systemd[1]: httpd.service: Succeeded.
Mar 11 06:05:29 centos8 systemd[1]: Stopped The Apache HTTP Server.
Mar 11 06:05:29 centos8 systemd[1]: Starting The Apache HTTP Server...
Mar 11 06:05:29 centos8 httpd[5933]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::200:d>
Mar 11 06:05:29 centos8 systemd[1]: Started The Apache HTTP Server.
Mar 11 06:05:29 centos8 httpd[5933]: Server configured, listening on: port 80
At this point, Apache is configured to host the osTicket. You can now proceed to the next step.
Configure Firewall
If the firewalld firewall is installed and configured on your server, then you will need to allow ports 80 and 443 via firewalld. You can allow them by running the following command:
Now, open your web browser and access the osTicket web installer using the URL http://osticket.exampledomain.com. You will be redirected to the prerequisites page:
If all required packages are installed, then click on the Continue button. You should see the osTicket basic installation page:
Provide your helpdesk name, email, language, admin username, password, database settings, then click on the Install Now button. Once the osTicket has been installed, you should see the following page:
Now, click on the Staff Control Panel URL. You will be redirected to the osTicket control panel login page:
Provide your admin username, password, and click on the Log In button. You should see the osTicket setting page:
Change the default osTicket settings as per your requirement and click on the Savechanges button. You should see the osTicket dashboard on the following page:
Finally, open your terminal and remove the osTicket setup directory with the following command:
How to Install osTicket Open Source Ticketing System on CentOS 8 Conclusion
In this post, we explained how to install osTicket with Apache on CentOS 8. osTicket is an awesome help desk ticketing system that provides a complete set of tools required for a help and support ticketing system. You can now deploy the osTicket helpdesk solution in your company to provide customers with a better way to communicate with the support team.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.