Debian Apache
Installing Faveo Helpdesk Community on Debian
Faveo can run on Debian 10 (Buster).
Installation steps :
- Apache (with mod_rewrite enabled)
- PHP 8.1+ with the following extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
- MySQL 8.0+ or MariaDB 10.6+
1. LAMP Installation
Follow the instructions here If you follow this step, no need to install Apache, PHP, MySQL separetely as listed below
An editor like vim or nano should be useful too. Run the following commands as sudoers or Login as root user by typing the command below
sudo su
2. Update the packages
apt update
2.a. Install some Utility packages
apt install -y git wget curl unzip nano zip gnupg2 ca-certificates lsb-release apt-transport-https
2.b. Apache should come pre-installed with your server. If it’s not, install it with:
apt install -y apache2
systemctl start apache2
systemctl enable apache2
2.c. PHP 8.1+
Note: In Debian upon installing PHP packages apache2 will be automatically installed and started
apt install -y php8.1 libapache2-mod-php8.1 php8.1-mysql \
php8.1-cli php8.1-common php8.1-fpm php8.1-soap php8.1-gd \
php8.1-opcache php8.1-mbstring php8.1-zip \
php8.1-bcmath php8.1-intl php8.1-xml php8.1-curl \
php8.1-imap php8.1-ldap php8.1-gmp php8.1-redis
After installing PHP 8.1, run the commands below to open PHP default config file.
nano /etc/php/8.1/fpm/php.ini
Then make the changes on the following lines below in the file and save. The value below are great settings to apply in your environments.
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
max_execution_time = 360
2.d. Setting Up ionCube
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Make the note of path and directory from the above command.
Copy ioncube loader to Directory. Replace your yourpath below with actual path that was shown with the first command below.
php -i | grep extension_dir
cp ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/'replaceyourpath'
sed -i '2 a zend_extension = "/usr/lib/php/'replaceyourpath'/ioncube_loader_lin_8.1.so"' /etc/php/8.1/apache2/php.ini
sed -i '2 a zend_extension = "/usr/lib/php/'replaceyourpath'/ioncube_loader_lin_8.1.so"' /etc/php/8.1/cli/php.ini
sed -i '2 a zend_extension = "/usr/lib/php/'replaceyourpath'/ioncube_loader_lin_8.1.so"' /etc/php/8.1/fpm/php.ini
systemctl restart apache2
2.e. MariaDB:
The official Faveo installation uses Mysql as the database system and this is the only official system we support. While Laravel technically supports PostgreSQL and SQLite, we can’t guarantee that it will work fine with Faveo as we’ve never tested it. Feel free to read Laravel’s documentation on that topic if you feel adventurous.
Install MariaDB 10.6. Note that this only installs the package, but does not setup Mysql. This is done later in the instructions:
sudo apt update
sudo apt-get install curl software-properties-common dirmngr
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
sudo bash mariadb_repo_setup --mariadb-server-version=10.6
sudo apt-get update
sudo apt-get install mariadb-server mariadb-client
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure your MySql installation by executing the below command. Set Password for mysql root user by providing a strong password combination of Uppercase, Lowercase, alphanumeric and special symbols, remove anonymous users, disallow remote root login, remove the test databases and finally reload the privilege tables.
sudo mysql_secure_installation
3. Upload Faveo
You may install Faveo by simply cloning the repository. In order for this to work with Apache, you need to clone the repository in a specific folder:
mkdir /var/www/faveo
cd /var/www/faveo
git clone https://github.com/ladybirdweb/faveo-helpdesk.git
You should check out a tagged version of Faveo since master
branch may not always be stable. Find the latest official version on the release page
3.a Extracting the Faveo-Codebase zip file
unzip "Filename.zip" -d /var/www/faveo
4. Setup the database
Log in with the root account to configure the database.
mysql -u root -p
Create a database called ‘faveo’.
CREATE DATABASE faveo;
Create a user called ‘faveo’ and its password ‘strongpassword’.
CREATE USER 'faveo'@'localhost' IDENTIFIED BY 'strongpassword';
We have to authorize the new user on the faveo
db so that he is allowed to change the database.
GRANT ALL ON faveo.* TO 'faveo'@'localhost';
And finally we apply the changes and exit the database.
FLUSH PRIVILEGES;
exit
5. Configure Apache webserver
5.a. Give proper permissions to the project directory by running for the web server to access it:
sudo chown -R www-data:www-data /var/www/faveo
cd /var/www/faveo/
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
5.b. Enable the rewrite module of the Apache webserver:
a2enmod rewrite
5.c. Configure a new Faveo site in apache by doing:
Pick a editor of your choice copy the following and replace ‘–DOMAINNAME–’ with the Domainname mapped to your Server’s IP or you can just comment the ‘ServerName’ directive if Faveo is the only website served by your server.
nano /etc/apache2/sites-available/faveo.conf
<VirtualHost *:80>
ServerName --DOMAINNAME--
ServerAdmin webmaster@localhost
DocumentRoot /var/www/faveo/public
<Directory /var/www/faveo/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
5.d. Disable Directory Browsing on Apache:
Disable Directory Browsing on Apache, edit the apache2.conf and change Options Indexes FollowSymLinks to Options -Indexes +FollowSymLinks & AllowOverride value from none to All under <Directory /var/www/> section.
<Directory "/var/www">
Options -Indexes +FollowSymLinks
AllowOverride All
# Allow open access:
Require all granted
</Directory>
5.d. Apply the new .conf
file and restart Apache and PHP-FPM. You can do that by running:
a2dissite 000-default.conf
a2ensite faveo.conf
systemctl restart apache2
systemctl restart php7.1-fpm
6. Configure cron job
Faveo requires some background processes to continuously run.
Basically those crons are needed to receive emails
To do this, setup a cron that runs every minute that triggers the following command php artisan schedule:run
.
Create a new /etc/cron.d/faveo
file with:
echo "* * * * * www-data /usr/bin/php /var/www/faveo/artisan schedule:run 2>&1" | sudo tee /etc/cron.d/faveo
7. Redis Installation
Redis is an open-source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.
This is an optional step and will improve system performance and is highly recommended.
Redis installation documentation
8. SSL Installation
Secure Sockets Layer (SSL) is a standard security technology for establishing an encrypted link between a server and a client. Let’s Encrypt is a free, automated, and open certificate authority.
This is an optional step and will improve system security and is highly recommended.
Let’s Encrypt SSL installation documentation
9. Install Faveo
At this point if the domainname is propagated properly with your server’s IP you can open Faveo in browser just by entering your domainname. You can also check the Propagation update by Visiting this site www.whatsmydns.net.
Now you can install Faveo via GUI Wizard or CLI
10. Final step
The final step is to have fun with your newly created instance, which should be up and running to http://localhost
.