How to Install FreeScout on Debian Latest
FreeScout is a free open-source helpdesk and email management software. If you want to install it on your Debian-based operating system, this step-by-step tutorial will guide you through the process.
Prerequisites
Before you start the installation, make sure you have the following prerequisites:
- A Debian-based operating system (e.g. Debian, Ubuntu, Linux Mint)
- A non-root user with sudo privileges
- Apache web server
- MySQL or MariaDB database server
- PHP 7.3 or later with required extensions (php7.3-common, php7.3-cli, php7.3-mbstring, php7.3-xml, php7.3-curl, php7.3-mysql, php7.3-gd)
Step 1: Update System Packages
At first, open your Terminal and update the system packages by running the following command:
sudo apt update && sudo apt upgrade
Step 2: Install Required Dependencies
Once the system packages are up-to-date, install the required dependencies for FreeScout. Run the following command to install all the required dependencies:
sudo apt install apache2 mariadb-server php7.3-common php7.3-cli php7.3-mbstring php7.3-xml php7.3-curl php7.3-mysql php7.3-gd
Step 3: Install Git
Next, you need to install Git on your system to clone the FreeScout source code from the Github repository. You can install Git by running the following command:
sudo apt install git
Step 4: Clone FreeScout Repository
After installing Git, use it to clone the FreeScout repository by running the following command:
sudo git clone https://github.com/freescout-helpdesk/freescout.git /var/www/html/freescout
This command will clone the FreeScout source code into the /var/www/html/freescout directory.
Step 5: Configure Apache
After cloning the FreeScout repository, you need to configure Apache to serve the FreeScout application. You can create a new Apache virtual host file for FreeScout by running the following command:
sudo nano /etc/apache2/sites-available/freescout.conf
Then, paste the following code into the file and save it.
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/freescout/public
<Directory /var/www/html/freescout/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/freescout-error.log
CustomLog ${APACHE_LOG_DIR}/freescout-access.log combined
</VirtualHost>
Note: Replace yourdomain.com with your actual domain name.
Once done, enable the new virtual host by running the following command:
sudo a2ensite freescout.conf
Then, reload the Apache webserver by running the following command:
sudo systemctl restart apache2
Step 6: Create a Database
You need to create a database for FreeScout. Login to MySQL/MariaDB by running the following command:
sudo mysql -u root -p
Then, create a new database with the following command:
CREATE DATABASE freescout;
Note: Replace freescout with your preferred database name.
Next, create a new MySQL/MariaDB user with the command below:
CREATE USER 'freescoutuser'@'localhost' IDENTIFIED BY 'yourpassword';
Note: Replace yourpassword with a strong password.
Finally, grant all privileges on the freescout database to the newly created user with the following command:
GRANT ALL PRIVILEGES ON `freescout` . * TO 'freescoutuser'@'localhost';
Flush the privileges and exit the MySQL/MariaDB console by running the following command:
FLUSH PRIVILEGES;
exit;
Step 7: Configure FreeScout
After creating the database, you need to configure FreeScout by creating a .env file. Copy the .env.example file with the following command:
cd /var/www/html/freescout
sudo cp .env.example .env
Then, edit the .env file with the following command:
sudo nano .env
Update the following lines to match your database and email settings:
APP_URL=http://yourdomain.com
DB_DATABASE=freescout
DB_USERNAME=freescoutuser
DB_PASSWORD=yourpassword
MAIL_DRIVER=smtp
MAIL_HOST=yourmailhost.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=tls
Save the file and exit the editor.
Step 8: Install FreeScout
After configuring FreeScout, you can install it by running the following command:
cd /var/www/html/freescout
sudo php artisan freescout:install
This command will install FreeScout and migrate the database tables.
Step 9: Configure Cron Jobs
Finally, to enable scheduled tasks in FreeScout, add the following cron job to your system:
* * * * * php /var/www/html/freescout/artisan schedule:run >> /dev/null 2>&1
You can add this cron job by running the following command:
sudo crontab -u www-data -e
Then, paste the above-mentioned cron job line at the end of the file.
Conclusion
That's it! You have successfully installed and configured FreeScout on your Debian-based system. Now, you can access the FreeScout helpdesk by navigating to http://yourdomain.com in your web browser.