OsTicket is a free and open source ticketing tool written in PHP. It is a simple and lightweight tool that allows you to manage, organize and archive your support request.
In this tutorial, you will learn how to install and configure osTicket on Ubuntu 16.04.
Before starting, it is recommended to update the system with the latest stable version. Login with sudo user and run the following commands to update the system.
sudo apt-get update -y sudo apt-get upgrade -y
First, you will need to install Nginx, Mysql, PHP, PHP-FPM and other required PHP modules on your system. You can install all of them with the following command:
sudo apt-get install -y nginx mysql-server 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 -y
Once the installation is complete, start the Nginx and MySQL service and add them to start at boot time:
sudo systemctl start nginx sudo systemctl start mysql sudo systemctl enable nginx sudo systemctl enable mysql
Next, you will need to modify the
sudo nano /etc/php/7.0/fpm/php.ini
Uncomment the following line and change its value to 0:
Save and close the file, then restart the
php7-fpm service and add it to start at boot time:
sudo systemctl restart php7.0-fpm sudo systemctl enable php7.0-fpm
By default, MySQL is not secured. You can secure it by running the
Answer all of the questions as shown below:
Set root password? [Y/n] Y New password: Re-enter new password: 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
When all is done, connect with MySQL shell with the following command:
mysql -u root -p
Enter your password, then create a new database and user for osTicket:
mysql> create database osticketdb; mysql> create user osticket@localhost identified by 'password'; mysql> grant all privileges on osticketdb.* to osticket@localhost identified by 'password'; mysql> flush privileges; mysql> exit;
First, you will need to create a directory for osTicket:
sudo mkdir /var/www/html/osticket
Next, change the directory to osTicket and download osTicket with the following commands:
cd /var/www/html/osticket wget http://osticket.com/sites/default/files/download/osTicket-v1.10.zip
Note: Be sure to get the latest version from osTicket's download page here.
Once the download is completed, extract the downloaded file.
sudo unzip osTicket-v1.10.zip
Next, copy the sample config file:
sudo cp upload/include/ost-sampleconfig.php upload/include/ost-config.php
Change the owner of all
osticket files and directories to the 'www-data' user and group.
sudo chown -R www-data:www-data /var/www/html/osticket
You will need to create a new virtual host configuration for osTicket:
sudo nano /etc/nginx/sites-available/osticket
Add the following lines:
Save and close the file, then activate the virtual host with the following command:
sudo ln -s /etc/nginx/sites-available/osticket /etc/nginx/sites-enabled/
Finally, restart the Nginx service:
sudo systemctl restart nginx
Once everything is configured, it's time to access osTicket web installation wizard.
Open your web browser and type the URL
http://your-domain.com, you can see the osTicket installation wizard. Follow each instruction carefully and complete the installation.
Once the installation has completed, remove the setup directory and change the permission of the osTicket config file:
sudo rm -rf /var/www/html/osticket/upload/setup sudo chmod 0644 /var/www/html/osticket/include/ost-config.php
Congratulations! You have successfully installed osTicket on your Ubuntu 16.04 server.