In today’s competitive business landscape, providing excellent customer support is crucial for the success of any organization. A helpdesk system can streamline customer interactions, improve response times, and enhance overall customer satisfaction. UVdesk is an open-source Saas-based helpdesk system that offers a range of features to help companies deliver exceptional customer support.
In this comprehensive guide, we will walk you through the step-by-step process of installing UVdesk on a Rocky Linux 8 server. We will cover everything from configuring the firewall and installing Nginx, PHP, and MySQL to setting up SSL and configuring Nginx and PHP. By the end of this tutorial, you will have a fully functional UVdesk helpdesk system up and running on your Rocky Linux 8 server.
Prerequisites
Before we begin the installation process, make sure you have the following prerequisites in place:
- A server running Rocky Linux 8.
- A domain name pointing to the server. For this tutorial, we will use the domain
uvdesk.example.com
. - A non-root user with sudo privileges.
Step 1 – Configure Firewall
The first step is to configure the firewall on your Rocky Linux 8 server. Rocky Linux uses Firewalld as the default firewall management tool. Let’s check the status of the firewall:
sudo firewall-cmd --state
If the firewall is running, it should display running
. Next, we need to add HTTP and HTTPS services to the firewall:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https
Finally, reload the firewall to apply the changes:
sudo firewall-cmd --reload
Step 2 – Install Nginx
Rocky Linux 8 comes with an older version of Nginx. To install the latest version of Nginx, we will add the official Nginx repository. Let’s create the repository file:
sudo nano /etc/yum.repos.d/nginx.repo
Paste the following code into the file:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
Save the file and exit the text editor. Now, let’s install Nginx:
sudo dnf install nginx
To enable Nginx to start automatically at boot, run the following command:
sudo systemctl enable nginx
Step 3 – Install PHP and Extensions
For UVdesk to work properly, we need to install PHP and several PHP extensions. We will be using Remi’s repository to install the latest version of PHP. Let’s start by installing the Epel and Remi repositories:
sudo dnf install epel-release sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Next, let’s install PHP and the required extensions:
sudo dnf module reset php sudo dnf module enable php:remi-8.0 sudo dnf install php php-fpm php-mbstring php-xml php-curl php-mysqlnd php-zip php-cli php-intl php-bcmath php-gd php-tokenizer php-imap php-pear php-mailparse
To verify the installation, run the following command:
php --version
Step 4 – Install and Configure MySQL Server
We will be using MySQL as the database server for UVdesk. Rocky Linux’s Appstream repository ships with the latest version of MySQL. Let’s install MySQL:
sudo dnf install mysql-server
Once the installation is complete, enable and start the MySQL service:
sudo systemctl enable mysqld --now
To secure the MySQL installation, run the following command:
sudo mysql_secure_installation
This command will guide you through a series of prompts to set up the MySQL root password and remove insecure defaults.
Step 5 – Download UVdesk
Now that we have all the necessary components in place, let’s download UVdesk. We will download the latest stable version of UVdesk from the official website:
wget https://cdn.uvdesk.com/uvdesk/downloads/opensource/uvdesk-community-current-stable.zip
Once the download is complete, unzip the UVdesk package:
unzip uvdesk-*.zip
Move the extracted UVdesk directory to the web root directory:
sudo mv uvdesk-community-v1.0.18 /var/www/uvdesk
Change the ownership of the UVdesk directory to the Nginx user:
sudo chown -R nginx:nginx /var/www/uvdesk
Step 6 – Configure SELinux Permissions
SELinux is a security mechanism that provides an additional layer of protection for your server. To allow UVdesk to function properly, we need to configure SELinux permissions. Run the following commands to change the file security context for the UVdesk directory:
sudo chcon -t httpd_sys_content_t /var/www/uvdesk -R sudo chcon -t httpd_sys_rw_content_t /var/www/uvdesk -R
Next, enable network connections for UVdesk:
sudo setsebool -P httpd_can_network_connect on
Step 7 – Install and Configure SSL
To secure the UVdesk installation, we will install an SSL certificate using Let’s Encrypt. Let’s install Certbot, the tool used to manage Let’s Encrypt certificates:
sudo dnf install certbot
Generate an SSL certificate for your UVdesk domain:
sudo certbot certonly --standalone --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m test@example.com -d uvdesk.example.com
This command will generate an SSL certificate and store it in the /etc/letsencrypt/live/uvdesk.example.com
directory.
Next, generate a Diffie-Hellman group certificate:
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
Create a directory for Let’s Encrypt auto-renewal:
sudo mkdir -p /var/lib/letsencrypt
Create a cron job to automatically renew the SSL certificate:
sudo nano /etc/cron.daily/certbot-renew
Paste the following code into the file:
#!/bin/sh certbot renew --cert-name uvdesk.example.com --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
Save the file and make it executable:
sudo chmod +x /etc/cron.daily/certbot-renew
Step 8 – Configure Nginx and PHP
Now, let’s configure Nginx and PHP to work with UVdesk.
Configure PHP-FPM
Open the PHP-FPM configuration file:
sudo nano /etc/php-fpm.d/www.conf
Find the lines user = www-data
and group = www-data
and change them to user = nginx
and group = nginx
respectively:
... user = nginx group = nginx ...
Save the file and exit the text editor.
Enable and start the PHP-FPM service:
sudo systemctl enable php-fpm --now
Change the group of the PHP sessions directory to Nginx:
sudo chgrp -R nginx /var/lib/php/session
Configure Nginx
Create an Nginx configuration file for UVdesk:
sudo nano /etc/nginx/conf.d/uvdesk.conf
Paste the following code into the file:
server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name uvdesk.example.com; access_log /var/log/nginx/uvdesk.access.log; error_log /var/log/nginx/uvdesk.error.log; # SSL ssl_certificate /etc/letsencrypt/live/uvdesk.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/uvdesk.example.com/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/uvdesk.example.com/chain.pem; ssl_session_timeout 5m; ssl_session_cache shared:MozSSL:10m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1; ssl_stapling on; ssl_stapling_verify on; ssl_dhparam /etc/ssl/certs/dhparam.pem; resolver 8.8.8.8; root /var/www/uvdesk/public; index index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass unix:/run/php-fpm/www.sock; # Depends On The PHP Version fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; try_files $uri =404; } } server { listen 80; listen [::]:80; server_name uvdesk.example.com; return 301 https://$host$request_uri; }
Save the file and exit the text editor.
Open the main Nginx configuration file:
sudo nano /etc/nginx/nginx.conf
Add the following line before the include /etc/nginx/conf.d/*.conf;
line:
server_names_hash_bucket_size 64;
Save the file and exit the text editor.
To verify the Nginx configuration file syntax, run the following command:
sudo nginx -t
If the syntax is correct, start the Nginx service:
sudo systemctl start nginx
Step 9 – Install UVdesk
Now that everything is set up, let’s install UVdesk.
Launch your web browser and visit https://uvdesk.example.com
. You will be greeted with the UVdesk installation page. Click on the “Let’s Begin” button to start the installation process.
The installer will check if the server meets the minimum requirements and if the file permissions are set correctly. Click on the “Proceed” button to continue.
On the next page, you will be prompted to enter the database details. Enter the following information:
- Database Host:
localhost
- Database Name:
uvdeskdb
- Database User:
uvdesk
- Database Password:
Your_password2
Click on the “Proceed” button to continue.
Next, you will be asked to create a super administrator account. Fill in the required details and click on the “Proceed” button.
Finally, you will be asked to configure the website by giving a name to the Member and Customer Panel prefixes. These prefixes are used in the website URLs. Enter the desired prefixes and click on the “Proceed” button.
On the final installation page, click on the “Install Now” button to begin the installation process. Once the installation is complete, you will see a success message.
Congratulations! You have successfully installed UVdesk on your Rocky Linux 8 server.
Conclusion
In this comprehensive guide, we have covered the step-by-step process of installing UVdesk on a Rocky Linux 8 server. We started by configuring the firewall and installing Nginx, PHP, and MySQL. We then set up SSL and configured Nginx and PHP to work with UVdesk. Finally, we installed UVdesk and completed the installation process.
UVdesk is an incredible helpdesk system that can revolutionize your customer support operations. With features like ticket management, knowledge base support, and automated ticket generation, UVdesk empowers businesses to provide exceptional customer service.
If you have any questions or need further assistance, feel free to reach out to the UVdesk community or contact our support team at Shape.host. At Shape.host, we offer reliable and scalable Linux SSD VPS hosting solutions to help businesses thrive in the digital world.