Introduction
OS ticket is a free and open-source ticketing system that allows organizations to manage customer support requests and inquiries from multiple channels such as email, web forms, and phone. It is written in PHP and uses MySQL as its backend database.
Prerequisites
You must following things to complete this tutorial.
- Ubuntu 22.04 LTS up and running.
- Root permission.
- Basic knowledge of linux commands.
- Internet connectivity .
In this post, We will show you how to install os ticket on ubuntu machine.
Step 1: Update System
We need to update the ubuntu’s repository and their packages by executing given command.
sudo apt-get update
sudo apt-get upgrade
Step 2: Installing Apache, PHP and MySQL
Setup LAMP server in order to use the Os ticket, Use the given command install required packages.
sudo apt-get install apache2 php mysql-server -y
Step 3: Installing PHP Modules
PHP modules required to proper work of OS ticket system, Use the following command for the same.
sudo apt-get install php-mysql php-xml php-mbstring php-gd php-imap -y
Step 4: Downloading OS Ticket
Download the latest version of OS ticket system from their official website: https://osticket.com/download/
wget https://github.com/osTicket/osTicket/archive/v1.15.5.zip
Step 5: Extracting Zip File
unzip v1.15.5.zip
Move the extracted folder to Apache’s default document root directory:
sudo mv osTicket-1.15.5 /var/www/html/osticket
Set the appropriate permissions:
sudo chown -R www-data:www-data /var/www/html/osticket/
sudo chmod -R 755 /var/www/html/osticket/
Step 6: Creating Database & User
Create a new MySQL database for OS ticket system:
mysql -u root -p
Execute the given command to create database, user and permission for Os ticket system.
CREATE DATABASE osticket;
GRANT ALL PRIVILEGES ON osticket.* TO 'osticketuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;
Note: Replace ‘osticketuser’ and ‘password’ with your desired username and password.
Step 7: Rename Config files
We need to rename the ost-sampleconfig.php
to ost-config.php
, Use the given command for the same.
cd /var/www/html/osticket/include/
sudo cp ost-sampleconfig.php ost-config.php
Edit the configuration file:
sudo nano ost-config.php
Update the following settings according to your MySQL database details:
define('DBNAME', 'osticket');
define('DBUSER', 'osticketuser');
define('DBPASS', 'password');
define('DBHOST', 'localhost');
Step 8: Restarting Apache Service
Now restart the apache2 service to get new changes, Execute the given command.
sudo systemctl restart apache2.service
Step 9: Accessing OS ticket
Access the OS ticket system using your web browser:
http://<server-ip-address>/osticket/setup/
Conclusion
We have successfully installed and setup the OS ticket system using the LAMP stack on Ubuntu. If you have any questions or issues, please leave a comment below.