billysoftacademy.com

A guide on setting up osTicket on Linux Ubuntu using the LOMP stack

Introduction

osTicket is a free open-source ticketing system lets you organize support requests, track progress, and improve overall efficiency. osTicket works with MySQL or PostgreSQL databases and offers features like:

1. Ticket Filters: Keep things organized by categorizing requests.
2. Service Level Agreements (SLAs): Set expectations and ensure timely resolutions.
3. Queues: Assign tickets to specific teams for faster handling.
4. Advanced Search: Find past interactions with ease.

This guide will walk you through installing osTicket on Ubuntu 22.04 using the LOMP stack (Linux, OpenLiteSpeed, MySQL, and PHP).

Requirements

The following is a list of items needed to complete the installation successfully:
1) A desktop or laptop with 4 GB RAM, a dual core processor and atleast 50GB of free disk space
2) Linux Ubuntu 22.04 LTS or any newer version
3) Cloud deployment: A fully qualified domain name and a public static IP address
4) An SSH client such as Putty or the Terminal app for macOS
5) A stable internet connection.

Overview

The following is an overview of the steps covered in this guide:
1) Open an SSH connection to the Linux Ubuntu server and create the osTicket installation script
2) Set execute permission and run the script
3) Login to the OpenLiteSpeed WebAdmin console and setup the virtualhost
4) Access the osTicket web installer and complete the installation
5) Conclusion and next steps

Step 1: Open an SSH connection to the Linux Ubuntu server and create the osTicket installation script

If you are using a Mac, open the terminal app and run the following command to open an SSH connection to your Linux Ubuntu Server:

ssh username@ip-address-of-server

Enter the password for the server and hit enter to confirm the login. If the password was correct you will see a prompt that reads username@server-hostname. If you are using an Windows based device you can connect to your linux ubuntu server using the PuTTy SSH client. Follow these steps to open the SSH connection:

1) Download and install Putty from the official download page.
2) Open PuTTy and enter the Linux Ubuntu IP address on the hostname (or IP address) field.
3) Set the SSH port to 22 or your custom SSH port number.
4) Set Connection Type to SSH and click the open button to start an SSH session. Enter the server username and password on the prompts to login.

NB: The above instructions assume your ubuntu server accepts password based SSH authentication. For other authentication methods you can refer to your server provider’s documentation or seek help from your IT support.

Create the osTicket script

Run the following command to create a file named osticket.sh:

sudo nano osticket.sh

Click HERE to download a zip file containing the osticket bash commands. Extract the file and open the .sh or .txt file. Copy the contents of the file and paste them into the osticket.sh file on your Linux Ubuntu Server. Press CTRL + O, hit the Enter key to confirm and press CTRL + X to exit the file.

Step 2: Set execute permission and run the script.

The next step is setting execute permission and running the osticket.sh script. Run the following command to set the execute permission:
sudo chmod +x osticket.sh
Proceed to run the following command to start the installation script:
./osticket.sh
During the installation, the script will request you to provide responses to questions asked by the MariaDB mysql_secure_installation script. The following are questions and responses that you may provide:
Enter current password for root (enter for none): PRESS ENTER
Switch to unix_socket authentication [Y/n]: n
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] Y
Disallow root login remotely [Y/n] Y
Remove test database and access to it? [Y/n]
Reload privilege tables now?[Y/n] Y
Enter the osTicket database name, database username and database password. Set the OpenLiteSpeed Web Server admin username and password. Set the domain name pointing to the Linux Ubuntu Server on the “Enter your domain name” prompt and press Enter. A prompt with OpenLiteSpeed Configuration instructions will be displayed.

Step 3: Login to the OpenLiteSpeed Webdmin console and setup the virtualhost

Open a new browser window and navigate to https://example.com:7080. Enter the OpenLiteSpeed admin username and password and click the Login button. Click VirtualHosts and delete the example virtualhost. Click Add and set the Virtual Host Name to example.com. Set the Virtual Host Root to:

/usr/local/lsws/example.com/html/osTicket/

Remember to replace example.com with your domain name. Set Config File to:

$SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf

Set Enable Scripts / ExtApps to Yes and Restrained to No and click Save. You may see the error message:

file /user/local/lsws/conf/vhosts/example.com/vhconf.conf does not exist

Click the CLICK TO CREATE link to create the missing file and click the Save button. Click the View button on the newly created virtualhost and click the General tab. Click Edit on the general section and set the Document Root and Domain Name. You can copy the Document Root path from the command line. Save the changes and click Edit on the Index Files section. Set Index Files to

index.html, index.php

and set Auto Index to No. Click Save and click the Rewrite tab. Set Enable Rewrite to Yes and set Auto Load from .htaccess to Yes. Click Save and click the OpenLiteSpeed reload web server icon.

On the left menu list, click Listener and click Edit on the default listener. Set Port to 80 and click Save. Click Add on Virtual Host Mappings and select the osticket virtual host. Set Domains to an asterisk and click Save.

On the left menu list, click Server Configuration and click the External App tab. Click Edit on LiteSpeed SAPI App and set Name to lsphp81. Set Address to:

uds://tmp/lshttpd/lsphp81.sock
Adjust the Command parameter to:
lsphp81/bin/lsphp
Click the Save icon to save the changes and click the icon to restart OpenLiteSpeed.

Step 4: Access the osTicket web installer and complete the installation.

The next step is accessing the osTicket web installer and completing the installaton. To do this, open a new browser window and navigate to the domain name pointing to the osTicket Ubuntu Server. Upon accessing the domain your browser will automatically redirect to example.com/setup/install.php. Verify you see green check marks on all listed prerequisites and click Next.

On the system settings section, set the helpdesk URL, helpdesk name and default email address. On the Admin user section, set the first name, last name, email address, username and password. On the database settings section set the MySQL database name, username, password and click the Install Now button

When the installation completes, you will see a Congratulations page with details about how to access the osTicket staff control panel, frontend, forums and documentation. Click the Staff Control Panel link and login using the admin credentials that you created on the osTicket web installer. Upon successfully login you may be the message:

Please take a minute to delete setup directory (../setup/) for security reasons
To delete the setup directory, open the SSH client connected to your ubuntu server and navigate to the directory: /usr/local/lsws/example.com/html/osTicket/upload. Run the following command to remove the directory:
sudo rm -rf setup/
Return to the osTicket staff control panel and refresh the page. The delete setup directory warning message will disappear automatically.

Conclusion and next steps

This guide successfully walked you through installing osTicket, a free open-source ticketing system, on Ubuntu 22.04 using the LOMP stack. You now have a functional system for organizing support requests, tracking progress, and improving overall efficiency.

Here are some next steps to consider:

1. Familiarize yourself with the osTicket interface: Explore the staff control panel and user interface to understand how to manage tickets, create queues, and configure settings.
2. Customize osTicket: osTicket offers various plugins and themes for customization. Explore available options to tailor the system to your specific needs.
3. Security: Regularly update osTicket and the underlying software (LOMP stack) to address security vulnerabilities. Consider implementing additional security measures like two-factor authentication for added protection.

By following these steps, you can leverage osTicket to streamline your support operations and enhance customer satisfaction. We hope that this tutorial has been informative and we’d like to thank you for reading it.

Scroll to Top