Tag Archives: Pygmyfoto

Publishing Photos with the Raspberry Pi and Pygmyfoto

You have tons of photos, which you would like to share with your acquaintances, loved ones and so on. Well, there are several sites on the web that will allow you to do so, but doing it through your own server has a separate charm. Additionally, if that server can be put up with the new Raspberry Pi you just bought, then the project takes on a whole different hue altogether.

Although your Raspberry Pi (RBPi) is completely capable of doubling up as a web-server and sharing photos on the web, most of the popular photo publishing applications, such as Piwigo, Gallery, etc., are heavyweights meant for the PC. For publishing your photos online through RBPi, a lightweight entity such as Pygmyfoto is a better choice. Not only can you publish your photos in a continuous roll, Pygmyfoto allows you to add a brief description and assign tags to your photos. In addition, Pygmyfoto displays key EXIF data after automatically processing the photos.

Now the viewer has all information of the exposure, aperture and ISO you used when you clicked the photo. Not only this, Pygmyfoto also adds a link to the photo’s full size version, along with a map URL. Now, if your photo was geotagged, the URL will allow the viewer to use OpenStreetMap service to view the exact place where you had clicked the photo.

When you need simple photo sharing without the unnecessary extras, bells and whistles of more advanced blogging platforms, Pygmyfoto may be more suited to your needs. Since it is open-source, you can tweak it to meet the requirements of even the simplest of hardware. Pygmyphoto is meant to be simple, and if you find something you need is missing, well, you can program it in.

So, how do you install Pygmyfoto on an RBPi? First, you need some required packages to be installed. For this, set up your RBPi to run the following command:

sudo apt-get install apache2 php5 sqlite3 php5-sqlite imagemagick libimage-exiftool-perl git

Now you must switch to the directory /var/www and clone the repository of the Pygmyfoto GitHub:

sudo git clone https://github.com/dmpop/pygmyfoto.git

Now change the directory’s owner and group with:

sudo chown www-data:www-data -R pygmyfoto

Switch to the Pygmyphoto directory and use a text editor to open phpliteadmin.config.php. Replace the default password by editing the line –

$password = “admin”

Modify the default values in the file config.php, if necessary.

Now you can add photos to the directory pygmyphoto/photos. Run the ./pygmyphoto.sh command in a terminal, and provide the required into.

The viewer must point their browser to http://127.0.0.1/pygmyphoto to view your photos. Of course, they must replace the 127.0.0.1 with the IP address or the domain name of your server.

For accessing and managing your database at pygmyphoto.sqlite, you must make it writable. Use the command:

sudo chmod 600 pygmyphoto.sqlite

Now, you can point your browser to http://127.0.0.1/pygmyfoto/phpliteadmin.php and log in. you must use the password you specified in the file phpliteadmin.config.php earlier. Do not forget to replace the 127.0.0.1 with the IP address or the domain name of your server.