Apache::Gallery

官方網站:http://apachegallery.dk
這裡用的環境: WhiteBox Enterprise Linux 3.0
安裝:
以管理者權限登入 Linux, 確定有安裝 perl-CPAN, 一般預設都會裝進去.
接著,確定 mod_perl, imlib2, xfree86-devel 都有裝進去.
執行 cpan, 依序輸入
install URI::Escape
install Image::Info
install Image::Size
install Text::Template
install CGI
install Image::Imlib2
install Apache::Gallery
都安裝完以後,其實已經快要大功告成.
接著:
1. 到 /etc/httpd/conf.d/ 下新增一個 gallery.conf, 似乎只能以 virtual host 的方式存在,我試了其他方式,試不出來~~ =_=

<VirtualHost *>
  ServerName gallery.yourdomain.org
  DocumentRoot /data/pictures/
  ErrorLog logs/gallery-error_log
  TransferLog logs/gallery-access_log
  PerlSetVar GalleryTemplateDir ‘/usr/local/apache/gallery/templates’
  PerlSetVar GalleryInfo ‘Picture Taken => DateTimeOriginal, Flash => Flash’
  PerlSetVar GallerySizes ‘640 1024 1600 2272’
  PerlSetVar GalleryThumbnailSize ‘100×75’
  PerlSetVar GalleryCopyrightImage ‘htdocs/c.png’
  PerlOptions +GlobalRequest
  <Location />
    SetHandler modperl
    PerlResponseHandler Apache::Gallery
  </Location>
</VirtualHost>

2. 切換到 ~/.cpan/build/Apache-Gallery-0.8
把 templates/default 下的東西複製到 /usr/local/apache/gallery/templates
把 templates/default/gallery.css 複製到 /data/pictures/
把 htdoc 複製到 /var/www/icons 下,並更名為 gallery
3.更新 /etc/httpd/conf/httpd.conf, 把有關 autoindex 模組的部分都註解掉
LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so
….這裡蠻多的….慢慢試~~
4.把你的照片複製到 /data/pictures/
5.重新啟動 httpd, 然後在你的瀏覽器上輸入 http://gallery.yourdomain.org, 應該就可以看到相簿了~~
不過很可惜….我沒有成功….我一直遇到

Image::Imlib2 load error: No loader for file format

這個錯誤~~
~_~, 可能是 imlib2 有問題吧~~
決定還是另覓相簿軟體~~