首頁  >  文章  >  类库下载  >  編譯PHP筆記

編譯PHP筆記

高洛峰
高洛峰原創
2016-10-15 16:13:451247瀏覽

安裝依賴

yum -y install wget
    yum -y install gcc
    yum -y install gcc-c++
    yum -y install pcre-devel
    yum -y install zlib-devel
    yum -y install libxml2
    yum -y install libxml2-devel
    yum -y install libevent
    yum -y install libevent-devel
    yum -y install autoconf
    yum -y install libpng-devel
    yum -y install openssl-devel
    yum -y install curl
    yum -y install curl-devel
    yum -y install expat-devel
    yum -y install perl
    yum -y install perl-ExtUtils-MakeMaker
    yum -y install gettext-devel
    yum -y install zlib-devel
    yum -y install cpio
    yum -y install gettext-devel
    yum -y install bzip2-devel
    yum -y install freetype-devel
    yum -y install gmp-devel
    yum -y install php-mcrypt  libmcrypt  libmcrypt-devel

編譯參數

./configure --prefix=/opt/php --with-config-file-scan-dir=/opt/php/etc/php.d --disable-debug --with-pic --with-bz2 --with-gettext --with-gmp --enable-mbregex --enable-mbstring --with-openssl --with-zlib --with-layout=GNU --enable-exif --enable-sockets --enable-xml --with-pear --enable-fpm --with-pdo-mysql --with-curl --with-mysql --with-gd --enable-gd-native-ttf --with-mysqli --enable-soap --with-fpm-user=daemon --with-fpm-group=daemon --with-apxs2=/opt/httpd/bin/apxs --with-mcrypt --with-freetype-dir --with-libiconv-dir

注意點

1.--prefix,建議在/opt下。
2./configure過程中,根據錯誤訊息安裝相對應的依賴。
3.PHP的編譯參數可以透過./configure --help來查看,不同版本的PHP可能會有細微差異


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

相關文章

看更多