Today we're setting up a popular support ticketing system, osTicket on a fresh install of CentOS 7.1 inside of DigitalOcean.

osTicket is a lightweight, open source support ticketing system that's designed to be easy to setup and get going, however I had some difficulties locating a guide especially for CentOS that I liked. So here's my stab at throwing one together.

some assumptions

We're going to assume that you've already set up an account with DigitalOcean, created your CentOS 7.1 x64 - $5 per month droplet, and that you have some n00b-level experience using SSH (Mac OS X with Terminal or Windows with PuTTY), VIM, and Git.

We're going to also assume that you've read these DigitalOcean community guides on Initial Server Setup with Centos 7
and How to Install Linux, Apache, Mysql, PHP or LAMP Stack on CentOS 7. These guides are a requirement for getting osTicket up and running.

All that being said, let's get into it.

the first steps

Once you're done completing those setup guides above, we're ready to get started with installing osTicket. SSH into your DigitalOcean instance and run the following commands:

[dsheets@osticket-tutorial ~]$ sudo yum -y install git
[dsheets@osticket-tutorial ~]$ git clone
[dsheets@osticket-tutorial ~]$ ls
[dsheets@osticket-tutorial ~]$ sudo su
[root@osticket-tutorial dsheets]# cp -R osTicket-1.8/* /var/www/html/
[root@osticket-tutorial dsheets]# cd /var/www/html/
[root@osticket-tutorial html]#

Okay, so what did we just do? Lets look at it from top to bottom:

  • installed git (a fancy code management tool for developers that we won't get into today) using yum
  • copied the osTicket files from the developer's GitHub page to our local working directory
  • verified that the osTicket-1.8 folder has been successfully cloned into our current working directory with ls
  • gained superuser/root privileges with sudo su
  • copied all the contents of the osTicket-1.8 folder into /var/www/html/, which is the home base of our webserver's content
  • changed to the /var/www/html/ directory with cd

You should now be able to head to your web server's IP address or hostname in a browser and see this:

We're live! Well... sorta. This page is telling us that while our web server is indeed up and running, we are missing a few packages that are needed to move on with the installation.

the optional packages

To get the full feature-set of osTicket, we need to do some extra setup:

[root@osticket-tutorial html]# yum -y install php-xml php-gd php-mbstring php-imap

Take a minute to stretch while yum handles installing these packages. Is your coffee cup empty? Go fill that baby up.

Once our yum install is finished:

[root@osticket-tutorial html]# systemctl restart httpd

Now, if you reload your webpage you should see a gaggle of green check marks:

Now we can click Continue at the bottom of the page to finish the osTicket setup process. Right?

Close! Move back to your shell and enter these commands:

[root@osticket-tutorial ~]# cd /var/www/html/
[root@osticket-tutorial html]# cp include/ost-sampleconfig.php include/ost-config.php
[root@osticket-tutorial html]# chmod 0666 include/ost-config.php

This follows the instructions that osTicket gave us for copying ost-config.php to its rightful destination, and gives Apache permission to use it with chmod

Now we can finish the setup process.

the database

Again, we're making an assumption that you followed the guide How to Install Linux, Apache, Mysql, PHP or LAMP Stack on CentOS 7 before beginning this tutorial. If you did, you will have installed MariaDB and finished the mysql_secure_installation command. For osTicket, we're going to want to set up a database user for application, as well as give it access rights to an osTicket specific database.

[root@osticket-tutorial ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 5.5.44-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>

Instead of osticket and password, be sure to use something a bit more secure for your new database user. Important note, those trailing semicolons (;) at the end of these commands are required for MySQL to process your inputs. Moving on:

MariaDB [(none)]> CREATE DATABASE osticket;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON osticket.* TO 'osticket'@'localhost';
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>

Alright, where are we?

  • added the user osticket with the password password (yours should be different)
  • created the database osticket on localhost, meaning our current machine
  • gave the user osticket full access to the osticket database
  • Told MySQL to reload who it thinks owns what with FLUSH PRIVILEGES

Now that we're done here, lets close MySQL and return to our webpage in a browser to complete the osTicket setup.

MariaDB [(none)]> quit;
[root@osticket-tutorial ~]#

After clicking Install Now:

We'll need to run chmod again, as suggested by the installer:

[root@osticket-tutorial ~]# cd /var/www/html
[root@osticket-tutorial html]# chmod 0644 include/ost-config.php
[root@osticket-tutorial html]# systemctl restart httpd
[rooot]@osticket-tutorial html]#

Now you're all set to use osTicket! Access your administrator panel from http://your-ip-here/scp

For help with post-install setup and configuration, visit the osTicket wiki or their community forum