How to Install osTicket Open Source Ticketing System on CentOS 8

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 Features

  • Auto Respond function.
  • Automated Process
  • Task assist and transfer tasks to another user.
  • Technology Forefront
  • Agent Collision
  • Ticket Filters
  • Custom Columns and Queues
  • Customer Portal
  • Dashboard Reports
  • Service Level Agreements.

In the next steps about how to install the osTicket ticketing system on CentOS 8 we will move onto installation phase. 

Install osTicket Open Source Ticketing System on CentOS 8

Install Apache, MariaDB and PHP

First, install the Apache web server and MariaDB database server using the following command:

				
					dnf install httpd mariadb-server -y
				
			

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:

				
					dnf install epel-release
dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
				
			

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:

				
					dnf module reset php
dnf module enable php:remi-8.0
				
			

Next, install PHP 8.0 with all required PHP extensions by running the following command:

				
					dnf install php php-common php-fpm php-cgi php-bcmath php-gd php-imap php-intl php-apcu php-cli php-mbstring php-curl php-mysql php-xml unzip -y
				
			

After installing all the packages, verify the PHP version using the following command:

				
					php -v
				
			

You will get the following output:

				
					PHP 8.0.16 (cli) (built: Feb 15 2022 21:34:32) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies
				
			

Next, start the Apache and MariaDB service and enable them to start at system reboot with the following command:

				
					systemctl start httpd mariadb
systemctl enable httpd mariadb
				
			

Create a MariaDB Database

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.

Download osTicket

First, go to the osTicket official website, pick the latest version and download it with the following command:

				
					wget https://github.com/osTicket/osTicket/releases/download/v1.16.1/osTicket-v1.16.1.zip
				
			

Once the osTicket is downloaded, create a directory for osTicket and extract the downloaded osTicket inside it.

				
					mkdir /var/www/html/osticket
unzip osTicket-v1.16.1.zip -d /var/www/html/osticket
				
			

Next, set proper permission and ownership on the osTicket directory with the following command:

				
					chown -R apache:apache /var/www/html/osticket
chmod -R 755 /var/www/html/osticket
				
			

Rename the osTicket sample configuration file:

				
					mv /var/www/html/osticket/upload/include/ost-sampleconfig.php /var/www/html/osticket/upload/include/ost-config.php 
				
			

Once you are finished, you can proceed to configure the Apache webserver.

Configure Apache for 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:

				
					<VirtualHost *:80>
     ServerAdmin admin@exampledomain.com
     DocumentRoot /var/www/html/osticket/upload
     ServerName osticket.exampledomain.com
     <Directory /var/www/html/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>

				
			

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:

				
					firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
				
			

Next, reload the firewalld daemon to apply the changes:

				
					firewall-cmd --reload
				
			

After configuring the firewall, you can proceed to access the osTicket web interface.

Launch osTicket Web Installation Wizard

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 Save changes 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:

				
					rm -rf /var/www/html/osticket/upload/setup/
				
			

Great you have done it!

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.

Avatar for Hitesh Jethva
Hitesh Jethva

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.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x