事先安裝準備
yum groupinstall 「開發工具」
yum jplly gcc -devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-develncurses-devel glib2 glib2-devel bzip2 bzip2-develconcursescurvelses-def-dem-de>
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
複製設定檔
複製設定檔
複製設定檔
複製設定檔
複製配置檔案
-development /usr/local/php/lib/php.ini
date.timezone =Asia/上海
替換成#!/usr/bin/perl -w
保存繼續編譯即可 時區亞洲/上海
以上就介紹了CentOS編譯安裝php56,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。