How to Install Jirafeau on MXLinux Latest

Jirafeau is a free and open-source, simple file-sharing solution that can be self-hosted. In this tutorial, we will learn how to install Jirafeau on MXLinux Latest.

Prerequisites

Before we go ahead with the installation, we'll have to make sure our MXLinux has the following installed in it:

  1. Apache2
  2. PHP 5.4 or greater
  3. PHP Curl Extension
  4. PHP SQLite3 Extension
  5. Git

You can install these prerequisites using the following command:

sudo apt install apache2 php php-curl php-sqlite3 git

Step 1: Clone the Jirafeau Repository

To download the Jirafeau files, we'll use Git to clone the Jirafeau repository.

To do that, follow the commands given below:

  1. Change your working directory to /var/www/html.

    cd /var/www/html

  2. Clone the Jirafeau repository using Git.

    sudo git clone https://gitlab.com/mojo42/Jirafeau.git

Step 2: Change Ownership and Permissions of the Jirafeau Files

The files that we downloaded above probably have root ownership. To give apache2 ownership over these files, we need to change their ownership.

Use the command below to change ownership of the Jirafeau files in the htmldirectory.

sudo chown -R www-data:www-data /var/www/html/Jirafeau

The above command will give access to your web server user, www-data.

Next, we have to make sure the files inside the /var/www/html/jirafeau directory are readable and executable.

Use the command below to change the permissions of Jirafeau's files inside its directory.

sudo chmod -R 755 /var/www/html/Jirafeau

Step 3: Configure Apache Virtual Host

Next, we need to configure a new virtual host for Jirafeau.

  1. Create a new virtual host configuration file for Jirafeau.

    sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/jirafeau.conf
    
  2. Open the newly-created jirafeau.conf file in your preferred text editor.

    sudo nano /etc/apache2/sites-available/jirafeau.conf
    
  3. Replace the contents in the text editor with the following.

<VirtualHost *:80>
  ServerAdmin admin@example.com
  ServerName jirafeau.example.com
 
  DocumentRoot /var/www/html/Jirafeau
  <Directory /var/www/html/Jirafeau/>
      Options FollowSymLinks
      AllowOverride All
      Require all granted
   </Directory>
 
  ErrorLog ${APACHE_LOG_DIR}/jirafeau_error.log
  CustomLog ${APACHE_LOG_DIR}/jirafeau_access.log combined
 </VirtualHost>

Update ServerAdmin, ServerName and DocumentRoot(if it's different in your MXLinux latest version) to match your requirements.

  1. Enable the jirafeau.conf file.

    sudo a2ensite jirafeau.conf
    
  2. Restart apache2 to take the changes into effect.

    sudo systemctl restart apache2
    

Step 4: Create SQLite Database

Jirafeau stores the file uploads in an SQLite database. So, we need to create a new SQLite database for Jirafeau.

  1. Create a new SQLite database under the Jirafeau directory.

    cd /var/www/html/Jirafeau/
    sudo sqlite3 jirafeau.db
    
  2. At the SQLite command prompt, run the following commands:

    .headers on
    .mode column
    .width 30 10 50 50
    CREATE TABLE IF NOT EXISTS upload (
       id INTEGER PRIMARY KEY,
       token TEXT,
       filename TEXT,
       mimetype TEXT,
       size INTEGER,
       filedata BLOB
    );
    
  3. Exit the SQLite command prompt.

    .quit
    

Step 5: Accessing Jirafeau

At this point, Jirafeau is installed and configured. You can now visit your domain or IP address to use Jirafeau.

http://your_domain_or_IP_address/

You should see the Jirafeau home screen, where you can upload and share files.

Conclusion

We have successfully installed and set up Jirafeau on MXLinux Latest. You can now start uploading and sharing files using Jirafeau.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!