FedoraRHEL Based

How To Install osTicket on Fedora 42

Install osTicket on Fedora 42

osTicket stands as one of the most widely-deployed open-source ticketing systems, serving over five million users globally who rely on it to streamline customer support operations. This comprehensive guide walks through the complete installation process of osTicket on Fedora 42, covering everything from LAMP stack setup to post-installation security hardening. Whether managing IT helpdesk requests or building a customer support portal, this tutorial provides the knowledge needed to deploy a fully functional ticketing system on a Fedora 42 server.

The installation process involves setting up Apache web server, MariaDB database, PHP 8.2 with required extensions, and configuring SELinux policies for secure operation. Each step includes detailed commands, configuration examples, and troubleshooting guidance to ensure a smooth deployment experience.

Table of Contents

Understanding osTicket and System Requirements

What is osTicket?

osTicket is a feature-rich, open-source support ticket system built with PHP that enables organizations to manage customer inquiries efficiently. The platform includes dashboard reporting, configurable help topics, SLA management capabilities, ticket filters, and a built-in API for integrations. Released under GPL licensing, osTicket provides enterprise-level functionality without licensing costs, making it an attractive solution for businesses of all sizes.

The system excels at routing incoming support requests, organizing customer communications, and tracking resolution progress through a clean web interface. Support teams can categorize tickets by department, assign priority levels, and maintain comprehensive communication histories.

System Requirements for Fedora 42

Before beginning the installation, verify the server meets these minimum requirements. The web server must be Apache or LiteSpeed, though Apache remains the most common choice for Fedora deployments. PHP version 8.1 or 8.2 is required, with PHP 8.2 recommended for optimal compatibility with osTicket 1.18 and newer releases.

Database support requires MySQL 5.5 or higher, though MariaDB serves as the preferred option on Fedora systems. Essential PHP extensions include mysqli for database connectivity, mbstring for multi-byte string handling, gd for image processing, xml for parsing capabilities, intl for internationalization, imap for email fetching, apcu for caching, and opcache for performance optimization. Hardware resources should include at least 2GB RAM and 10GB disk space for reliable operation.

Prerequisites and Preparation

Server Setup Requirements

A fresh or existing Fedora 42 installation serves as the foundation for this deployment. Create a non-root user account with sudo privileges to follow security best practices during the installation process. The server requires either a registered domain name pointed to the server IP address or direct access via public IP.

SSH access enables remote server management, while basic command line familiarity ensures smooth execution of installation commands. Gather database credentials, email settings, and admin user information before starting the installation wizard.

Initial Server Configuration

Begin by establishing SSH connection to the Fedora 42 server. Set an appropriate hostname that reflects the server’s purpose and configure the system timezone to match the organization’s location. Verify internet connectivity functions properly by pinging external hosts. Creating a system backup before making configuration changes provides a safety net for restoring previous states if needed.

Step 1: Update Fedora 42 System

Keeping the Fedora system updated ensures access to the latest security patches and bug fixes. Execute the system update command to refresh all installed packages to their newest versions:

sudo dnf upgrade -y

This command downloads and installs updates for the entire system. The process may take several minutes depending on the number of packages requiring updates and network speed.

Install essential helper packages that facilitate the osTicket installation process:

sudo dnf install -y socat git wget unzip nano

These utilities provide file downloading (wget), archive extraction (unzip), text editing (nano), version control (git), and networking tools (socat). Verify successful installation by checking the version of each installed tool.

If kernel updates were applied during the system upgrade, reboot the server to ensure the new kernel loads properly:

sudo reboot

After reconnecting via SSH, confirm the Fedora version:

cat /etc/fedora-release

The output should display Fedora Linux 42 or the specific release version installed.

Step 2: Install Apache Web Server

Installing Apache

Apache HTTP Server provides the web serving capabilities for osTicket. Install the httpd package using Fedora’s package manager:

sudo dnf install -y httpd

Start the Apache service immediately after installation:

sudo systemctl start httpd

Configure Apache to start automatically when the system boots:

sudo systemctl enable httpd

Verify Apache runs correctly by checking its service status:

sudo systemctl status httpd

The output should show “active (running)” in green text, indicating successful operation. Apache’s main configuration file resides at /etc/httpd/conf/httpd.conf, while additional configuration files belong in /etc/httpd/conf.d/.

Configuring Firewall for Apache

Fedora 42 includes firewalld by default, which blocks incoming HTTP and HTTPS traffic until explicitly allowed. Open port 80 for HTTP connections:

sudo firewall-cmd --permanent --add-service=http

Enable HTTPS traffic on port 443 for secure connections:

sudo firewall-cmd --permanent --add-service=https

Apply the firewall changes immediately:

sudo firewall-cmd --reload

Verify the firewall rules were added successfully:

sudo firewall-cmd --list-all

The output should list http and https in the services section. Test Apache by opening a web browser and navigating to the server’s IP address. The default Apache test page confirms successful installation and firewall configuration.

Step 3: Install and Configure MariaDB Database

Installing MariaDB

MariaDB provides the database backend for storing osTicket configuration, tickets, user data, and attachments. Install MariaDB server on Fedora 42:

sudo dnf install -y mariadb-server

Start the MariaDB service:

sudo systemctl start mariadb

Enable automatic startup on system boot:

sudo systemctl enable mariadb

Check MariaDB service status to confirm proper operation:

sudo systemctl status mariadb

Verify the installed MariaDB version:

mysql --version

Fedora 42 typically includes MariaDB 10.11 or newer, which provides excellent compatibility with osTicket.

Securing MariaDB Installation

The default MariaDB installation includes test databases and anonymous users that pose security risks. Run the security hardening script:

sudo mysql_secure_installation

The script prompts for several security decisions. Press Enter when asked for the current root password, as none exists initially. Enter Y to set a root password, then type and confirm a strong password containing uppercase letters, lowercase letters, numbers, and special characters.

Remove anonymous users by entering Y when prompted. Disable remote root login by selecting Y, which prevents root database access from network connections. Remove the test database by choosing Y, eliminating an unnecessary security exposure. Reload privilege tables by entering Y to apply all changes immediately.

Creating osTicket Database and User

osTicket requires a dedicated database and user account with appropriate privileges. Log into the MariaDB console as root:

sudo mysql -u root -p

Enter the root password set during the security script. Create a new database named osticket:

CREATE DATABASE osticket;

Create a dedicated database user with a strong password:

CREATE USER 'osticketuser'@'localhost' IDENTIFIED BY 'YourStrongPassword123!';

Replace “YourStrongPassword123!” with a secure password. Grant full privileges on the osticket database to this user:

GRANT ALL PRIVILEGES ON osticket.* TO 'osticketuser'@'localhost';

Flush privileges to ensure changes take effect immediately:

FLUSH PRIVILEGES;

Exit the MariaDB console:

exit;

Save the database name (osticket), username (osticketuser), and password in a secure location for use during the web-based installation wizard.

Step 4: Install PHP 8.2 and Required Extensions

Installing PHP 8.2

PHP serves as the programming language powering osTicket’s application logic. Check available PHP module streams on Fedora 42:

sudo dnf module list php

Fedora 42 typically includes PHP 8.2 as the default stream. Install PHP along with core packages:

sudo dnf install -y php php-cli php-fpm php-common

Verify PHP installation and version:

php -v

The output should display PHP 8.2.x along with build information. PHP 8.2 provides improved performance and security features compared to earlier versions.

Installing Required PHP Extensions

osTicket depends on specific PHP extensions for full functionality. Install all required extensions in a single command:

sudo dnf install -y php-mbstring php-mysqlnd php-gd php-xml php-intl php-imap php-pecl-apcu php-opcache php-curl php-json

Each extension serves a specific purpose. The mbstring extension handles multi-byte character encoding for international character support. The gd extension processes images for attachment thumbnails and CAPTCHA generation. The mysqlnd extension provides the native MySQL driver for database connectivity.

The xml extension parses XML data for API integrations and data imports. The intl extension enables internationalization features for multi-language support. The imap extension fetches emails from mail servers for automatic ticket creation. The apcu extension improves performance through caching frequently accessed data. The opcache extension accelerates PHP execution by caching precompiled script bytecode.

Verify all extensions installed correctly:

php -m

This command lists all enabled PHP modules. Scan the output to confirm each required extension appears. Restart Apache to load the newly installed PHP extensions:

sudo systemctl restart httpd

Step 5: Download and Extract osTicket

Creating Installation Directory

Organize osTicket files in a dedicated directory within the web root. Create the directory structure:

sudo mkdir -p /var/www/os_ticket

Change ownership to the current user for easier file manipulation during setup:

sudo chown -R $USER:$USER /var/www/os_ticket

Navigate to the newly created directory:

cd /var/www/os_ticket

Downloading osTicket

Visit the official osTicket website to identify the latest stable release version. Download osTicket version 1.18.1 or the newest available release:

wget https://github.com/osTicket/osTicket/releases/download/v1.18.2/osTicket-v1.18.2.zip

The download completes in seconds to minutes depending on network speed. Alternative download sources include the official osticket.com website.

Extracting and Configuring Files

Extract the downloaded archive:

unzip osTicket-v1.18.2.zip

Remove the zip file to free disk space:

rm osTicket-v1.18.2.zip

osTicket includes a sample configuration file that requires copying to the active configuration location:

sudo cp upload/include/ost-sampleconfig.php upload/include/ost-config.php

List directory contents to verify successful extraction:

ls -la

The directory should contain an “upload” folder containing all osTicket application files.

Step 6: Set Proper File Permissions

Configuring Directory Ownership

Web applications require appropriate file ownership and permissions for security and functionality. Change ownership of all osTicket files to the Apache user:

sudo chown -R apache:apache /var/www/os_ticket

The Apache web server runs as the “apache” user on Fedora systems. Granting ownership to this user enables Apache to read application files and write logs.

Verify ownership changes:

ls -la /var/www/os_ticket

All files and directories should show “apache apache” in the ownership columns.

Setting Directory Permissions

Apply appropriate permissions to the osTicket directory:

sudo chmod -R 755 /var/www/os_ticket

Permission mode 755 grants read, write, and execute access to the owner (apache), while group and others receive read and execute permissions. This configuration provides necessary access while maintaining security.

Set temporary write permissions on the configuration file for the installation wizard:

sudo chmod 0666 /var/www/os_ticket/upload/include/ost-config.php

Permission mode 666 allows read and write access to all users temporarily. This setting enables the web-based installer to write configuration data to the file. After installation completes, these permissions will be restricted to read-only for security.

Step 7: Configure Apache Virtual Host

Creating Virtual Host Configuration

Apache virtual hosts enable hosting multiple websites on a single server. Create a new configuration file for osTicket:

sudo nano /etc/httpd/conf.d/os_ticket.conf

Add the following virtual host configuration:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/os_ticket/upload
    ServerName support.example.com
    
    <Directory /var/www/os_ticket/upload>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog /var/log/httpd/osticket-error_log
    CustomLog /var/log/httpd/osticket-access_log combined
</VirtualHost>

Replace “support.example.com” with the actual domain name or server IP address. The ServerAdmin directive specifies the administrator’s email address for error messages. The DocumentRoot points to the upload subdirectory containing osTicket’s public files.

The Directory block configures behavior for the osTicket installation. FollowSymLinks allows symbolic links, AllowOverride All permits .htaccess files to override server configuration, and Require all granted allows access from all IP addresses.

Save the file by pressing Ctrl+O, then exit nano with Ctrl+X.

Activating Virtual Host

Test Apache configuration syntax before restarting:

sudo apachectl configtest

The command should return “Syntax OK” if no errors exist. Address any configuration errors before proceeding. Restart Apache to load the new virtual host configuration:

sudo systemctl restart httpd

Verify Apache restarted successfully:

sudo systemctl status httpd

Check Apache error logs if issues occur:

sudo tail -f /var/log/httpd/error_log

This command displays the most recent log entries and continues showing new entries as they occur. Press Ctrl+C to exit the log viewer.

Step 8: Configure SELinux for osTicket

Understanding SELinux Context

Security-Enhanced Linux (SELinux) enforces mandatory access controls on Fedora systems, protecting against unauthorized access. osTicket requires specific SELinux policies to function correctly while maintaining system security.

Two approaches exist: disabling SELinux or configuring proper contexts. Disabling SELinux compromises system security and is not recommended for production environments. Configuring SELinux properly provides both security and functionality.

Setting SELinux Booleans and Contexts

Allow Apache to establish network connections, which osTicket needs for external email and API integrations:

sudo setsebool -P httpd_can_network_connect 1

Enable Apache database connections:

sudo setsebool -P httpd_can_network_connect_db 1

The -P flag makes these settings persistent across reboots. Add the appropriate file context for osTicket files:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/os_ticket(/.*)?"

Apply the context changes:

sudo restorecon -Rv /var/www/os_ticket/

Verify SELinux remains in enforcing mode:

sudo getenforce

The output should show “Enforcing”, indicating active protection. Check for SELinux access denials that might affect osTicket:

sudo ausearch -m avc -ts today

This command searches audit logs for Access Vector Cache (AVC) denials occurring today. Address any denials by adjusting SELinux policies or permissions as needed.

Step 9: Complete Web-Based Installation

Accessing Installation Wizard

Open a web browser and navigate to the configured domain name or server IP address:

http://support.example.com

or

http://your-server-ip

The osTicket installation page appears, displaying system requirements and a green checkmark or red X next to each requirement. All required PHP extensions should show green checkmarks. If any extensions display red X marks, return to the terminal and install the missing extensions, then restart Apache.

Install osTicket on Fedora 42

System Settings Configuration

Click the Continue button to proceed to the system settings page. Enter the helpdesk name that will appear in the ticket system header and email communications. Provide the default email address for system notifications and incoming ticket creation.

Configure the helpdesk URL to match the domain or IP address used to access the installation. Select the default system language, typically English unless supporting a different primary language. Review additional settings and adjust as needed for organizational requirements.

Admin User Creation

The admin user account provides full access to osTicket configuration and management. Create a strong administrator account to prevent unauthorized access. Enter the first name, last name, and email address for the primary administrator. Choose a secure username that doesn’t reveal system roles or administrator status.

Set a strong password containing at least 12 characters with a mix of uppercase letters, lowercase letters, numbers, and special symbols. Record these credentials in a password manager or secure location for future access.

Database Connection Settings

Enter the database credentials created during MariaDB setup:

  • MySQL Hostname: localhost
  • MySQL Database: osticket
  • MySQL Username: osticketuser
  • MySQL Password: [the password created earlier]

Click “Install Now” to begin the installation process. osTicket creates database tables, configures the system, and initializes the help desk environment. The installation typically completes within 30 seconds.

A success message appears upon completion, along with links to the admin control panel and user help desk. Record these URLs before proceeding.

Step 10: Post-Installation Security Configuration

Removing Setup Directory

The installation wizard creates a setup directory that poses a significant security risk if left accessible. Delete this directory immediately after successful installation:

sudo rm -rf /var/www/os_ticket/upload/setup

This command permanently removes the setup directory and all its contents. Verify removal:

ls -la /var/www/os_ticket/upload/

The directory listing should not include a “setup” folder. Leaving the setup directory accessible allows potential attackers to reconfigure the system or gain unauthorized access.

Securing Configuration File

Change the configuration file permissions to read-only:

sudo chmod 0644 /var/www/os_ticket/upload/include/ost-config.php

Permission mode 644 provides read and write access to the owner (apache) while restricting write access from the web server. This prevents unauthorized modification of critical configuration settings.

Verify the new permissions:

ls -l /var/www/os_ticket/upload/include/ost-config.php

The permissions column should display “-rw-r–r–“, indicating read-write for owner and read-only for group and others.

Additional Security Hardening

Review and configure ticket routing rules to ensure incoming support requests reach appropriate departments or agents. Set up email piping or fetching to enable automatic ticket creation from support email addresses.

Configure SMTP settings for outgoing email notifications, ensuring customers receive ticket updates and responses. Implement HTTPS with SSL/TLS certificates from Let’s Encrypt or a commercial certificate authority to encrypt communications between users and the help desk.

Establish a regular backup strategy for both the osTicket database and application files. Automated daily backups prevent data loss from hardware failures, security incidents, or accidental deletions. Keep osTicket and system dependencies updated by monitoring release announcements and applying security patches promptly.

Review osTicket security best practices and implement additional hardening measures appropriate for the environment. Consider restricting admin panel access to specific IP addresses through Apache configuration or firewall rules.

Step 11: Testing osTicket Installation

Accessing Admin Panel

Navigate to the admin control panel using the URL provided after installation:

http://support.example.com/scp

The “scp” path stands for Staff Control Panel. Log in with the administrator credentials created during installation. The admin dashboard displays ticket statistics, system alerts, and quick access to configuration options.

Explore the admin interface to familiarize with available features. Navigate through settings menus to configure departments, help topics, SLA plans, and team members. Test email settings by sending test notifications to verify SMTP configuration works correctly.

Testing Ticket Creation

Access the user-facing help desk portal:

http://support.example.com

The portal displays a clean interface for customers to submit support requests. Click the “Open a New Ticket” button to access the submission form. Fill in contact information, select a help topic, and describe a test issue in the message field.

Submit the ticket and note the ticket number provided. Check the configured email address for the automated receipt confirmation. Log into the admin panel and verify the new ticket appears in the queue.

Test ticket assignment by assigning the test ticket to a staff member or department. Change the ticket status and add internal notes. Respond to the ticket and verify the customer receives email notification of the response. These tests confirm full system functionality.

Troubleshooting Common Issues

Database Connection Errors

If osTicket displays database connection errors, verify the credentials in the configuration file:

sudo cat /var/www/os_ticket/upload/include/ost-config.php | grep DB

This command displays database-related configuration lines. Ensure the hostname, database name, username, and password match the credentials created during MariaDB setup.

Check MariaDB service status:

sudo systemctl status mariadb

If MariaDB is not running, start the service. Test database connectivity manually:

mysql -u osticketuser -p osticket

Enter the database password when prompted. Successful connection confirms credentials work correctly. If connection fails, reset the database user password and update the configuration file.

Review SELinux settings for database access permissions. Check osTicket error logs for detailed error messages:

sudo tail -50 /var/www/os_ticket/upload/include/logs/error.log

PHP Extension Missing Errors

If the installation wizard shows missing PHP extensions, verify PHP version compatibility:

php -v

osTicket requires PHP 8.1 or 8.2. Reinstall any missing extensions identified during installation:

sudo dnf install -y php-[extension-name]

Replace [extension-name] with the specific extension required. Check php.ini configuration for disabled extensions:

sudo cat /etc/php.ini | grep extension

Restart Apache after installing or enabling extensions:

sudo systemctl restart httpd

List all installed PHP modules to verify availability:

php -m | grep -i [extension-name]

Permission Denied Errors

Permission errors typically indicate incorrect file ownership or SELinux blocking access. Check file ownership:

ls -la /var/www/os_ticket/upload/

All files should be owned by the apache user. Reset ownership if needed:

sudo chown -R apache:apache /var/www/os_ticket

Verify Apache has proper access to the directory:

sudo -u apache test -r /var/www/os_ticket/upload/index.php && echo "Readable"

Review SELinux audit logs for denial messages:

sudo ausearch -m avc -ts recent | grep httpd

Restore SELinux contexts if denials occur:

sudo restorecon -Rv /var/www/os_ticket/

Check Apache error logs for specific permission issues:

sudo tail -100 /var/log/httpd/error_log

Optimizing osTicket Performance

PHP Configuration Tuning

Optimize PHP settings for better osTicket performance. Edit the php.ini configuration file:

sudo nano /etc/php.ini

Increase memory limit to handle concurrent users and large attachments:

memory_limit = 256M

Set maximum execution time to prevent timeout during complex operations:

max_execution_time = 300

Configure upload limits for ticket attachments:

upload_max_filesize = 25M
post_max_size = 30M

Enable and configure opcache for bytecode caching:

opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000

Save changes and restart Apache:

sudo systemctl restart httpd

Database Optimization

Tune MariaDB configuration for optimal performance. Edit the MariaDB configuration file:

sudo nano /etc/my.cnf.d/mariadb-server.cnf

Add performance tuning parameters under the [mysqld] section:

innodb_buffer_pool_size = 512M
query_cache_type = 1
query_cache_size = 32M
max_connections = 200

Adjust values based on available server resources. Restart MariaDB to apply changes:

sudo systemctl restart mariadb

Implement regular database maintenance with automated optimization scripts. Regular backups ensure recovery capability in case of data corruption or system failures.

Maintenance and Updates

Keeping osTicket Updated

Monitor osTicket release announcements on the official website for new versions and security patches. Always create complete backups before applying updates:

sudo mysqldump -u root -p osticket > osticket-backup-$(date +%Y%m%d).sql
sudo tar -czf osticket-files-backup-$(date +%Y%m%d).tar.gz /var/www/os_ticket/

Review changelog and release notes before updating to understand new features and potential compatibility issues. Test updates in a staging environment before applying to production systems. Follow official update documentation carefully, as upgrade procedures vary between versions.

System Maintenance Tasks

Maintain the Fedora system with regular updates:

sudo dnf upgrade -y

Schedule weekly or monthly system updates depending on organizational policies. Monitor server resources including CPU usage, memory consumption, and disk space:

df -h
free -m
top

Review and rotate log files to prevent disk space exhaustion. Clean up old tickets and attachments according to data retention policies. Perform regular database backups and test restoration procedures to ensure backup integrity.

Conduct security audits using vulnerability scanners to identify potential security issues. Review user accounts and access permissions quarterly, removing inactive accounts and adjusting privileges as organizational roles change.

Congratulations! You have successfully installed osTicket. Thanks for using this tutorial for installing the osTicket support ticketing system on your Fedora 42 Linux system. For additional help or useful information, we recommend you check the official osTicket website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button