{"id":121,"date":"2013-12-08T21:46:50","date_gmt":"2013-12-08T20:46:50","guid":{"rendered":"http:\/\/www.emperial.dk\/?p=121"},"modified":"2014-05-16T00:14:49","modified_gmt":"2014-05-15T22:14:49","slug":"installing-apachegallery","status":"publish","type":"post","link":"https:\/\/www.emperial.dk\/?p=121","title":{"rendered":"Installing Apache::Gallery"},"content":{"rendered":"<p>This is a step by step guide for installing <a href=\"http:\/\/apachegallery.dk\/\" title=\"http:\/\/apachegallery.dk\/\" target=\"_blank\">Apache::Gallery<\/a> (libapache-gallery-perl) on Debian, this will possible also work for Ubuntu.<\/p>\n<p>The system i did the installation on was a Debian 7 (Wheezy).<\/p>\n<p>First lets install the basic packages:<br \/>\nfirst install Apache 2:<\/p>\n<pre>aptitude install apache2<\/pre>\n<p>Now for perl:<\/p>\n<pre>aptitude install libapache2-mod-perl2<\/pre>\n<p>now for Image::Imlib2:<\/p>\n<pre>aptitude install libimage-imlib2-perl<\/pre>\n<p>Finaly install Apache:Gallery:<\/p>\n<pre>aptitude install libapache-gallery-perl<\/pre>\n<p>now make the apache config for the new gallery site, in my case i addet a virtual host to my apache config:<\/p>\n<p>i choose to use the \/var\/www\/gallery as the place for my photos, feel free to use any other place.<\/p>\n<p>Now for the apache config, this is straight forward, if in trouble look at this link: <a title=\"Hosting multiple websites with Apache2\" href=\"http:\/\/www.debian-administration.org\/articles\/412\" target=\"_blank\">debian-administration.org<\/a><\/p>\n<pre>&lt;VirtualHost *:80&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ServerName\u00a0\u00a0 testserver01.some.com\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DocumentRoot \/var\/www\/gallery\/\u00a0 #&lt;----- make sure this directory is readable by www-data\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ErrorLog\u00a0\u00a0\u00a0\u00a0 \/var\/log\/gallery-error_log\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TransferLog\u00a0 \/var\/log\/gallery-access_log\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PerlSetVar\u00a0\u00a0 GalleryTemplateDir '\/usr\/share\/libapache-gallery-perl\/templates\/default'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PerlSetVar\u00a0\u00a0 GalleryInfo 'Camera =&gt; Model, Picture Taken =&gt; DateTimeOriginal, Flash =&gt; Flash, ShutterSpeed =&gt; ShutterSpe$\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PerlSetVar\u00a0\u00a0 GallerySizes '640 1024 1600 2272'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PerlSetVar\u00a0\u00a0 GalleryThumbnailSize '100x75'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;Location \/&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SetHandler\u00a0 perl-script\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PerlHandler Apache::Gallery\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/Location&gt;\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>restart apache with:<\/p>\n<pre>\/etc\/init.d\/apache2 restart<\/pre>\n<p>Apache:gallery will properly generate a error looking something like this (look at \/var\/log\/gallery-error_log):<\/p>\n<pre>unable to writhe to \/var\/cache\/www\/testserver01.some.com<\/pre>\n<p>make the directory and make sure www-data have writing access.<\/p>\n<p>Now for the gallery.css file.<br \/>\nPlace gallery.css in the gallery root directory (in this example \/var\/www\/gallery)<\/p>\n<p>use this code for the css style:<\/p>\n<pre>body {\r\n\u00a0\u00a0 \u00a0background-color: #cccccc;\r\n\u00a0\u00a0 \u00a0font-family: Verdana, Lucida, Arial;\r\n\u00a0\u00a0 \u00a0font-size: 10px;\r\n\u00a0\u00a0 \u00a0margin-left: 10px;\r\n\u00a0\u00a0 \u00a0margin-top: 10px;\r\n\u00a0\u00a0 \u00a0text-align: center;\r\n}\r\ntd {\r\n\u00a0\u00a0 \u00a0font-size: 10px;\r\n}\r\ntable {\r\n\u00a0\u00a0 \u00a0margin-left: auto;\r\n\u00a0\u00a0 \u00a0margin-right: auto;\r\n}\r\n#menu {\r\n\u00a0\u00a0 \u00a0font-size: 11px;\r\n\u00a0\u00a0 \u00a0text-align: left;\r\n\u00a0\u00a0 \u00a0height: 30px;\r\n}\r\n#nav {\r\n\u00a0\u00a0 \u00a0font-size: 11px;\r\n\u00a0\u00a0 \u00a0text-align: left;\r\n\u00a0\u00a0 \u00a0height: 30px;\r\n\u00a0\u00a0 \u00a0text-align: right;\r\n}\r\n#directory {\r\n\u00a0\u00a0 \u00a0background-color: #ffffff;\r\n\u00a0\u00a0 \u00a0border: 1px solid #666666;\r\n\u00a0\u00a0 \u00a0padding: 20px;\r\n\u00a0\u00a0 \u00a0text-align: left;\r\n\u00a0\u00a0 \u00a0top: 0px;\r\n}\r\n#folder {\r\n\u00a0\u00a0 \u00a0float: left;\r\n\u00a0\u00a0 \u00a0height: 100px;\r\n\u00a0\u00a0 \u00a0padding: 2px;\r\n\u00a0\u00a0 \u00a0text-align: center;\r\n\u00a0\u00a0 \u00a0width: 120px;\r\n}\r\n#picture img {\r\n\u00a0\u00a0 \u00a0border: 1px solid #000000;\r\n}\r\na {\r\n\u00a0\u00a0 \u00a0color: #5555aa;\r\n}\r\na img {\r\n\u00a0\u00a0 \u00a0border: 2px solid #5555aa;\r\n}\r\na:hover {\r\n\u00a0\u00a0 \u00a0color: #ff9400;\r\n}\r\na:hover img {\r\n\u00a0\u00a0 \u00a0border: 2px solid #ff9400;\r\n}\r\n#folder img {\r\n\u00a0\u00a0 \u00a0border: 0px;\r\n}\r\n.info {\r\n\u00a0\u00a0 \u00a0background-color: #eeeeee;\r\n\u00a0\u00a0 \u00a0border: 1px dashed #888888;\r\n\u00a0\u00a0 \u00a0color: #666666;\r\n\u00a0\u00a0 \u00a0font-size: 10px;\r\n\u00a0\u00a0 \u00a0margin: 10px;\r\n\u00a0\u00a0 \u00a0padding: 5px;\r\n}<\/pre>\n<p>make the following directory \/usr\/share\/apache2\/icons\/gallery and copy the icons from \/usr\/share\/libapache-gallery-perl\/icons to the new directory<\/p>\n<p>restart Apache.<\/p>\n<p>there you have it there should be a working gallery now \ud83d\ude42<\/p>\n<p>remember to add some photos to the new gallery<\/p>\n<p>more info can be found at <a href=\"http:\/\/apachegallery.dk\/\" title=\"http:\/\/apachegallery.dk\/\" target=\"_blank\">http:\/\/apachegallery.dk\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a step by step guide for installing Apache::Gallery (libapache-gallery-perl) on Debian, this will possible also work for Ubuntu. The system i did the installation on was a Debian 7 (Wheezy). First lets install the basic packages: first install &hellip; <a href=\"https:\/\/www.emperial.dk\/?p=121\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,4],"tags":[46,12,16],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","tag-debian","tag-linux-2","tag-servers"],"_links":{"self":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":5,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":126,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions\/126"}],"wp:attachment":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}