Table of Contents

Install FileRun on Debian 11

Install Apache and PHP:

sudo apt-get install apache2 php

Install PHP extensions:

sudo apt-get install php-mysqlnd php-curl php-curl php-zip php-xml php-mbstring php-imagick

Unload/disable the following unncessary PHP extensions to optimize performance:

sudo phpdismod readline shmop ftp ffi sysvsem sysvshm sysvmsg sockets gettext tokenizer mysqli

Once all the packages are installed, you will also need to install the IonCube loader on your system.

First, download the IonCube loader with the following command:

sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

Once the download is completed, extract the downloaded file with the following command:

sudo tar -xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/lib/php

Next, create an ioncube configuration file and define the IonCube source path:

sudo nano /etc/php/7.4/apache2/conf.d/00-ioncube.ini

Save and close the file, then create a PHP configuration file for FileRun:

sudo nano /etc/php/7.4/apache2/conf.d/filerun.ini

Add the following configuration:

expose_php = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
ignore_repeated_errors = Off
allow_url_fopen = On
allow_url_include = Off
variables_order = "GPCS"
allow_webdav_methods = On
memory_limit = 128M
max_execution_time = 300
output_buffering = Off
output_handler = ""
zlib.output_compression = Off
zlib.output_handler = ""
safe_mode = Off
register_globals = Off
magic_quotes_gpc = Off
upload_max_filesize = 20M
post_max_size = 20M
enable_dl = Off
disable_functions = ""
disable_classes = ""
session.save_handler = files
session.use_cookies = 1
session.use_only_cookies = 1
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_httponly = 1
date.timezone = "UTC"

Save and close the file, then restart the Apache service to apply the changes:

sudo systemctl restart apache2

Install MySQL/MariaDB

There are plenty of guides online for this.

Next, log in to the MariaDB shell with the following command:

sudo mysql -u root -p

Once you are log in, create a database and user with the following command:

MariaDB [(none)]> CREATE DATABASE filerun;
MariaDB [(none)]> CREATE USER 'filerun'@'localhost' IDENTIFIED BY 'password';

Replace password word with the password you wish.

Next, grant all the privileges to the FileRun database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON filerun.* TO 'filerun'@'localhost';

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Configure Apache for FileRun

Next, you will need to create an Apache virtual host configuration file for FileRun. You can create it with the following command:

sudo nano /etc/apache2/sites-available/filerun.conf

Add the following lines:

<VirtualHost *:80>
        ServerName filerun.example.com
 
        DocumentRoot /var/www/html/filerun
 
        <Directory "/var/www/html/filerun">
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
 
        ErrorLog ${APACHE_LOG_DIR}/filerun.error.log
        CustomLog ${APACHE_LOG_DIR}/filerun.access.log combined
</VirtualHost>

Save and close the file then activate the Apache virtual host and rewrite module with the following command:

sudo a2ensite filerun.conf
sudo a2enmod rewrite

Next, restart the Apache service to apply the changes:

sudo systemctl restart apache2

Download FileRun

Download the FileRun installation zip archive from the FileRun client account: https://filerun.com/client-area

Once the FileRun is downloaded, unzip the downloaded file using the following command:

sudo unzip FileRun.zip -d /var/www/html/filerun/

For the above, you might need to install the unzip utility: sudo apt-get install unzip.

Next, set proper permission and ownership with the following command:

sudo chown -R www-data:www-data /var/www/html/filerun/system/data

Access FileRun web UI

Open your server’s URL in a browser and complete the web-based FileRun installation.

Secure FileRun

Install optional third-party software

sudo apt-get install imagemagick ffmpeg libvips libvips-tools libreoffice