Piwigo is an open-source photo management software that allows you to organize and share your photos with ease. This tutorial will guide you through the process of installing Piwigo on Arch Linux.
Before you start installing Piwigo, make sure that you have the following requirements:
First, we need to install the required packages for Piwigo to work correctly. Open your terminal and run the following command:
sudo pacman -S apache php php-apache php-gd php-mysql mariadb
Now, we need to configure the web server to work with Piwigo. If you're using Apache, edit the /etc/httpd/conf/httpd.conf
file, and if you're using Nginx, edit the /etc/nginx/nginx.conf
file.
Add the following lines to the bottom of the file to create a new virtual host:
<VirtualHost *:80>
DocumentRoot /var/www/piwigo
ServerName yourdomain.com
</VirtualHost>
server {
listen 80;
server_name _;
root /var/www/piwigo;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php?$args;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Next, we need to create a new database for Piwigo to use. Open your terminal and run the following command to log in to the MySQL shell:
sudo mysql -u root -p
Enter your root password and then run the following commands:
CREATE DATABASE piwigo;
CREATE USER 'piwigo_admin'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON piwigo.* TO 'piwigo_admin'@'localhost';
FLUSH PRIVILEGES;
exit
Replace yourpassword
with a strong password.
Download the latest version of Piwigo from the official website using the following command:
wget https://piwigo.org/download/dlcounter.php?code=latest -O piwigo.zip
Unzip the downloaded file using the following command:
unzip piwigo.zip -d /var/www
Rename the extracted folder to piwigo
using the following command:
mv /var/www/piwigo*/ /var/www/piwigo
Change the ownership and permissions of the piwigo
folder using the following command:
chown -R http:http /var/www/piwigo
chmod -R 755 /var/www/piwigo
Open your web browser and navigate to http://yourdomain.com/piwigo
. You should see the Piwigo installation page.
Follow the on-screen instructions to complete the installation process. When prompted, enter the database details that you created earlier.
Finally, log in to the admin panel and configure your settings.
Congratulations! You have successfully installed Piwigo on Arch Linux.
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!