Lundebakkevej 5, 4684 Holmegaard

Basic install of osTicket on Ubuntu 20.04LTS

Install basic ubuntu 20.04 desktop edition

make sure all packages are up 2 date

apt-get install net-tools openssh-server
apt-get update
apt-get upgrade

Make sure your server has a fixed IP and that it’s registered in DNS
192.168.112.59 / osticket.skau.dk

Getting database ready

apt-get install mariadb-common mariadb-server
systemctl enable mariadb
systemctl start mariadb

You should secure it with: mysql_secure_installation

now create database and user – I’ll use:
dbname: osticket
username: osticketusr
passwd: osticketpasswd

mysql -u root -p    (password is only set if you secured your database)
CREATE DATABASE osticket;
GRANT ALL ON osticket.* TO 'osticketusr'@'localhost' IDENTIFIED BY 'osticketpasswd';
FLUSH PRIVILEGES;
exit

Getting PHP ready (this will also install apache2 as it’s a prereq to php)

apt-get install php php-gd php-imap php-xml php-json php-mbstring php-intl php-apcu php-mysql php-zip

Setting up apache2

As my server is standalone and purely dedicated to osticket, I do not need to setup a virtualhost – but if you desire a different location to your files and a virtualhost you can (put a sample osticket.conf at the end that you would modify and place in /etc/apache2/conf.d)
No further setup is needed as long as I place my files in /var/www/html with the correct permissions

Getting osticket files in place – I am downloading to a tmp location and moving files in, then I correct permissions

cd /root/files
wget https://github.com/osTicket/osTicket/releases/download/v1.14.2/osTicket-v1.14.2.zip
unzip osTicket-v1.14.2.zip
cd upload
rm -rf /var/www/html/*
cp -r * /var/www/html
cd /var/www/html
chown -R www-data:www-data *
cp -p include/ost-sampleconfig.php include/ost-config.php
chmod 666 include/ost-config.php

Complete osTicket install wizard

http://192.168.112.59/scp
in the config screen fill in all details – the tricky one is your database details – use the ones you used when setting up the database earlier (MySql hostname is simply localhost)

dbname: osticket
username: osticketusr
passwd: osticketpasswd

Click install now

After complete installation go back to the server and set permissions on config file for security and remove setup

cd /var/www/html/include
chmod 644 ost-config.php
cd /var/www/html
rm -rf setup

The initial installation is now complete and you have the following URLs to work with
osticket url (users): http://192.168.112.59/
osticket staff (helpdesk): http://192.168.112.59/scp

Optional – if you want it in virtual host, then here’s a sample config

<VirtualHost *:80>
ServerAdmin webmaster@techsupportpk.com
DocumentRoot "/var/www/osTicket/upload"
ServerName labserver.techsupportpk.com
ErrorLog "/var/log/httpd/error_log"
CustomLog "/var/log/httpd/access_log" combined
<Directory "/var/www/osTicket/upload">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>