Here is how to install Drupal on a CentOS 5.4 Linux installation, hosted on http://RimuHosting.com
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime
apt-get update -y ; apt-get upgrade
MYROOTPW=xxxxxx
apt-get -y install mysql mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
mysqladmin -u root password $MYROOTPW
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables restart #and then restart
apt-get -y install httpd postfix
chkconfig --level 35 postfix on
/etc/init.d/postfix start
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
echo "<html><head><title>Server</title></head><body><h1>Name of Server</h1></body></html>" > /var/www/html/index.html
change AllowOverride to All in first two places to enable .htaccess
vi /etc/httpd/conf/httpd.conf
Visit http://severname.com to check apache is working
apt-get -y install php
change memory_limit = 40M, post_max_size = 40M, upload_max_filesize = 20M
vi /etc/php.ini
/etc/init.d/httpd restart
echo "<?php phpinfo(); ?>" > /var/www/html/testphp.php
And try visiting servername.com/testphp.php
apt-get -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc mod_auth_mysql mysql-server php-mbstring
/etc/init.d/httpd restart
ARCH=i386 #or x86_64
VER=0.5.1-1
SITE=http://packages.sw.be/rpmforge-release
wget $SITE/rpmforge-release-$VER.el5.rf.$ARCH.rpm
rpm -Uvh rpmforge-release-$VER.el5.rf.$ARCH.rpm
yum install phpmyadmin
Configuration so that phpMyAdmin allows connections not just from localhost by commenting out the block <Directory "/usr/share/phpmyadmin">
vi /etc/httpd/conf.d/phpmyadmin.conf
Change the authentication in phpMyAdmin from cookie to http by editing the following line:
vi /usr/share/phpmyadmin/config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'http';
/etc/init.d/httpd restart
Or you can install phpmyadmin from a rimu script:
wget "http://proj.ri.mu/installphpmyadmin.sh"
bash installphpmyadmin.sh
vi /etc/httpd/conf/httpd.conf
DRUSR=drupalusername DRPW=mylongdrupalpassword echo "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO '$DRUSR'@'localhost' IDENTIFIED BY '$DRPW';" | mysql -u root --password=$MYROOTPW
Use webmin to create more virtual servers, but the first virtual server created will become the default, so make it point to /var/www/html with a servername of something like sv.mysite.org
See http://rimuhosting.com/howto/virtualhosting.jsp for more details
yum -y install php-pear php-devel httpd-devel yum -y install php-pecl-apc #pecl install apc #answer yes to question echo "extension=apc.so" > /etc/php.d/apc.ini #optionally modify cache size: apc.shm_size="64" /etc/init.d/httpd restart cp /usr/share/pear/apc.php /var/www/html # and visit apc.php to test it is working cp /usr/share/php/apc.php /var/www/html # it may be here instead ln -sfn `find /usr -name "apc.php"` /var/www/html/ # or use more of a brute force method
This guide is based on information from here: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support...