#------------------------------------------------------------------------------
# Pre Install
#------------------------------------------------------------------------------
>If apache is exists, remove it
rpm -qa httpd
rpm -e httpd-manual; rpm -e mod_ssl; rpm -e httpd
>For phpMyAdmins
rpm -Uvh libmcrypt libmcrypt-devel
#------------------------------------------------------------------------------
# httpd 2.2.8 -> /usr/local/httpd_2.2.8
#------------------------------------------------------------------------------
tar zxvf httpd-2.2.8.tar.gz
cd httpd-2.2.8
groupadd apache
useradd -g apache apache
./configure --prefix=/usr/local/httpd-2.2.8 \
--enable-so \
--enable-usertrack \
--enable-rewrite \
--enable-headers
make
make install
cd /usr/local
ln -s ./httpd-2.2.8 ./apache
#------------------------------------------------------------------------------
# Mysql standard 5.0.51a Setup
#------------------------------------------------------------------------------
groupadd mysql
useradd -g mysql mysql -M
cp mysql-5.0.51a-linux-i686.tar.gz /usr/local
cd /usr/local
tar zxvf mysql-5.0.51a-linux-i686.tar.gz
ln -s ./mysql-5.0.51a-linux-i686/ ./mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
>test mysql
bin/mysqld_safe --user=mysql &
cp support-files/my-medium.cnf /etc/my.cnf
echo "/usr/local/mysql/lib" >> /etc/ld.so.conf
ldconfig -v
service mysql start
cp support-files/mysql.server /etc/init.d/mysql
service mysql start
>Setup mysql root password
bin/mysqladmin -u root password 'password'
>Activate mysql to run at system startup
chkconfig --add mysql
#------------------------------------------------------------------------------
# PHP 5.2.5 -> /usr/local/php_5.2.5
#------------------------------------------------------------------------------
tar zxvf php-5.2.5.tar.gz
cd php-5.2.5
./configure --prefix=/usr/local/php_5.2.5 \
--with-apxs2=/usr/local/httpd-2.2.8/bin/apxs \
--with-mysql=/usr/local/mysql \
--enable-mbstring \
--with-mcrypt \
--with-pear \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-gettext
make
make test
make install
cp php-5.2.5/php.ini-recommended /usr/local/php_5.2.5/lib/php.ini
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak
vi /usr/local/apache/conf/httpd.conf
>Set User to apache
>Set Group to apache
>add index.php in DirectoryIndex
>AddType application/x-httpd-php .php
>LoadModule php5_module modules/libphp5.so
#------------------------------------------------------------------------------
# phpMyAdmin-2.11.4 -> /usr/local/apache/htdocs/phpMyAdmin-2.11.4
#------------------------------------------------------------------------------
tar zxvf phpMyAdmin-2.7.0-pl2.tar.gz -C /usr/local/apache/htdocs
cd /usr/local/apache/htdocs
ls -s phpMyAdmin-2.11.4 phpMyAdmin
cd phpMyAdmin
cp config.sample.inc.php config.inc.php
vi config.inc.php
>type in a random passphrase for this setting. The maximum length seems to be 46 characters if mcrypt is loaded.
$cfg['blowfish_secret'] = 'asdfasfasfas1234fawrfsdf'