参考LAMP的方法来搭建,
yum -y install httpd
yum -y install mysql mysql-server
安装Libmcrypt mcrypt,h 下载包
cd /usr/local/src
wget sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd /usr/local/src/libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make
make install
安装mcrypt
./configure --with-libmcrypt-prefix=/usr/local/libmcrypt && make && make install
vi /etc/php.ini 最后一行加上:
extension=mcrypt.so
查看extension_dir 的位置,并将mcrypt.so copy 到该位置
cd /etc/php.d/
echo "extension=mcrypt.so" >mcrypt.ini
yum -y install php php-mysql php-xml php-cli php-soap php-ldap php-devel php-pear
/usr/bin/mysql_install_db
# pear install pecl/json
# cd /etc/php.d
# echo "extension=json.so" > json.ini
# service httpd restart
用epel源安装的话,mcrypt也有rpm包,不用再编译
|