How to Install osTicket on Ubuntu 16.04

r00t March 22, 2018

Install osTicket on Ubuntu 16.04

In this tutorial we’ll learn how to install osTicket on Ubuntu 16.04. We will also install and configure its prerequisites. OsTicket is a free and open source help desk software and assist ticketing system, similar (although not completely the same) to platforms like; Zendesk, Freshdesk, Groove and Ladesk. OsTicket allows you to manage, organize and record your support ticket request and contains support for LDAP and Active Directory authentication. It seamlessly routes inquiries created through email, web-forms and phone calls into an easy, easy-to-use, multi-user, web-based customer support platform.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install osTicket on Ubuntu 16.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing LAMP on Ubuntu 16.04.

You should check out this LAMP stack install tutorial for Ubuntu 16.04, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that OrangeScrum relies on:

apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-gd php7.0-mbstring php7.0-zip php7.0-dom php7.0-xml

Step 3. Installing osTicket.

First, download osTicket from the official web site. The latest stable release is 1.10.1 so you can download it with the following command:

mkdir /var/www/html/osticket
cd /var/www/html/osticket
wget http://osticket.com/sites/default/files/download/osTicket-v1.10.1.zip

Once the file is downloaded, you need to extract it, and for that you shall run the following command:

unzip osTicket-v1.10.1.zip

Next, copy the sample config file:

sudo cp upload/include/ost-sampleconfig.php upload/include/ost-config.php

Now just set the right permissions for the folders:

chown -R www-data:www-data /var/www/html/osticket

Step 4. Create a database for osTicket.

Next, we need to create a database for the osTicket installation:

mysql -uroot -p

Run the following command to create a database for osTicket:

MariaDB [(none)]> CREATE DATABASE osticketdb;
MariaDB [(none)]> CREATE USER 'osticketuser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL ON osticketdb.* TO 'osticketuser'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configure Apache web server for osTicket.

For this you can take the default config as a template:

cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/osticket.conf

Now edit the currently created Config as follows:

nano /etc/apache2/sites-available/osticket.conf

Modify the virtual host file for your osTicket site to resemble the example below:

<VirtualHost my-domain.tld:80>

ServerName my-domain.tld
ServerAlias www.my-domain.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/osticket/upload/

<Directory /var/www/html/osticket/upload/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error-osticket.log
CustomLog ${APACHE_LOG_DIR}/access-osticket.log combined
</VirtualHost>

Finally, reload the web server as suggested, for the changes to take effect:

systemctl restart apache2

Step 6. Accessing osTicket.

You can now complete the installation with the osTicket web interface. Open your web browser and navigate to http://yourdomain.com or http://{your-server-ip} to launch the installer.

Congratulation’s! You have successfully install and configured osTicket on your Ubuntu 16.04 LTS server. Thanks for using this tutorial for installing osTicket open source ticketing tool on Ubuntu 16.04 LTS (Xenial Xerus) system.

The Tags:

Leave a Comment

Comments are closed.