首先先在Linux上安装相应的库文件
yum install -y pcre pcre-devel apr apr-devel libxml2-devel bzip2 bzip2-devel libpng libpng-devel freetype freetype-devel libcurl-devel libjpeg-devel libtool-ltdl-devel
MySQL安装部分
mysql
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-x86_64-glibc23.tar.gz
tar zxvf mysql-5.1.73-linux-x86_64-glibc23.tar.gz
mv mysql-5.1.73-linux-x86_64-glibc23 /usr/local/mysql
useradd -s /sbin/nologin mysql
cd /usr/local/mysql
mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
安装Apache
wget http://www.lishiming.net/data/attachment/forum/httpd-2.2.24.tar.bz2
httpd-2.2.24.tar.bz2
tar jxvf httpd-2.2.24.tar.bz2
cd httpd-2.2.24
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared
make && make install
php 安装
cd /usr/local/src
wget http://cn2.php.net/distributions/php-5.3.27
tar zxvf php-5.3.27.tar.gz cd php-5.3.27
./configure --prefix=/usr/local/php
make && make install
cp php.ini-production /usr/local/php/etc/php.ini
AddType application/x-httpd-php .php
<Directory />
Options FollowSymLinks
DirectoryIndex index.html index.htm index.php
ServerName localhost:80
/usr/local/apache2/bin/apachectl start
本文出自 “8653294” 博客,请务必保留此出处http://8653294.blog.51cto.com/8643294/1744953
原文:http://8653294.blog.51cto.com/8643294/1744953