I did it so many time in the last few days, I figured, I'd add a wiki page for it (I wish there was one before I started...) It's going to be messy (sorry), but functional. I wrote it while actually doing it yet again.
Installing Gallery2 on centos5 - 5.3
Starting off with a fresh install of Centos 5.3 on Mosso (Rackspace cloud).
We're going to install the basic dependencies first. I know it's considered bad practice, but for god's sake log in as root, so we don't have to keep elevating privileges.
Run:
yum install mysql mysql-server apache2 php php-mysql gd php-gd ImageMagick
This installs most of everything needed.
Download the preinstaller - here. Extract. Take the file called "preinstall.php", and open it as text. At the very top you'll find a $passPhrase parameter. Put something in there, just to keep on the safe side.
Upload this php file to /var/www/html. Use SSH or whatever else.
Start the services:
service httpd start service mysqld start
You probably want to change the root password on MySQL. I'm going to skip this part - but if you're going to do it, do it now (if this is a production system, you MUST do it!)
Now we'll create the blank database: mysql -uroot -p (enter your password for mysql) create database gallery2;
If you want to create a special user on MySQL that will be used for gallery2 operation, do it now.
type 'exit' to exit the mysql client
Turn off any firewall on the server (but don't forget to put it back on later on, especially if this is production) - In order to turn off the cents internal firewall:
service iptables stop
With your browser go to: http://<your server>/preinstall.php
Keep following the instructions, starting at #6 in Preinstaller instructions. It's one of the most amazing and convenient installation processes (considering it's a LAMP stack).
A few tips: