Overview: If you take a lot of photos, where do you keep them? Picasa and iPhoto are nice, but they are not good for sharing. Flickr is nice but there is no privacy, Picasa Web Albums are nice but won't let you store all your 50,000 photos. So what do you do? Gallery! (and I like to run it on Gentoo.) So here's how to set up a standalone server running gallery on gentoo. Install GentooFollowing Gentoo Quick Start Docgrep bogo /proc/cpuinfo bogomips : 6004.53 b ogomips : 6000.36 hdparm -tT /dev/sda /dev/sda: Timing cached reads: 3524 MB in 2.00 seconds = 1761.72 MB/sec Timing buffered disk reads: 172 MB in 3.02 seconds = 56.89 MB/sec grep MemTotal /proc/meminfo MemTotal: 1026360 kB # setup disks: # view and delete old drive partitions p d (1-#) all the drives # create new drives p n, p, 1, [enter], +32M #boot n, p, 2, [enter], +1024M #swap n, p, 3, [enter], [enter] #root t, 2, 82 #set swap drive to swap type a, 1 #set boot to bootable w #write changes Disk /dev/sda: 250.0 GB, 250058301440 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 5 40131 83 Linux /dev/sda2 6 130 1004062+ 82 Linux swap / Solaris /dev/sda3 131 30401 243151807+ 83 Linux
mke2fs /dev/sda1 mke2fs -j /dev/sda3 mkswap /dev/sda2 && swapon /dev/sda2
mount /dev/sda3 /mnt/gentoo mkdir /mnt/gentoo/boot mount /dev/sda1 /mnt/gentoo/boot cd /mnt/gentoo Code Listing 2.11: Set the date and UTC tim date 081012172010 (Format is MMDDhhmmYYYY) Code Listing 2.12: Download a stage3 archive wget ftp://distfiles.gentoo.org/pub/gentoo/releases/x86/current-stage3/stage3-i686-*.tar.bz2 time tar xjpf stage3* Code Listing 2.14: Download the latest Portage snapshot cd /mnt/gentoo/usr wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 time tar xjf portage-lat* Code Listing 2.16: Chroot cd / mount -t proc proc /mnt/gentoo/proc mount -o bind /dev /mnt/gentoo/dev cp -L /etc/resolv.conf /mnt/gentoo/etc/ chroot /mnt/gentoo /bin/bash env-update && source /etc/profile Code Listing 2.17: Setting your timezone root=/dev/ram0 init=/linuxrc real_root=/dev/sda3 splash=verbose /boot/kernel-genkernel-x86-2.6.34-gentoo-r1 # * Please specify /boot/kernel-2.4.20-gentoo-r8 # and /boot/initrd-2.4.20-gentoo-r8
/dev/sda1 /boot ext2 noauto,noatime 1 2
TIMEZONE="EST"
#EDITOR="/bin/nano" EDITOR="/usr/bin/vim" #EDITOR="/usr/bin/emacs" Code Listing 2.25: Install a syslogger and a cron daemon default 0 timeout 10 root=/dev/ram0 init=/linuxrc real_root=/dev/sda3 splash=verbose title Gentoo root (hd0,0) kernel /boot/kernel root=/dev/sda3
root (hd0,0) setup (hd0) quit Code Listing 2.30: Reboot Cleanup of Install:Code Listing 2.33: Use mirrorselect and set MAKEOPTS Install Apps:Install Gallery
enter new db root password: (see root dir) Then start up mysql and create the Gallery DB
Configure Gallerybrowse to http://192.168.1.10/gallery and follow instructions. When prompted by the webpage, add the key in the gallery dir
Create the gallery picture directory in
Enter the config file
and secure the config file
|