CentOS5上安装AMP--经过验证的

1.  CentOS 5 系统安装时候安装的组件:
@editors
@legacy-software-development
@chinese-support
@development-tools
 
2.   安装前准备:
yum install -y libxml2-devel openssl-devel curl curl-devel libjpeg-devel libpng-devel freetype-devel wget  crontabs  vixie-cron  ntp  unzip openldap-devel libtool-ltdl*
 
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.0-1.el5.rf.i386.rpm
 
rpm �Civh rpmforge-release-0.5.0-1.el5.rf.i386.rpm

3.  安装libiconv
wget http://blog.s135.com/soft/linux/nginx_php/libiconv/libiconv-1.13.1.tar.gz
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/usr/local
make
make install
 
4.  安装libmcrypt:
wget http://blog.s135.com/soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gz
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
 
5. 安装mhash:
wget http://blog.s135.com/soft/linux/nginx_php/mhash/mhash-0.9.9.9.tar.gz
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config

6.  安装mcrypt
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install

7. 安装apache:
./configure --prefix=/usr/local/apache2 \
--enable-so \
--enable-headers \
--enable-expires \
--enable-rewrite

 
make
make install
 
8. 安装mysql:
yum install -y mysql-server mysql-devel
 
9. 安装php:
wget http://blog.s135.com/soft/linux/nginx_php/php/php-5.2.14.tar.gz

tar zxvf php-5.2.14.tar.gz
cd php-5.2.14
./configure \
--prefix=/usr/local/php5 \
--with-config-file-path=/usr/local/php5/etc \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-iconv-dir=/usr/local \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-discard-path \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--with-curlwrappers \
--enable-mbregex \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-ldap \
--with-ldap-sasl \
--with-xmlrpc \
--enable-zip \
--enable-soap

make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-dist /usr/local/php5/etc/php.ini
 
10 . 在apache的httpd.conf文件中添加:
Addtype application/x-httpd-php .php .phtml   
Addtype application/x-httpd-php-source .phps
 
11. 编辑phpinfo.php文件
<?php phpinfo(); ?>
访问phpinfo.php文件,是否支持php
 
12.  安装zend
 
 
 
 
 
 
 

 

你可能感兴趣的:(centos,职场,lamp,休闲,amp)