Piwigo – Create Your Own Photo Gallery Website

Piwigo is an open source project which allows you to create your own photo gallery on the web and upload photos and create new albums. The platform includes some powerful features built-in, such as...

Piwigo is an open source project which allows you to create your own photo gallery on the web and upload photos and create new albums. The platform includes some powerful features built-in, such as albums, tags, watermark, geolocation, calendars, system notifications, access control levels, themes and statistics.

Piwigo has a huge amount of available plugins (over 200) and a great collection of themes. It is also translated in more than 50 languages. Its core functions are written in PHP programming language and requires a RDBMS database backend, such as MySQL database.

Piwigo Photo Gallery

Piwigo Photo Gallery

This fact makes it easy to deploy Piwigo on top of a LAMP (Linux, Apache, MySQL and PHP) stack installed on your own server, VPS or on shared hosted environments.

An online demo is available for you to try before installing Piwigo on CentOS system.

Demo URL: http://piwigo.org/demo/

Requirements:

  1. A dedicated VPS with a registered domain name
  2. A CentOS 7 Server with Minimal Install
  3. LAMP stack installed in CentOS 7


Piwigo is an open source project which can be deployed on a VPS server of your choice.

You can get a 2GB RAM VPS from Linode for $10, but it’s unmanaged. If you want a Managed VPS, then use our new BlueHost Promotion Offer, you will get upto 40% OFF on hosting with one Free Domain for Life. If you get a Managed VPS, they will probably install Piwigo for you.

In this guide we’ll learn how to install and configure Piwigo image gallery software on top of a LAMP stack in a CentOS 7 VPS server.

Setting Up Pre-requirements for Piwigo

1. After you’ve installed LAMP stack on your VPS by following the guide in the article description, make sure you also install the below PHP extensions required by Piwigo to properly run on your server.

# yum install php php-xml php-mbstring php-gd

2. Next, install the following command line utilities on your VPS server in order to download and extract Piwigo archive sources in your system.

# yum install unzip zip wget 

3. Next, log in to MySQL database and execute the below command in order to create Piwigo database and the user which will be used to manage the database. Replace the database name and credentials used in this tutorial with your own settings.

# mysql -u root -p
MariaDB [(none)]> create database piwigo;
MariaDB [(none)]>grant all privileges on piwigo.* to 'piwigouser'@'localhost' identified by 'pass123';
MariaDB [(none)]>flush privileges;
MariaDB [(none)]>exit

4. Next, open end edit PHP configuration file and set the correct timezone settings for your server. Use PHP docs to get the timezone settings list.

# nano /etc/php.ini

Locate and Insert the below line after [Date] statement.

date.timezone = Europe/Your_city
Set Timezone in PHP Configuration

Set Timezone in PHP Configuration

Save and close the file and restart Apache HTTP server to apply all changes, by issuing the below command.

# systemctl restart httpd

5. Next, completely disable SELinux in your CentOS system by executing the below commands. Use cat command to show Selinux configuration file.

# cat /etc/selinux/config # sed -i.backup 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config # cat /etc/selinux/config # setenforce 0
# getenforce
Disable SELinux in CentOS 7

Disable SELinux in CentOS 7

Install Piwigo in CentOS 7

6. On the next step, visit Piwigo official download page and grab the latest installer zip sources on your system using wget utility by issuing the below command. After download completes, extract Piwigo zip archive in your current working directory.

# wget http://piwigo.org/download/dlcounter.php?code=latest -O piwigo.zip
# ls # unzip piwigo.zip 
Download Piwigo Software

Download Piwigo Software

7. After you’ve extracted the zip archive, copy Piwigo sources files into your domain webroot path by issuing the below command. Afterwards, grant Apache account full privileges to webroot files and list the content of your web server document root path.

# cp -rf piwigo/* /var/www/html/
# chown -R apache:apache /var/www/html/
# ls -l /var/www/html/
Setting Up Piwigo Under Apache

Setting Up Piwigo Under Apache

8. Next, change the webroot file permissions for Piwigo installed files and grant _data directory full write permissions for other system users, by issuing the below commands.

# chmod -R 755 /var/www/html/
# chmod -R 777 /var/www/html/_data/
# ls -al /var/www/html/
Setting Permissions on Piwigo

Setting Permissions on Piwigo

9. Now, start the installation process of Piwigo. Open a browser and navigate to your server IP address or domain name.

http://192.168.1.164
OR
http://your-domain.com

On the first installation screen, select Piwigo language and insert MySQL database settings: host, user, password and table prefix. Also, add a Piwigo admin account with a strong password and the email address of the admin account. Finally, hit on Start installation button to install Piwigo.

Piwigo Installation Configuration

Piwigo Installation Configuration

10. After the installation has been completed, hit on Visit the gallery button in order to be redirected to Piwigo admin panel.

Piwigo Installation Completed

Piwigo Installation Completed

11. On the next screen, because no image has been uploaded to the server yet, hit on Start the Tour button in order to display the software guidance window and review all step required to upload your photos and use Piwigo image gallery.

Start Piwigo Tour

Start Piwigo Tour

Piwigo Admin Dashboard

Piwigo Admin Dashboard

That’s all! Now you can start creating image galleries and upload your image files to the server using one of the most flexible open source solutions to host your photos.

Piwigo Image Gallery

Piwigo Image Gallery

If you’re looking for someone to install Piwigo image gallery software, consider us, because we offer wide range of Linux services at fair minimum rates with 14-days free support via email. Request Installation Now.

Posted by wiredgorilla