# groupadd mysql
# useradd -g mysql mysql
# cd /usr/local/src **源文件存放目录
# tar zxvf mysql-max-5.0.21-linux-i686-glibc23.tar
# mv mysql-max-5.0.21-linux-i686-glibc23 /usr/local/mysql
# cd /usr/local/mysql
# .scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &让Mysql数据库服务器随Linux系统启动时自动加载:
# cd /usr/local/src
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700/etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
3.2 安装Apach Web服务器软件
# cd /usr/local/src
# tar zxvf httpd-2.2.4.tar.gz
# cd httpd-2.2.4# ./configure --prefix=/usr/local/apache
# make
# make install
# echo "/usr/local/apache/bin/apachectl start">>/etc/rc.local(系统启动时服务自动启动)
3.3 安装PHP GD库组件
# cd /usr/local/src
# wget -c http://download.discuz.net/gdinstaller.tar.gz # tar xzvf gdinstaller.tar.gz
# cd GDInstaller
# ./install.sh
3.4 安装PHP 5.2.1 安装包:
# cd /usr/local/src
# wget -c http://download.discuz.net/php-5.1.2.tar.gz # tar xjvf php-5.2.1.tar.gz
# cd php-5.2.1# ./configure --prefix=/usr/local/apache/php --with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib-dir --with-bz2 --with-tiff-dir --with-libxml-dir --with-gd \
--with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring \
--with-mysql=/usr/local/mysql --with-config-file-path=/etc --disable-ipv6 \
--enable-gd-native-ttf --enable-ftp --enable-zip --enable-ldap --enable-mbregex \
--enable-calendar --enable-curl --disable-debug --enable-inline-optimization
# make
# make install
# cp php.ini-dist /etc/php.ini
编辑apache配置文件httpd.conf
# vi /etc/httpd/httpd.conf