How to Install FreeScout on Elementary OS Latest
FreeScout is an open-source help desk and shared inbox software that can be installed on Linux. In this tutorial, we will cover how to install FreeScout on Elementary OS Latest.
Prerequisites
Before we begin with the installation, let's check if all the prerequisites are met.
A VPS or dedicated server with Elementary OS Latest installed.
An SSH client like PuTTY to connect to the server.
A non-root user account with sudo privileges.
The latest version of PHP and MariaDB server should be installed on the system.
Step 1: Update the System
Let's first update the system before proceeding with the installation. Run the following command:
sudo apt update && apt upgrade -y
Step 2: Install Required Dependencies
To run FreeScout, we need to install some dependencies. Run the following command:
sudo apt install git curl zip unzip nginx ufw mariadb-server -y
sudo apt install php-fpm php-cli php-common php-mbstring php-xml php-gd php-curl php-mysql -y
Step 3: Configure the Firewall
We will now configure the firewall to allow HTTP and HTTPS traffic. Run the following commands:
sudo ufw allow 'Nginx Full'
sudo ufw enable
Step 4: Install Composer
Composer is a dependency manager used for PHP. Run the following commands to install composer:
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Step 5: Install FreeScout
We will now install FreeScout on our Elementary OS Latest system. Follow the steps given below carefully:
5.1 Clone the Git repository
The first step is to clone the FreeScout repository from GitHub:
cd ~
git clone https://github.com/freescout-helpdesk/freescout.git
cd freescout
5.2 Install dependencies
Once the Git repository is cloned, we need to install the dependencies using Composer:
sudo composer install --no-dev --prefer-dist
5.3 Copy and Edit the Environment Variables
FreeScout uses environment variables to configure the application settings. Run the following command to create a copy of the .env.example file:
cp .env.example .env
Now open the .env file using the text editor of your choice:
nano .env
Update the values of the following variables:
APP_URL=http://example.com
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Replace the value of APP_URL with your domain name or IP address. Change the value of DB_DATABASE, DB_USERNAME and DB_PASSWORD as per your requirement.
5.4 Generate Application Key
We need to generate a new application key for our FreeScout installation:
php artisan key:generate
5.5 Create a Database and User
Log in to the MariaDB server using the following command:
sudo mysql -u root -p
Enter the password for the root user when prompted. Create a new database and user using the following commands:
CREATE DATABASE freescout;
CREATE USER 'freescout'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON freescout.* TO 'freescout'@'localhost';
FLUSH PRIVILEGES;
Note: Replace “password” with your desired password.
Exit the MySQL shell using the following command:
exit
5.6 Run Database Migrations
The last step in the installation is to migrate the FreeScout database tables:
php artisan migrate
5.7 Set File and Folder Permissions
To ensure that the files and folders have the correct permissions, run the following commands:
sudo chown -R www-data:www-data /var/www/html/freescout/
sudo chmod -R 755 /var/www/html/freescout/
Step 6: Configure Nginx
Finally, we need to configure Nginx to serve FreeScout. Create a new virtual host configuration file using the following command:
sudo nano /etc/nginx/sites-available/freescout
Copy and paste the following contents into the file:
server {
listen 80;
listen [::]:80;
root /var/www/html/freescout/public;
index index.php index.html index.htm;
server_name your_domain_name_or_IP;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Replace the value of server_name with your domain name or IP address. Save and close the file by pressing CTRL+X followed by Y and Enter.
Create a symbolic link to enable the virtual host:
sudo ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/
Test the configuration using the following command:
sudo nginx -t
If the test is successful, reload Nginx:
sudo systemctl reload nginx
Step 7: Access FreeScout
Open your web browser and visit http://your_domain_name_or_IP. You will be redirected to the FreeScout setup page.
Enter your database details and the administrator account details. Click the “Install” button to proceed.
Once the installation is complete, you will be taken to the FreeScout dashboard. Congratulations, you have successfully installed FreeScout on Elementary OS Latest.