Piwigo - Create Your Own Photo Gallery Website

Channel: Open Source Linux
Abstract: grant Apache user full privileges to webroot files and list the content of your web server document root path. # cp -rf piwigo/* /var/www/html/we’ll l

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 500) 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 require an RDBMS database backend, such as MySQL database.

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 the CentOS system.

Demo URL: http://piwigo.org/demo/
Requirements:
  1. A dedicated VPS with a registered domain name.
  2. A CentOS 7 Server or CentOS 8 with Minimal install.
  3. A LAMP stack installed in CentOS 7 or CentOS 8.

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 up to 40% OFF on hosting. 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 8/7 VPS server.

Setting Up Pre-requirements for Piwigo

1. After you’ve installed the 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 php-mysqli

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 the MySQL database and execute the below command in order to create a 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 and edit the 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

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

# systemctl restart httpd

5. Next, we need to apply the SELinux security context to allow apache to write into Piwigo web root directory /var/www/html using the following commands.

# yum install policycoreutils-python-utils
# semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
# restorecon -R -v /var/www/html
Install Piwigo in CentOS 8/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 the download completes, extract the 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

7. After you’ve extracted the zip archive, copy Piwigo sources files into your domain webroot path by issuing the below command. Afterward, grant Apache user 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

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

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 the Start installation button to install Piwigo.

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

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 steps required to upload your photos and use the Piwigo image gallery.

Start Piwigo Tour 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

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

Ref From: tecmint

Related articles