22A Hue Street, Hanoi, Vietnam 0904092014 info@binhminhitc.com

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.

root@techshare.vn [~]# yum update
root@techshare.vn [~]# yum install wget
root@techshare.vn [~]# yum install httpd -y
root@techshare.vn [~]# chkconfig --levels 235 httpd on
root@techshare.vn [~]# systemctl start httpd.service

Then I checked my ip with

root@techshare.vn [~]# 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.

root@techshare.vn [~]# cd /etc/sysconfig/
root@techshare.vn [~]# vi selinux

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

root@techshare.vn [~]# systemctl disable firewalld
root@techshare.vn [~]# systemctl stop firewalld
root@techshare.vn [~]# systemctl status firewalld

Then reboot the machine.

root@techshare.vn [~]# reboot now

Next is getting some of the other requirement into place.

root@techshare.vn [~]# 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.

root@techshare.vn [~]# yum install epel-release
root@techshare.vn [~]# yum install php php-{imap, mbstring, xml}
root@techshare.vn [~]# systemctl restart httpd.service

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

root@techshare.vn [~]# echo -e "<!--?php\n\tphpinfo();\n? -->" > /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:

phpinfo
<?php phpinfo(); ?>

Verify its working by going to http://techshare.vn/info.php.
Next is to install MySQL, which is now actually MariaDB (new in CentOS 7)

root@techshare.vn [~]# yum install mariadb-server mariadb
root@techshare.vn [~]# chkconfig --levels 235 mysqld on
root@techshare.vn [~]# systemctl start mariadb.service
root@techshare.vn [~]# systemctl enable mariadb.service

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

root@techshare.vn [~]# 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.

root@techshare.vn [~]# mkdir -p /opt/osticket
root@techshare.vn [~]# wget http://osticket.com/sites/default/files/download/osTicket-v1.9.2.zip -P /tmp
root@techshare.vn [~]# unzip -d /opt/osticket /tmp/osTicket-v1.9.2.zip

Create the symbolic link

root@techshare.vn [~]# ln -s /opt/osticket/upload /var/www/html/support

Next is to create the osticket database

root@techshare.vn [~]# 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

root@techshare.vn [~]# cd /var/www/html/support
root@techshare.vn [~]# cp include/ost-sampleconfig.php include/ost-config.php
root@techshare.vn [~]# chown apache: -R /var/www/html/support /opt/osticket

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

https://support.binhminhitc.com