Come hang with us on Discord and chat directly with the team!Discordtop-bar-close-icon

2024-09-12

How to Install FileGator on Fedora Server Latest

tutorials
img

FileGator is a versatile web-based file management tool that helps you organize, share, and publish files seamlessly online. This guide will walk you through the steps to install FileGator on the latest Fedora Server distribution.

Prerequisites

Ensure you have the following before starting:

  • Fedora Server latest distribution installed
  • A web server (Apache or Nginx)
  • PHP version 5.6 or higher
  • MySQL or MariaDB database server

Step 1: Install Required PHP Modules

To install the necessary PHP modules for FileGator, execute this command:

sudo dnf install php-mbstring php-gd php-mysqlnd php-xml

Step 2: Install Composer

Composer, a dependency manager for PHP, can be installed using:

sudo dnf install composer

Step 3: Download and Install FileGator

Create a directory for FileGator installation, for instance, in /var/www/html:

sudo mkdir -p /var/www/html/filegator

Navigate to the newly created directory:

cd /var/www/html/filegator

Download the latest FileGator version using Composer:

sudo composer create-project filegator/filegator

After installation, navigate to the filegator directory:

cd filegator

Create a .env file and fill in your database configuration:

DB_BASE_URL=http://localhost
DB_HOST=localhost
DB_NAME=filegator
DB_USER=filegator
DB_PASS=password

Replace the placeholders with your actual database details.

Step 4: Configure Web Server

Adjust your web server settings to host FileGator:

Apache

Create the virtual host configuration:

sudo nano /etc/httpd/conf.d/filegator.conf

Add this configuration:

<VirtualHost *:80>
  ServerName your_domain.com
  DocumentRoot /var/www/html/filegator/filegator/public/
  <Directory /var/www/html/filegator/filegator/public/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
  ErrorLog /var/log/httpd/filegator_error.log
  CustomLog /var/log/httpd/filegator_access.log combined
</VirtualHost>

Save and close the file.

Nginx

Create the virtual host configuration:

sudo nano /etc/nginx/conf.d/filegator.conf

Insert this configuration:

server {
  listen 80;
  server_name your_domain.com;
  root /var/www/html/filegator/filegator/public/;
  index index.php;
  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }
  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/run/php-fpm/www.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
  error_log /var/log/nginx/filegator_error.log;
  access_log /var/log/nginx/filegator_access.log;
}

Save and close the file.

Step 5: Access FileGator

Restart your web server to apply the changes:

sudo systemctl restart httpd # For Apache
sudo systemctl restart nginx # For Nginx

Open a web browser and navigate to your_domain.com to find the FileGator login page. Use the default credentials:

  • Username: admin
  • Password: admin

Congratulations! You've installed FileGator on your Fedora Server. Start managing your files online effortlessly.