How to Install Piwigo on OpenSUSE Latest

Piwigo is a free open-source photo management software that allows users to create online photo albums. In this tutorial, we will guide you through the process of installing Piwigo on OpenSUSE Latest using the command line.

Prerequisites

Before installing Piwigo, you need to make sure that your system meets the following requirements:

You can check if these prerequisites are met by executing the following commands in the terminal:

$ apache2ctl -v
$ php -v
$ mysql --version

Step 1: Install Required Dependencies

We will begin by updating the system packages and then install the required dependencies for Piwigo to function correctly. Open the terminal and run the following commands:

$ sudo zypper update
$ sudo zypper install php-gd php-gd php-mysql mariadb mariadb-client apache2-mod_php7

Step 2: Create a MySQL Database

Now, we need to create a MySQL database for Piwigo. First, we need to log in to the MySQL server. Run the following command:

$ sudo mysql -u root -p

You will be prompted to enter the root password. Once you are logged in, execute the following commands to create a new database, user, and grant permissions.

CREATE DATABASE piwigo_db;
CREATE USER 'piwigo_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON piwigo_db.* TO 'piwigo_user'@'localhost';
FLUSH PRIVILEGES;
exit

Make sure to replace "piwigo_db" with the name of the database you want to create, "piwigo_user" with the name of the user you want to create, and "strong_password" with your chosen password.

Step 3: Install Piwigo

Now that we have installed all the necessary dependencies and created a database for Piwigo, we can finally install Piwigo. Download the latest version of Piwigo from their website and unzip the package.

$ cd /tmp
$ wget https://piwigo.org/download/dlcounter.php?code=latest -O piwigo-latest.zip
$ sudo unzip piwigo-latest.zip -d /srv/www/htdocs/

Step 4: Configure Apache

We need to configure Apache to serve the Piwigo files. Run the following command to create a new Apache configuration file.

$ sudo nano /etc/apache2/vhosts.d/piwigo.conf

Paste the following configuration in the file.

<VirtualHost *:80>
    DocumentRoot /srv/www/htdocs/piwigo
    <Directory /srv/www/htdocs/piwigo>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Then save and exit the file.

Step 5: Restart Apache

The last step is to restart the Apache web server for the changes to take effect. Run the following command.

$ sudo systemctl restart apache2

Step 6: Finish the Installation

Now you can access the Piwigo installation wizard on your web browser, go to http://localhost/piwigo, and follow the installation wizard. On the database configuration page, enter the database details, i.e., the database name, username, and password you created earlier.

After you have successfully installed Piwigo, it is ready to use.

Conclusion

In this tutorial, we have successfully installed Piwigo on OpenSUSE using the command line. Now you can create online photo galleries and manage your photos with ease.

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!