The paths and URLs in this guide are examples. Be sure to replace them with the paths and URLs specific to your installation.
tar -xvzf gallery-1.5.tar.gz
chmod 0666 .htaccess config.php
chmod 0777 albums (Some filesystems, such as FAT32, do not support permissions, so you'll have to add umask=0000 to that partition's FSTAB entry and remount it).