Singleshot installation instructions
Requirements
You will need the following software installed on your web server to install Singleshot.
- Apache with mod_rewrite
- python 2.1+
- Cheetah (template engine)
- ImageMagick (we use 'convert' for resizing)
- libjpeg (required for edit mode)
Singleshot relies on setting mod_rewrite directives in .htaccess. This facility needs to be enabled on the web.
You will also need an appropriate unpacking tool (unzip or tar/gunzip) to unpack the Singleshot archive.
Definitions
- album root
- The directory that will become the root album of your new Singleshot installation. Apache needs to be configured to serve this directory.
- singleshot directory
- The directory named "singleshot" that contains all of the scripts and templates used by singleshot.
- .htaccess
- File with directives to Apache to set up permissions, rewrite rules, or other options. Singleshot comes with two of these, one for the singleshot directory and one for the album root.
Instructions
- Download and unpack Singleshot.
- Copy the "singleshot" directory in the archive to your album root.
- If your platform doesn't have /usr/bin/env (this is a common part of the operating system) you will need to edit resize.py and singleshot.py in the singleshot directory to have the correct path to python 2.1 or later. Change the first line (the one that starts with #!) to be something like /usr/local/bin/python2.2
- Copy the "root-htaccess" file to ".htaccess" in your album root.
- Make an empty directory named "view" in the album root directory. Ensure this directory is writable by the singleshot CGI script. If the CGI script is running under suEXEC, this should already be true since it will be running as your user. If not, the view directory may need to be world or group writable by the web server process.
- Update the root .htaccess file's RewriteBase to reflect the URL for that directory.
- If you installed Cheetah in your home directory, edit singleshot/albums.py and just before `import Cheetah...' add a line pointing to your install like:
sys.path.insert(0, '/home/user/lib/python');
- Create a _singleshot.cfg in the album root similar to the
following.
[singleshot] url_prefix=/pics/ ; url for the album root [paths] imagemagick=/usr/local/bin ; path to directory with ImageMagick binaries libjpegbin=/usr/local/bin ; path to directory with libjpeg binaries
- Fill your new albums with images. You can put them in the root or in subdirectories. Do not use filenames with - (dash) in them. Singleshot uses -size suffixes internally and will not be happy if your image names have similar components.
Other configuration (optional)
Additional configuration is possible, see the README that ships with singleshot for details.