Filerun is an open-source file sharing and synchronization system that you can deploy on a server in your local network or on a third-party cloud host that allows you to upload and access files through a cloud storage platform secure. With a user-friendly web interface, you can store and manage files, photos, movies and more. It’s a great tool for any business (or home) that even includes a built-in version control system.
TO SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
I will show how to install Filerun on AlmaLinux.
What you will need
To install Filerun you will need an instance of AlmaLinux and a user with sudo privileges. That’s it…let’s get to work.
How to Install LAMP Server
The first thing to do is install the LAMP (Linux Apache MariaDB PHP) stack. Connect to your AlmaLinux server and install Apache with the command:
sudo dnf install httpd -y
Once this installation is complete, start and activate the web server with the command:
sudo systemctl enable --now httpd
Next, we will install the database server (MariaDB). Do this with the command:
sudo dnf install mariadb-server -y
Once the installation is complete, start and activate MariaDB with the command:
sudo systemctl enable --now mariadb
Set MariaDB root user password with:
When prompted for the current MariaDB password, just press Enter on your keyboard. You can then type y to set a new root user password. Once you’ve done that, answer the remaining questions there.
How to create the database
We can now create our database. Access the MariaDB console with:
sudo mysql -u root -p
When prompted, enter the password for the root user you just set.
Create the database:
CREATE DATABASE filerun;
Create a new MariaDB user with access to the new database:
GRANT ALL ON filerun.* to 'filerun'@'localhost' IDENTIFIED BY 'PASSWORD';
Where PASSWORD is a strong/unique password.
Dump the privileges and exit the db console with:
How to install PHP and ionCube
Now we need to install the required PHP version. First, enable PHP 7.4 with:
sudo dnf module enable php:7.4
Install PHP 7.4:
sudo dnf install php-fpm
Start and enable PHP-FPM:
sudo systemctl enable --now php-fpm
Install the necessary PHP modules with the command:
sudo dnf install php-mbstring php-opcache php-pdo php-mysqlnd php-gd php-xml php-zip php-json -y
Download the ionCube charger with:
sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
sudo tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Now we need to create a file which is automatically added to the Filerun configuration by PHP. Create the new file with:
sudo nano /etc/php.d/01_filerun.ini
Paste the following content into this file:
expose_php = Off
error_reporting = E_ALL & ~E_NOTICE
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"
zend_extension = /usr/lib64/php/modules/ioncube/ioncube_loader_lin_7.4.so
Save and close the file. Restart PHP-FPM:
sudo systemctl restart php-fpm
How to install Filerun
Access the Apache document root with the command:
Create a new directory with:
sudo mkdir filerun
Access this directory with:
Download the latest version of Filerun with:
sudo wget -O FileRun.zip https://filerun.com/download-latest-centos-8
Unzip the downloaded file with:
sudo unzip FileRun.zip
Give the new system/data directory the appropriate permissions with:
sudo chown -R apache:apache system/data
Modify the SELinux contents of the system/data folder with:
sudo chcon -t httpd_sys_rw_content_t -R system/data
Make sure HTTP traffic can pass through the firewall with:
sudo firewall-cmd --zone=public --add-service=http --permanent
Reload the firewall:
sudo firewall-cmd --reload
Create an Apache configuration file with the command:
sudo nano /etc/httpd/conf.d/filerun.conf
In this file, paste the following content:
Options Indexes FollowSymLinks
Require all granted
CustomLog /var/log/httpd/filerun.access.log combined
Save and close the file. Restart Apache with:
sudo systemctl restart httpd
How to complete the installation
Open a web browser and point it to http://SERVER (where SERVER is either the IP address or domain of the hosting server). You should be greeted with a Welcome to FileRun! the window (Figure A).
Click Next and you should see everything set up and ready for installation (Figure B).
Click Next and, in the resulting window (Figure C), fill in the necessary information for the database.
The database name will be filerun, the MySQL user will be filerun, and the password will be the one you set in the MariaDB console. Once you have added the information, click Next.
When the installation is complete, a window containing the username and password for Filerun will appear (Figure D). Note this information and click Next.
Click Next and you can log in with the default user credentials. You will then be presented with the main Filerun page (Figure E), where you can start downloading content at your leisure.
Congratulations, you now have locally hosted, cloud-based file sync and share ready to meet your business or personal needs.