install OSTicket on Ubuntu 20.04 - lmkelly/Autoguard GitHub Wiki
Update packages
sudo apt-get update
sudo apt-get upgrade
Install DB
sudo apt install mariadb-server
sudo mysql_secure_installation
Change authentication plugin
sudo mysql -u root
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
FLUSH PRIVILEGES;
Create OSTicket DB
CREATE DATABASE osTicket;
GRANT ALL PRIVILEGES ON osticket_db.* TO osticket_user@localhost
IDENTIFIED BY "password_here";
FLUSH PRIVILEGES;
Installing apache
sudo apt install apache2
sudo systemctl start apache2
sudo systemctl enable apache2
Installing PHP
sudo apt-get install php php-{fpm,pear,imap,apcu,intl,cgi,common,mbstring,net-socket,gd,xml-util,mysql,bcmath}
Downloading/configuring osTicket
- Download latest version of osTicket and scp to the server, extract and put into /var/www
unzip osTicket-v*.zip -d osTicket
sudo mv osTicket /var/www/
cd /var/www/osTicket/upload/include
sudo cp ost-sampleconfig.php ost-config.php
sudo chown -R www-data:www-data /var/www/
Configure virtual host
sudo nano /etc/apache2/sites-available/osticket.conf
- Paste the following
<VirtualHost *:80>
ServerAdmin admin@localhost
ServerName osTicket
ServerAlias osTicket
DocumentRoot /var/www/osTicket/upload
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo a2ensite osticket.conf
sudo a2dissite 000-default.conf
sudo systemctl restart apache2
Navigate to your IP and be greeted by osticket
Note: Use sudo a2ensite osticket.conf every time you restart