osTicket is a alternative to customer support systems. It is an open-source support ticketing system. During this tutorial, you’ll find out how to install and configure osTicket on Fedora 33.
OsTicket is a completely free, simple, lightweight, reliable, web-based and straightforward to setup and use.
OsTicket features:
- Custom Fields
- Custom Columns and Queues
- Ticket Filters
- Help Topics
- Agent Collision Avoidance
- Assign, Transfer, & Referral
- Auto-Responder
- Thread Action
- Service Level Agreements
- Customer Portal
- Advanced Search
- Tasks
Pre-requisites:
- PHP version 5.6 or greater
- MySQL database version 5.0 or greater or you can go with MariaDB (same version)
- HTTP server with Nginx running or Apache
Steps to install osTicket and configure on Fedora 33
Confirm your Fedora machine version:
cat /etc/fedora-release
Sample Output:
[root@fedora ~]# cat /etc/fedora-release Fedora release 33 (Thirty Three) [root@fedora ~]#
Create a user account with sudo access
We’ll be using this user to install osTicket on fedora system.
useradd -c "osTicket Admin" osticketadmin && passwd osticketadmin usermod -aG wheel osticketadmin su - osticketadmin
Sample output:
[root@fedora ~]# useradd -c "osTicket Admin" osticketadmin && passwd osticketadmin Changing password for user osticketadmin. New password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word Retype new password: passwd: all authentication tokens updated successfully. [root@fedora ~]# [root@fedora ~]# usermod -aG wheel osticketadmin [root@fedora ~]# su - osticketadmin [osticketadmin@fedora ~]$ [osticketadmin@fedora ~]$
NOTE: Replace osticketadmin user with your user and provide a strong password.
Configure timezone in fedora 33
timedatectl list-timezones sudo timedatectl set-timezone 'Region/City'
Eg: To set Asia/Kolkata as a timezone run below command:
sudo timedatectl set-timezone Asia/Kolkata
Update your Fedora system:
- Before installing osTicket update fedora system
sudo dnf update
Install the required packages for installing osTicket
sudo dnf install -y git unzip vim socat wget
Sample output:
[osticketadmin@fedora ~]$ sudo dnf install -y git unzip vim socat wget Last metadata expiration check: 0:03:40 ago on Thu 18 Feb 2021 11:54:09 AM IST. Package git-2.29.2-3.fc33.x86_64 is already installed. Package unzip-6.0-49.fc33.x86_64 is already installed. Package vim-enhanced-2:8.2.2146-2.fc33.x86_64 is already installed. Package wget-1.20.3-8.fc33.x86_64 is already installed. Dependencies resolved. =================================================================================== Package Architecture Version Repository Size =================================================================================== Installing: socat x86_64 1.7.4.1-1.fc33 updates 307 k Transaction Summary =================================================================================== Install 1 Package Total download size: 307 k Installed size: 1.1 M Downloading Packages: socat-1.7.4.1-1.fc33.x86_64.rpm 87 kB/s | 307 kB 00:03 -------------------------------------------------------------------------------------------------------------------------------------------- Total 68 kB/s | 307 kB 00:04 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : socat-1.7.4.1-1.fc33.x86_64 1/1 Running scriptlet: socat-1.7.4.1-1.fc33.x86_64 1/1 Verifying : socat-1.7.4.1-1.fc33.x86_64 1/1 Installed: socat-1.7.4.1-1.fc33.x86_64 Complete! [osticketadmin@fedora ~]$
Disable SELinux and Firewall.
sudo setenforce 0 && sudo systemctl stop firewalld && sudo systemctl disable firewalld
Sample output:
[osticketadmin@fedora ~]$ sudo setenforce 0 && sudo systemctl stop firewalld && sudo systemctl disable firewalld Removed /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [osticketadmin@fedora ~]$
Install PHP with the extension on fedora
sudo dnf install -y php-cli php-fpm php-common php-mbstring php-curl php-gd php-mysqlnd php-json php-xml php-imap php-intl php-pecl-apcu php-opcache
Sample output:
[osticketadmin@fedora ~]$ sudo dnf install -y php-cli php-fpm php-common php-mbstring php-curl php-gd php-mysqlnd php-json php-xml php-imap php-intl php-pecl-apcu php-opcache Last metadata expiration check: 0:06:45 ago on Thu 18 Feb 2021 11:54:09 AM IST. Dependencies resolved. ======================================================================================================================================== Package Architecture Version Repository Size ======================================================================================================================================== Installing: php-cli x86_64 7.4.15-1.fc33 updates 4.6 M php-fpm x86_64 7.4.15-1.fc33 updates 1.6 M php-gd x86_64 7.4.15-1.fc33 updates 57 k php-imap x86_64 7.4.15-1.fc33 updates 66 k php-intl x86_64 7.4.15-1.fc33 updates 213 k php-json x86_64 7.4.15-1.fc33 updates 40 k php-mbstring x86_64 7.4.15-1.fc33 updates 548 k php-mysqlnd x86_64 7.4.15-1.fc33 updates 231 k php-opcache x86_64 7.4.15-1.fc33 updates 308 k php-pecl-apcu x86_64 5.1.19-1.fc33 updates 80 k php-xml x86_64 7.4.15-1.fc33 updates 180 k Installing dependencies: libc-client x86_64 2007f-26.fc33 fedora 593 k nginx-filesystem noarch 1:1.18.0-3.fc33 fedora 10 k php-common x86_64 7.4.15-1.fc33 updates 794 k php-pdo x86_64 7.4.15-1.fc33 updates 107 k Transaction Summary ======================================================================================================================================== Install 15 Packages Total download size: 9.3 M Installed size: 54 M Downloading Packages: (1/15): php-common-7.4.15-1.fc33.x86_64.rpm 93 kB/s | 794 kB 00:08 (2/15): php-gd-7.4.15-1.fc33.x86_64.rpm 16 kB/s | 57 kB 00:03 (3/15): php-fpm-7.4.15-1.fc33.x86_64.rpm 92 kB/s | 1.6 MB 00:17 (4/15): php-imap-7.4.15-1.fc33.x86_64.rpm 9.3 kB/s | 66 kB 00:07 (5/15): php-json-7.4.15-1.fc33.x86_64.rpm 7.7 kB/s | 40 kB 00:05 (6/15): php-cli-7.4.15-1.fc33.x86_64.rpm 185 kB/s | 4.6 MB 00:25 (7/15): php-intl-7.4.15-1.fc33.x86_64.rpm 27 kB/s | 213 kB 00:07 (8/15): php-mbstring-7.4.15-1.fc33.x86_64.rpm 147 kB/s | 548 kB 00:03 (9/15): php-mysqlnd-7.4.15-1.fc33.x86_64.rpm 67 kB/s | 231 kB 00:03 (10/15): php-opcache-7.4.15-1.fc33.x86_64.rpm 70 kB/s | 308 kB 00:04 (11/15): php-pdo-7.4.15-1.fc33.x86_64.rpm 50 kB/s | 107 kB 00:02 (12/15): php-pecl-apcu-5.1.19-1.fc33.x86_64.rpm 41 kB/s | 80 kB 00:01 (13/15): nginx-filesystem-1.18.0-3.fc33.noarch.rpm 7.6 kB/s | 10 kB 00:01 (14/15): libc-client-2007f-26.fc33.x86_64.rpm 120 kB/s | 593 kB 00:04 (15/15): php-xml-7.4.15-1.fc33.x86_64.rpm 29 kB/s | 180 kB 00:06 ---------------------------------------------------------------------------------------------------------------------------------------- Total 248 kB/s | 9.3 MB 00:38 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : php-common-7.4.15-1.fc33.x86_64 1/15 Installing : php-pdo-7.4.15-1.fc33.x86_64 2/15 Running scriptlet: nginx-filesystem-1:1.18.0-3.fc33.noarch 3/15 Installing : nginx-filesystem-1:1.18.0-3.fc33.noarch 3/15 Installing : libc-client-2007f-26.fc33.x86_64 4/15 Installing : php-imap-7.4.15-1.fc33.x86_64 5/15 Installing : php-fpm-7.4.15-1.fc33.x86_64 6/15 Running scriptlet: php-fpm-7.4.15-1.fc33.x86_64 6/15 Installing : php-mysqlnd-7.4.15-1.fc33.x86_64 7/15 Installing : php-cli-7.4.15-1.fc33.x86_64 8/15 Installing : php-gd-7.4.15-1.fc33.x86_64 9/15 Installing : php-intl-7.4.15-1.fc33.x86_64 10/15 Installing : php-json-7.4.15-1.fc33.x86_64 11/15 Installing : php-mbstring-7.4.15-1.fc33.x86_64 12/15 Installing : php-opcache-7.4.15-1.fc33.x86_64 13/15 Installing : php-pecl-apcu-5.1.19-1.fc33.x86_64 14/15 Installing : php-xml-7.4.15-1.fc33.x86_64 15/15 Running scriptlet: php-xml-7.4.15-1.fc33.x86_64 15/15 Verifying : php-cli-7.4.15-1.fc33.x86_64 1/15 Verifying : php-common-7.4.15-1.fc33.x86_64 2/15 Verifying : php-fpm-7.4.15-1.fc33.x86_64 3/15 Verifying : php-gd-7.4.15-1.fc33.x86_64 4/15 Verifying : php-imap-7.4.15-1.fc33.x86_64 5/15 Verifying : php-intl-7.4.15-1.fc33.x86_64 6/15 Verifying : php-json-7.4.15-1.fc33.x86_64 7/15 Verifying : php-mbstring-7.4.15-1.fc33.x86_64 8/15 Verifying : php-mysqlnd-7.4.15-1.fc33.x86_64 9/15 Verifying : php-opcache-7.4.15-1.fc33.x86_64 10/15 Verifying : php-pdo-7.4.15-1.fc33.x86_64 11/15 Verifying : php-pecl-apcu-5.1.19-1.fc33.x86_64 12/15 Verifying : php-xml-7.4.15-1.fc33.x86_64 13/15 Verifying : libc-client-2007f-26.fc33.x86_64 14/15 Verifying : nginx-filesystem-1:1.18.0-3.fc33.noarch 15/15 Installed: libc-client-2007f-26.fc33.x86_64 nginx-filesystem-1:1.18.0-3.fc33.noarch php-cli-7.4.15-1.fc33.x86_64 php-common-7.4.15-1.fc33.x86_64 php-fpm-7.4.15-1.fc33.x86_64 php-gd-7.4.15-1.fc33.x86_64 php-imap-7.4.15-1.fc33.x86_64 php-intl-7.4.15-1.fc33.x86_64 php-json-7.4.15-1.fc33.x86_64 php-mbstring-7.4.15-1.fc33.x86_64 php-mysqlnd-7.4.15-1.fc33.x86_64 php-opcache-7.4.15-1.fc33.x86_64 php-pdo-7.4.15-1.fc33.x86_64 php-pecl-apcu-5.1.19-1.fc33.x86_64 php-xml-7.4.15-1.fc33.x86_64 Complete! [osticketadmin@fedora ~]$
Command to check php version:
php -v
Sample Output:
[osticketadmin@fedora ~]$ php -v PHP 7.4.15 (cli) (built: Feb 2 2021 14:19:57) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.15, Copyright (c), by Zend Technologies [osticketadmin@fedora ~]$
Verify installed PHP extensions:
php -m
Sample output:
[osticketadmin@fedora ~]$ php -m [PHP Modules] apcu bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv imap intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session SimpleXML sockets SPL sqlite3 standard tokenizer xml xmlreader xmlwriter xsl Zend OPcache zlib [Zend Modules] Zend OPcache [osticketadmin@fedora ~]$
Start the PHP-FPM service
sudo systemctl start php-fpm.service
Enable PHP-FPM service to auto-start on boot
sudo systemctl enable php-fpm.service
Sample output:
[osticketadmin@fedora ~]$ sudo systemctl start php-fpm.service [sudo] password for osticketadmin: [osticketadmin@fedora ~]$ [osticketadmin@fedora ~]$ sudo systemctl enable php-fpm.service Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service. [osticketadmin@fedora ~]$
Install MariaDB on Fedora
sudo dnf install -y mariadb-server
Check the version:
mysql --version
Sample output:
[osticketadmin@fedora ~]$ mysql --version mysql Ver 15.1 Distrib 10.4.17-MariaDB, for Linux (x86_64) using EditLine wrapper [osticketadmin@fedora ~]$
Start MariaDB service and auto start service on boot
sudo systemctl start mariadb.service sudo systemctl enable mariadb.service
Sample output:
[osticketadmin@fedora ~]$ sudo systemctl start mariadb.service [osticketadmin@fedora ~]$ sudo systemctl enable mariadb.service Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service. Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service. Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service. [osticketadmin@fedora ~]$
Initialise MariaDB and set a password for the root user.
sudo mysql_secure_installation
Sample Output:
[osticketadmin@fedora ~]$ sudo mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have your root account protected, so you can safely answer 'n'. Switch to unix_socket authentication [Y/n] Enabled successfully! Reloading privilege tables.. ... Success! You already have your root account protected, so you can safely answer 'n'. Change the root password? [Y/n] New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! [osticketadmin@fedora ~]$
Test the connectivity to MariaDB
sudo mysql -u root -p
# Enter password
Create MariaDB database and user CREATE DATABASE <dbname>; GRANT ALL ON <dbname>.* TO '<username>' IDENTIFIED BY '<password>'; FLUSH PRIVILEGES; exit
NOTE: Replace dbname, username and password as needed.
Install Nginx on Fedora
sudo dnf install -y nginx
Command to check Nginx version
nginx -v
Sample output:
[osticketadmin@fedora ~]$ nginx -v nginx version: nginx/1.18.0 [osticketadmin@fedora ~]$
Start Nginx service and auto start service on boot
sudo systemctl start nginx.service sudo systemctl enable nginx.service
Sample output:
[osticketadmin@fedora ~]$ sudo systemctl start nginx.service [osticketadmin@fedora ~]$ sudo systemctl enable nginx.service Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service. [osticketadmin@fedora ~]$
Configure Nginx for use with the osTicket.
sudo vim /etc/nginx/conf.d/osticket.conf
server { listen 80; server_name example.com; root /var/www/osticket/upload; index index.php index.html; 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; fastcgi_param PATH_INFO $path_info; fastcgi_pass unix:/run/php-fpm/www.sock; } }
save the file and exit
Test Nginx the Configuration
sudo nginx -t
Reload Nginx Configuration
sudo service nginx restart
Sample output:
[osticketadmin@fedora ~]$ sudo vim /etc/nginx/conf.d/osticket.conf [osticketadmin@fedora ~]$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [osticketadmin@fedora ~]$ sudo service nginx restart Redirecting to /bin/systemctl restart nginx.service [osticketadmin@fedora ~]$
Steps to Install osTicket on fedora
Create osTicket root directory
sudo mkdir -p /var/www/osticket
Change ownership of osTicket root directory
sudo chown -R osticketadmin:osticketadmin /var/www/osticket
Download osTicket latest release
cd /var/www/osticket wget https://github.com/osTicket/osTicket/releases/download/v1.15.1/osTicket-v1.15.1.zip unzip osTicket-v1.15.1.zip rm osTicket-v1.15.1.zip
Checkout latest version on the official page.
Copy the sample osTicket config file.
sudo cp upload/include/ost-sampleconfig.php upload/include/ost-config.php
Change the ownership of osTicket root directory to Nginx
sudo chown -R nginx:nginx /var/www/osticket
Set user and group to Nginx (replace apache to Nginx)
sudo vim /etc/php-fpm.d/www.conf # user = nginx # group = nginx
Create directory “/var/lib/php/session/” and set ownership to Nginx
sudo mkdir -p /var/lib/php/session && sudo chown -R nginx:nginx /var/lib/php/session
Restart the PHP-FPM service
sudo systemctl restart php-fpm.service
Access osTicket web page
osTicket Control Panel
http://<your-machine-ip>/scp
Your osTicket URL
http://<your-machine-ip>/
sudo rm -rf upload/setup sudo chmod 0644 upload/include/ost-config.php
Sample output:
[osticketadmin@fedora osticket]$ sudo rm -rf upload/setup [sudo] password for osticketadmin: [osticketadmin@fedora osticket]$ sudo chmod 0644 upload/include/ost-config.php [osticketadmin@fedora osticket]$
End of the article, you have successfully installed and configure osTicket on Fedora 33.