How to install Piwigo on Fedora CoreOS Latest

This tutorial will guide you on how to install Piwigo on Fedora CoreOS latest version. Piwigo is a free and open-source software for creating photo galleries, and it's easy to install on Fedora CoreOS. Let's dive in!

Step 1: Log in to your Fedora CoreOS Instance

Log in to your Fedora CoreOS instance using SSH or console access with root privileges.

Step 2: Install Required Packages

Once you are logged in, run the following command to update the package list and install the required packages for Piwigo:

sudo dnf update
sudo dnf install mariadb mariadb-server php php-gd php-mysqlnd php-mbstring nginx

During the installation, you will be prompted to accept GPG key signatures. Press y to continue.

Step 3: Configure MariaDB

Let's create a new database for Piwigo, a new user and grant permissions. Run the following command to create a new database:

sudo mysql -u root -p

Use your MariaDB root password to access the MariaDB shell. Once you are in the shell, create a new database, and a new user with the password:

CREATE DATABASE piwigo;
CREATE USER 'piwigo'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON piwigo.* TO 'piwigo'@'localhost';
FLUSH PRIVILEGES;

Replace password with a strong password that you will remember.

Finally, exit the MariaDB shell by running the following command:

exit

Step 4: Download and Install Piwigo

Download the latest version of Piwigo from the official website https://piwigo.org/download/. You can use the following command to download the archive:

sudo curl -O https://piwigo.org/download/pwg54.tgz

Extract the archive in the /var/www/html/ directory, and set up the correct permissions:

sudo tar -xzf pwg54.tgz -C /var/www/html/
sudo chown -R nginx:nginx /var/www/html/gallery/

Step 5: Configure Nginx

Create a new virtual host configuration file for Piwigo:

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

Add the following content to the file:

server {
    listen 80;
    server_name your-domain-name-or-ip-address;
    root /var/www/html/gallery;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/run/php-fpm/www.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

Replace your-domain-name-or-ip-address with your domain name or IP address.

Save and close the file.

Restart Nginx to apply the changes:

sudo systemctl restart nginx

Step 6: Configuration Piwigo

Open your web browser and navigate to your domain name or IP address. You should see the Piwigo installation page.

Follow the installation wizard and configure Piwigo according to your needs. Provide the following MariaDB settings:

Replace password with the password you have set in step 3.

Once the installation is complete, Piwigo is ready to use.

Conclusion

In this tutorial, you have learned how to install Piwigo on Fedora CoreOS latest version. Piwigo is an excellent tool for creating photo galleries, and it's easy to install on Fedora CoreOS. Remember to keep your Piwigo and Fedora CoreOS instance up-to-date with the latest security patches.

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!