Most companies, especially those that deploy in-house built software, depend upon a ticketing system. These systems allow users to report problems with software or hardware, and make it easier for developers and technicians to stay on top of issues. Some of these systems can be very complex, both to install and use. Fortunately, we have Linux and a slew of ticketing server software to choose from. One such choice is osTicket. This open source, free solution easily rivals those costing hundreds of dollars more.
I want to walk you through the process of installing osTicket on a fresh install of Ubuntu Server 16.04. Once installed, you can begin the process of customizing osTicket to meet and exceed your needs.
What you'll need
All you will need is a working Ubuntu Server 16.04 platform. Either have this installed on dedicated hardware or a virtual machine with plenty of resources. Either way, osTicket will need access to port 80. That's it. Let's install.
Update and upgrade
The first thing we're going to do is update and upgrade Ubuntu. On the off-chance this process updates the kernel, the server will need a reboot. To run the update/upgrade, open a terminal and issue the following commands:
sudo apt update sudo apt upgrade
Next we're going to install NGINX and MySQL. From your terminal window, issue the following command:
sudo apt-get install -y nginx mysql-server
During the above installation, you will be prompted to create a password for the MySQL root user. Once you've done that, restart both services with the following commands:
sudo systemctl restart nginx sudo systemctl restart mysql
Next enable both services with the commands:
sudo systemctl enable nginx sudo systemctl enable mysql
For our next trick, we'll install the necessary PHP extensions. This can be done with the single command:
sudo apt-get install -y php7.0-cli php7.0-mysql php7.0-cgi php7.0-fpm php7.0-gd php7.0-imap php7.0-xml php7.0-mbstring php7.0-intl php-apcu
PHP must also be configured. Change into the php directory, with the command cd /etc/php/7.0/fpm and open the php.ini file for editing with the command sudo nano php.ini. Around line 760, you'll see the entry:
Remove the # character and change the 1 to a 0. Save and close the file. Restart and enable php7-fpm with the commands:
systemctl restart php7.0-fpm systemctl enable php7.0-fpm
Now it's time to configure NGINX. Change into the sites-available directory with the command cd /etc/nginx/sites-available. Open the default file with the command sudo nano default. Locate the PHP 7 configuration section and make sure to uncomment it (remove the necessary # characters) like so:
Where DOMAIN_OR_IP is either the domain name or the IP address of your osTicket server.
Save and close that file. Enable the virtual host by adding a link to sites-enabled with the command:
sudo ln -s /etc/nginx/sites-available/osticket /etc/nginx/sites-enabled/
Restart NGINX with the command:
sudo systemctl restart nginx
Now it's time to download and configure osTicket. Change into the document root with the command cd /var/www. Create a new directory with the command sudo mkdir -p osticket. Change into that newly created directory with the command cd osticket. Download osTicket with the command:
sudo wget http://osticket.com/sites/default/files/download/osTicket-v1.10.1.zip
NOTE: You might want to check the osTicket download to see if it has been upgraded since this writing. Go to the osTicket download page to find out. If there's a newer release than 1.10.1, make sure the wget command reflects that. Unzip the downloaded file with the command:
sudo unzip osTicket-v1.10.1.zip
If you receive an error that unzip isn't installed, resolve that with the command sudo apt install unzip.
Change into the newly created upload directory and issue the command:
sudo cp include/ost-sampleconfig.php include/ost-config.php
Change the permissions of the upload directory with the command:
sudo chown -R www-data:www-data upload/
Open up a browser and point it to http://SERVER_IP (Where SERVER_IP is the IP address of your osTicket server). You should automatically be redirected to http://SERVER_IP/setup. If you're not redirected, point your browser to http://SERVER_IP/setup. You will find yourself on the installation checklist. Everything should be green (Figure A), so you can click Continue.
In the next screen (Figure B), you must configure all the necessary options. One thing of note, you cannot use the same email address for the Default email and the Admin user. If you do, the installation will error out and you'll have to re-configure this section.
Make sure to scroll down and configure the database settings (Figure C).
Click the Install Now button and the installation will complete. Once it finishes, go back to the terminal window, change into the upload directory with the command cd /var/www/osticket/upload and rename the setup directory with the command sudo mv setup setup-bak. Change the permission of the ost-config.php file with the command
sudo chmod 0644 include/ost-config.php
It's all yours
That's it. You should be able to point your web browser to http://SERVER_IP and start using osTicket. This osTicket installation is now all yours to configure and make available to all necessary parties. Congratulations.
- How to share a folder from a Linux data center with this easy Samba GUI (TechRepublic)
- How to install Rancher Docker Container Manager on Ubuntu (TechRepublic)
- How to create aliases on your data center Linux servers (TechRepublic)
- How to deploy NGINX on a Kubernetes cluster (TechRepublic)
- How safe is your air-gapped PC? Attackers can now suck data out via power lines (ZDNet)
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.