osticket-logoFree open source ticketing system on Linux

I needed a simple ticketing system with email fetching/sending support.  osTicket looked like the right solution.  I ran into a few problems and had some issues working through them, so I thought I’d do a quick writeup for those that are trying to accomplish the same thing.

This was a fresh installation of Centos 7 and a quick google gave me a nice walk through to follow, which you can see here.

$ yum update
$ yum install wget
$ yum install httpd -y
$ chkconfig --levels 235 httpd on
$ systemctl start httpd.service

Then I checked my ip with

$ ip addr

Checked to see if I could get to the default adobe page, I couldn’t.  I figured it was either the firewall or selinux (or both), I’m not concerned about security with this installation (at least not right now), so I disabled both. (check comments for rules if you want to leave the firewall and selinux in place)

$ cd /etc/sysconfig/
$ vi selinux

Change SELINUX=enabled to SELINUX= disabled. Save the file

$ systemctl disable firewalld
$ systemctl stop firewalld
$ systemctl status firewalld

Then reboot the machine.

$ reboot now

Next is getting some of the other requirement into place.

$ yum install php php-{cli,common,gd,mysql,imap,mbstring,xml}

Ran into an issue here, php-imap, php-mbstring, and php-xml didn’t install. The fix ended up being that I needed to add the epel repo.

$ yum install epel-release
$ yum install php php-{imap, mbstring, xml}
$ systemctl restart httpd.service

Test your php install by creating the info.php in your apache root directory /var/www/html/

$ echo -e "" > /var/www/html/info.php

I had to tweak mine to get it to work correctly, a few things were out of place.  You can verify the file looks like the following:


Verify its working by going to http://youripaddress/info.php.

Next is to install MySQL, which is now actually MariaDB (new in CentOS 7)

$ yum install mariadb-server mariadb
$ chkconfig --levels 235 mysqld on
$ systemctl start mariadb.service
$ systemctl enable mariadb.service

Need to run through the secure installation for MySQL (MariaDB)

$ mysql_secure_installation
Set root password? [Y/n] Y
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

Create a directory, grab osticket, and unzip the file. I had issues here also, whenever I tried to download the file from the site it wouldn’t give me the full file and it would always think the file was a http file instead of a zip file, making it so the unzip command wouldn’t work. I ended up downloading it onto a usb, mounting the usb and then pulling the file that way. I’m going to assume you aren’t going to have the same issues as I did.

$ mkdir -p /opt/osticket
$ wget http://osticket.com/sites/default/files/download/osTicket-v1.9.2.zip -P /tmp
$ unzip -d /opt/osticket /tmp/osTicket-v1.9.2.zip

Create the symbolic link

$ ln -s /opt/osticket/upload /var/www/html/support

Next is to create the osticket database

$ mysql -u root -p
mysql> create database support;
mysql> grant all on support.* to support@localhost identified by 'support';
mysql> quit

Last steps at the command line

$ cd /var/www/html/support 
$ cp include/ost-sampleconfig.php include/ost-config.php
$ chown apache: -R /var/www/html/support /opt/osticket

Then just need to run the web installer to finish up.



Good Luck!

  1. You need to run these commands if you leave SELinux and firewalld enabled:
    sudo chcon -R -t httpd_sys_content_t /opt/osticket/upload
    sudo chcon -R -t httpd_sys_rw_content_t /opt/osticket/upload
    sudo chcon -R -t httpd_sys_content_t /var/www/html/support
    sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/support
    sudo firewall-cmd –permanent –zone=public –add-service=http
    sudo firewall-cmd –reload

  2. I got stuck at “osTicket installer requires ability to write to the configuration file include/ost-config.php.”, and “chmod 0666 include/ost-config.php” does not solve.

Leave a reply

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