How to Install Piwigo on Linux Mint
Piwigo is an open-source photo gallery software that is primarily used by organizations, schools, photographers, and individuals to showcase and share their images online. It is easy to install and configure on various Linux distributions like Linux Mint. In this tutorial, we will guide you on how to install Piwigo on Linux Mint.
Prerequisites
- A running Linux Mint system
- A web server (Nginx or Apache)
- PHP 7.1 or higher installed
- A MySQL database server installed
- Access to the terminal
Step 1 - Install LAMP Stack
Before installing Piwigo, we need to install the LAMP stack, which is a collection of open-source software packages commonly used to enable a web server to host dynamic websites and web apps. You can install the LAMP stack on Linux Mint by following the steps below:
sudo apt update
sudo apt install nginx
sudo apt install mysql-server
sudo apt install php7.4 php7.4-fpm php7.4-mysql php7.4-gd php7.4-curl php7.4-json php7.4-mbstring php7.4-intl php-imagick
After installing the LAMP stack, start the services and enable them to start on boot by running the following commands:
sudo systemctl start nginx
sudo systemctl start mysql
sudo systemctl start php7.4-fpm
sudo systemctl enable nginx
sudo systemctl enable mysql
sudo systemctl enable php7.4-fpm
Step 2 - Create a MySQL Database and User
To create a MySQL database and user for Piwigo, log in to your MySQL server by running the following command:
sudo mysql -u root -p
After logging in, create a new database by running the following command:
CREATE DATABASE piwigo;
Next, create a new user and grant privileges to the previously created database by running the following commands:
CREATE USER 'piwigo_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON piwigo.* TO 'piwigo_user'@'localhost';
FLUSH PRIVILEGES;
Make sure to replace your_password with a strong password that you can remember.
Step 3 - Download Piwigo
Download the latest version of Piwigo by running the following command:
sudo wget -O piwigo.zip http://piwigo.org/download/dlcounter.php?code=latest
After downloading, unzip the file by running the following command:
sudo unzip piwigo.zip -d /var/www/html/
This command will extract the Piwigo files to the /var/www/html/piwigo/ directory.
Step 4 - Configure Piwigo
Open your web browser and enter the URL http://localhost/piwigo/ to start the Piwigo installer. Follow the on-screen prompts to configure the installation. Make sure to select MySQL as the database type and enter the following database details:
- Database name:
piwigo - Database user:
piwigo_user - Database password:
your_password
After the configuration is complete, you can log in to your Piwigo installation by entering the default login credentials:
- Username:
Admin - Password:
AdminPassword
Step 5 - Secure Your Piwigo Installation
After finishing the installation, it is essential to secure your Piwigo installation by doing the following:
- Change the default login credentials immediately.
- Enable HTTPS to encrypt the data communication between the web server and visitors' browsers.
- Keep your Piwigo installation up to date with the latest security patches by regularly checking for software updates.
Congratulations! You have successfully installed Piwigo on your Linux Mint system. You can now start uploading your images and creating albums to share with your audience.