yum -y install openssl openssl-devel curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel pcre pcre-devel libxslt libxslt-devel bzip2 bzip2-devel
yum install -y gmp gmp-devel
yum install -y readline readline-devel
wget
使用tar -xf 解壓
解壓後進入解壓好的php目錄,開始執行下面的命令
./configure \
--with-config-file-path=/etc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-soap \
--with-libxml-dir \
--with-xmlrpc \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-pcre-regex \
--with-sqlite3 \
--with-zlib \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--with-cdb \
--enable-dom \
--enable-exif \
--enable-fileinfo \
--enable-filter \
--with-pcre-dir \
--enable-ftp \
--with-gd \
--with-openssl-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-gettext \
--with-gmp \
--with-mhash \
--enable-json \
--enable-mbstring \
--enable-mbregex \
--enable-mbregex-backtrack \
--with-libmbfl \
--with-onig \
--enable-pdo \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-zlib-dir \
--with-pdo-sqlite \
--with-readline \
--enable-session \
--enable-shmop \
--enable-******xml \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-libxml-dir \
--with-xsl \
--enable-zip \
--enable-mysqlnd-compression-support \
--with-pear \
--enable-opcache
echo $?
如果輸出0 就證明沒有錯誤
make
echo $?
如果輸出0 就證明沒有錯誤
make install
報錯:cp php.ini-development /etc/php.ini
vi /etc/profile
export path
執行命令使得改動立即生效
source /etc/profile
centos編譯安裝PHP7
在php.net中找到最新穩定版php原始碼 這裡我選擇了最新版php 7.1.9 wget php.tar gz net get php 7.1 9.tar gz from this mirror tar xzvf php.tar gzcd php 2 配置php 解壓了php原始碼之後,我們需要...
centos安裝php7編譯
centos7下安裝php7 php7 centos7 安裝php7 首先安裝一些必須的依賴,這裡就不闡述了,後面文章再細說 yum install y gcc c autoconf centos源不能安裝libmcrypt devel,由於版權的原因沒有自帶mcrypt的包 有兩種方法解決,一種是...
centos編譯安裝php7
1,安裝依賴包 yum y install libxml2 libxml2 devel openssl openssl devel bzip2 bzip2 devel libcurl libcurl devel libjpeg libjpeg devel libpng libpng devel fr...