How to Install UberGallery on Debian Latest

UberGallery is a simple and easy-to-use PHP image gallery that can be easily installed on Debian systems. In this tutorial, we will guide you through the process of installing UberGallery on Debian Latest.

Prerequisites

Before you start, ensure that your system meets the following requirements:

Step 1: Download UberGallery

To download UberGallery, open a terminal and run the following command:

$ cd /var/www/html/
$ sudo wget https://github.com/UberGallery/UberGallery/archive/master.zip
$ sudo unzip master.zip
$ sudo mv UberGallery-master ubergallery

This will download the latest version of UberGallery and extract it into the /var/www/html/ubergallery directory.

Step 2: Set up Apache virtual host

You need to create a virtual host configuration file for your UberGallery. To do this, create a virtual host file named ubergallery.conf in the /etc/apache2/sites-available/ directory.

$ sudo nano /etc/apache2/sites-available/ubergallery.conf

Paste the following configuration in the file and save it:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/html/ubergallery

    <Directory /var/www/html/ubergallery>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Replace example.com and www.example.com with your domain name.

Step 3: Enable the virtual host

After creating the virtual host file, you need to enable it by running the following command:

$ sudo a2ensite ubergallery.conf

Then restart Apache for the changes to take effect:

$ sudo systemctl restart apache2

Step 4: Set up database and configuration file

UberGallery requires a MySQL or other database to store the image data. Therefore, you need to create a database and a MySQL user to manage the database.

$ mysql -u root -p
mysql> CREATE DATABASE ubergallery;
mysql> CREATE USER 'ubergallery'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON ubergallery.* TO 'ubergallery'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;

Replace ubergallery and password with your preferred database name and password.

Then, copy the config-sample.php file to config.php in the /var/www/html/ubergallery directory.

cd /var/www/html/ubergallery
sudo cp config-sample.php config.php

Edit the config.php file and add the database details:

$conf['mysql']['host'] = 'localhost';
$conf['mysql']['user'] = 'ubergallery';
$conf['mysql']['pass'] = 'password';
$conf['mysql']['db'] = 'ubergallery';

Replace ubergallery and password with your preferred database name and password.

Step 5: Set up permissions

You need to set up proper file permissions on the /var/www/html/ubergallery directory so that PHP can read and write files in that directory.

$ sudo chown -R www-data:www-data /var/www/html/ubergallery/
$ sudo chmod -R 755 /var/www/html/ubergallery/

Step 6: Access the UberGallery

Now you can access the UberGallery by visiting your domain name in your web browser:

http://example.com/

Replace example.com with your domain name.

You should see the UberGallery interface, where you can upload and manage your images.

Conclusion

Congratulations! You have successfully installed and configured UberGallery on Debian Latest. You can now add your images and create photo galleries on your website.

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!