首页  >  文章  >  后端开发  >  centos php 5.4 安装教程

centos php 5.4 安装教程

藏色散人
藏色散人原创
2020-10-12 10:00:332756浏览

centos php5.4安装方法:首先通过“yum install gcc -y yum install libicu-devel -y”等命令安装php5.4依赖;然后使用命令“make install”安装php5.4即可。

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@php.cn