Installing osTicket on a Debian 10 Linux server
In this manual we will show you how to install osTicket on your server.
info A completely empty Debian 10 server (without SWPanel) has been used for the manual. Most of the installation will be done through the console.
Requirements
To be able to install the osTicket software you need to fulfill a series of prerequisites:
- An up-to-date server (in our case a Debian 10).
- A LAMP environment (Linux, Apache, MariaDB/MySQL and PHP)
- A user with sudo permissions (we will use the
root
user)
-
Internet access (to download the software)
Preparation of the server
We execute the following commands from the terminal with the root
user:
- Update the system
sudo apt update && sudo apt -y upgrade
- Install the unzip program
sudo apt install -y unzip
- Install Apache
sudo apt install apache2 apache2-utils
- Enable the automatic start of Apache on reboot our system
systemctl enable apache2
- We configure
www-data
(apache user) as owner of the web root
chown www-data:www-data /var/www/ -R
- Install MariaDB
sudo apt install mariadb-server mariadb-client
- Enable the automatic start of MariaDB when rebooting our system
systemctl enable mariadb
- Install PHP 7.3
apt install php7.3 libapache2-mod-php7.3 php7.3-mysql php-common php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline
- We enable the Apache php 7.3 module
a2enmod php7.3
- Restart the web server
systemctl restart apache2
Software installation
Execute the following commands from the terminal with the root
user:
- Download the program from the development site.
wget -q https://github.com/osTicket/osTicket/releases/download/v1.15.2/osTicket-v1.15.2.zip
- Unzip the downloaded file
unzip -q osTicket-v1.15.2.zip
- Move the folder containing the application to the root directory
mv upload/ /var/www/osticket
- We delete the scripts folder (we are not going to use it)
rm -r scripts
- Delete the zip file (we don't need it anymore)
rm -r osTicket-v1.15.2.zip
- We will create the initial osTicket configuration file
cp /var/www/osticket/include/ost-sampleconfig.php /var/www/osticket/include/ost-config.php
- We give write permission to the application configuration file
chown www-data: /var/www/osticket/include/ost-config.php
Database
We are going to create the database to work correctly with the application
- We connect to the database with the
root
user and its password
mysql -u root -p
(we will enter the root
user password and press enter
)
- We will create the database with the name "osticket"
create database osticket charset utf8mb4 collate utf8mb4_unicode_ci;
- We will create the user and password of the Database (Replace the X's by the desired password)
create user osticket@localhost identified by 'XXXXXXXX';
- We will give the necessary permissions to the user on the Database
grant all privileges on osticket.* to osticket@localhost;
- Close the connection to the database
exit
Web server
Let's configure the web server to work correctly with the application.
- We create a configuration for the osticket web service
nano /etc/apache2/sites-available/osticket.conf
- The content of the file will be:
Alias /osticket /var/www/osticket
-
Close the file saving the changes by pressing Ctrl+X
and pressing y+enter
.
-
Activate the new configuration
a2ensite osticket.conf
- Reload the web server configuration
systemctl reload apache2
PHP
We install the necessary extensions for the application to work correctly.
- For version 7.3 (the one recommended by the application)
apt install -y php7.3-apcu php7.3-gd php7.3-imap php7.3-intl php7.3-mbstring php7.3-xml
- Restart the web server for the changes to take effect
systemctl reload apache2
Web installation
The last phase of the installation is to configure the application through a web browser where it will allow us to create the administrator user and will ask us for the database data.
To access this configuration, open a web browser and search for http://dominio/osticket or http://nombre-de-la-maquina/osticket.
The first page will show us a series of checks, if we have followed the manual, we will have them all correct and we will click on Continue
.
In the next page it will let us create the administrator user, its password and it will ask us for the database connection data. Once entered we will click on Install Now
. Required data:
System Settings
-
Helpdesk Name (We put the name of our company)
-
Default Email (We put an email of our company)
Admin User
-
First Name (Enter the administrator user's first name)
-
Last Name (Enter the last name of the admin user)
-
Email Address (Enter the administrator user's email address)
-
Username (Does not exist, we create it now)
-
Password (Does not exist, we create it now)
-
Retype Password (Re-enter the password)
Database Settings
-
MySQL Table Prefix (we leave it as it is)
-
MySQL Hostname (we leave it as it is)
-
MySQL Database (database name --> osticket)
-
MySQL Username (database user -->osticket)
-
MySQL Password (the database password we set -->XXXXXXXXXXXX)
The installation process will take a moment and will show us a last page where it will inform us of the successful result of the operation and will suggest us to give permission to the configuration file of the application.
- We will delete the web installer of the application
rm -rf /var/www/osticket/setup/
- Give permissions to the configuration file
chmod 0644 /var/www/osticket/include/ost-config.php
success That's it! We will be able to access our osTicket service using the URL: http://dominio/osticket
To access the backend we will do it through the same URL but adding "/scp" at the end (http://dominio/osticket/scp).
Modify the language (optional)
To be able to modify the language of the application we have to download the file of the language we are interested in from the official page of the application, pass the file by FTP and unzip it in the correct location. As the server we are using is an empty Debian 10, the first thing to do is to create a user and install the FTP service.
- We create a user in the system for FTP
adduser testftp
- Enter the password and press
enter
.
- Repeat the password and press
enter
.
- Make
5 enter
, press y + enter
.
-
vsftp installation from the Debian 10 repositories
sudo apt -y install vsftpd
- Configure the FTP service by modifying its configuration file
nano /etc/vsftpd.conf
- Modify:
...
write_enable=YES
...
ssl_enable=YES
...
-
Close the file with Ctrl + x
and save it with y + enter
.
-
Restart the service for the modifications to take effect.
systemctl reload vsftpd
-
Download the language pack from the official [osTicket] web site (https://osticket.com/download/) by clicking on Language pack
, selecting the language (Spanish - Español) and clicking on Download
.
-
FTP the language pack to the server with an FTP client such as Filezilla.
-
Unzip the package to the correct directory
unzip /home/testftp/osTicket-lang.zip -d /var/www/osticket/include/i18n/
-
Enter the backend with the URL http://domain/osticket/scp
-
Use the administrator user credentials to log in.
-
Click on the settings
tab.
-
We look for the option Primary Language
and select "spanish (Spain) ".
-
Go down to the bottom of the page and click on Save Changes
.
info Done! If we change tabs or exit, the language is already modified.