Table of Contents
This tip is about the how to Run osTicket on Debian 11 Bullseye. So read this free guide, How to Run osTicket on Debian 11 Bullseye step by step. If you have query related to same article you may contact us.
How to Run osTicket on Debian 11 Bullseye – Guide
In that guide, let’s show you how to install osTicket on your server. A completely empty Debian 10 server (no SW panel) was used for manual recognition. Most of the installation will be done through the control.
Introduction
osTicket is a widely used and trusted open source support ticketing system. It is open source and actively developed on GitHub with 22,300 stars at the time of writing. It is built in PHP and requires a MySQL database, which will be configured in this guide. An HTTPS certificate will also be defined. up also for added security.
requirements
Install packages
The following components are required for this setup:
Install packages with APT.
$ sudo apt install -y ufw nginx python3-certbot python3-certbot-nginx php-fpm php-mysql mariadb-server unzip php-gd php-imap php-xml php-mbstring php-intl php-apcu
Configure Firewall
Now configure the UFW to allow SSH (port 22) and HTTP / HTTPS (ports 80, 443). This will allow remote login to the server and for Certbot to verify the domain and issue HTTPS certificates.
$ sudo ufw allow 22 / tcp $ sudo ufw allow 80 / tcp $ sudo ufw allow 443 / tcp
Enable UFW. Answer y and press Enter when prompted to continue.
$ sudo ufw enable
Get an HTTPS certificate
Obtain an HTTPS certificate from Certbot, telling it to use Nginx to serve the verification files.
$ sudo certbot certonly –nginx –agree-tos –no-eff-email -m admin@example.com -d osticket.example.com
Automate HTTPS certificate renewal
In order for Certbot to automatically renew the HTTPS certificate and prevent it from expiring, it is necessary to add a job to the system’s Crontab. Open Crotab for editing.
$ sudo EDITOR = nano crontab -e
At the final from the file, insert the following line:
0 0 * * * certbot renewal
Save by pressing Ctrl + S and exit by pressing Ctrl + X.
download osTicket
Make a directory for the osTicket code and go to it.
$ sudo mkdir -p / var / www / osticket
$ cd / var / www / osticket
Download the osTicket code. At the time of writing, 1.15.3.1 is the latest version of osTicket, but it can be replaced with another version if necessary.
$ sudo wget https://github.com/osTicket/osTicket/releases/download/v1.15.3.1/osTicket-v1.15.3.1.zip
Extract the code from the downloaded file.
$ sudo unzip osTicket-v1.15.3.1.zip
To clean up excluding the archive file and optional scripts directory included with the code.
Scripts $ sudo rm -rf osTicket-v1.15.3.1.zip
Create a copy of the sample configuration file.
$ sudo cp upload / include / ost- {sample, } config.php
Fix the permissions so that only Nginx and PHP have access to files.
$ sudo chown -R www-data: www-data / var / www / osticket
Configure MariaDB
Start configuring MariaDB by running your secure install script.
MariaDB does not use a password for the root user, instead it uses the system’s mysql user. When prompted for the current root password, press Enter for none. When prompted to set the root password, answer N and press Enter to leave it at the default. The rest of the questions should remain at their defaults, so press Enter when prompted to accept the safe defaults.
$ sudo mysql_secure_installation
Now log in to MariaDB as root user.
$ sudo mysql -u root
Create a database and a user, and then grant the user permissions to access the newly created database.
CREATE DATABASE osticket; CREATE USER osticket @ localhost IDENTIFIED BY ‘osticket’; GRANT ALL PRIVILEGES ON Osticket. * TO sticket @ localhost; FLUSH PRIVILEGES;
Configure Nginx
Create an Nginx configuration file for the domain name.
Be sure to replace sticket.example.com with your fully qualified domain name.
$ sudo nano / etc / nginx / sites-available / osticket
server {listen 443 ssl http2; hear [::]: 443 ssl http2;
server_name osticket.example.com;
ssl_certificate /etc/letsencrypt/live/osticket.example.com/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/osticket.example.com/privkey.pem;
root / var / www / osticket / upload; index index.html index.htm index.php;
set $path_info “”;
location ~ / include {deny all; return 403;}
if ($request_uri ~ “^ / api (/[^?]+) ) {Set $path_info $1;}
location ~ ^ / api / (?: tickets | tasks). * ${try_files $uri $uri / /api/http.php?$query_string;}
if ($request_uri ~ “^/ scp /.* .php (/[^?]+) ) {Set $path_info $1;}
if ($request_uri ~ “^/.* .php(/[^?]+) ) {Set $path_info $1;}
location ~ ^ / scp / ajax.php /.*$ {try_files $uri $uri / /scp/ajax.php?$query_string;}
location ~ ^ / ajax.php /.*$ {try_files $uri $uri / /ajax.php?$query_string;}
location / {try_files $uri $uri /index.php;}
location ~.php ${fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name; include fastcgi_params; include snippets / fastcgi-php.conf; fastcgi_param PATH_INFO $path_info; fastcgi_pass unix: /run/php/phpm}}
Enable Nginx configuration by creating a symbolic link to the enabled directory.
$ sudo ln -s / etc / nginx / sites-available / osticket / etc / nginx / sites-enabled
Reload Nginx to load the new configuration.
$ sudo systemctl reload nginx
Configure osTicket
Navigate to https://osticket.example.com, replacing osticket.example.com with your fully qualified domain name. You should see a page that starts with “Thanks for choosing osTicket!”.
If this is not the case, try restarting Nginx and PHP-FPM.
$ sudo systemctl restart nginx $ sudo systemctl restart php7.3-fpm
Make sure all dependencies are met and if so, click “Continue” at the bottom of the page.
Fill in the sections on the page titled “System Settings” and “Admin User” with the information best suited to your deployment.
In the section titled “Database Settings”, use the following settings:
Once this is done, press the button at the bottom of the page to continue. You should see a page that starts with “Congratulations” on the final of the setup process.
To clean up configuration files
As per osTicket’s recommendation when entering the administration panel for the first time, delete the initial configuration files from the web directory.
$ sudo rm -rf / var / www / osticket / upload / setup
Final note
I hope you like the guide How to Run osTicket on Debian 11 Bullseye. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.