centos php 5.4 安装教程插图

推荐:《PHP视频教程

centos7 安装php5.4.45

安装php5.4.45依赖

yum install gcc -y
yum install libicu-devel -y 
yum install glibc-headers -y
yum install gcc-c++  -y
yum install -y epel-release
yum  install  php-mcrypt  libmcrypt  libmcrypt-devel

两个不能一起安装,因为CentOs6默认的yum源没有 libmcrypt-devel这个包,只能借助epel的yum源,所以先安装epel,再安装

libmcrypt。

./configure --prefix=/usr/local/php54 --with-config-file-path=/usr/local/php54/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-intl --with-xsl

make clean && make && make install

centos php 5.4 安装教程
—–文章转载自PHP中文网如有侵权请联系admin#tyuanma.cn删除

云服务器推荐