提前安装准备
yum groupinstall "개발 도구"
yum install -y gcc gcc-c++ autoconf libjpeg libjpeg -devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses 컬 컬-개발 openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel
구성 配置
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-fpm --with-curl --with-openssl - -enable-mbregex --with-mysql --with-mysqli --with-mysql-sock --enable-pdo --with-pdo-mysql --with-pdo-sqlite --enable-mysqlnd --with-gd --enable-gd-native-ttf --enable-exif --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/png --with-freetype-dir= /usr/local/freetype --enable-gd-jis-conv --with-gettext --with-zlib --enable-zip --with-bz2 --disable-fileinfo --enable-xmlreader --enable-xmlwriter --with-xmlrpc --enable-mbstring --enable-inline-optimization
复system配置文件
cp php.ini -development /usr/local/php/lib/php.ini
date.timezone =Asia/Shanghai
출판적问题 php안전出现죄송합니다. apxs를 실행할 수 없습니다. ***错误解决방법
打开Apache的apxs 文件
讲第一行文件 #!/replace/with/path/to/perl/interpreter -w
替换成 #!/usr/bin/perl -w
保存继续编译即可
시간대 아시아/상하이
以上就介绍了 CentOS 编译安装php56, 包括了方面的内容, 希望对PHP教程有兴趣的朋友有所帮助.