標籤:php編譯安裝
LAMP的PHP
這章我們講PHP,和fastcgi
下面連結是LAMP的AM,apache和mariadb
http://rexchow.blog.51cto.com/11619161/1886441
http://rexchow.blog.51cto.com/11619161/1886441
開始 PHP 之旅
wget http://cn2.php.net/distributions/php-5.6.29.tar.gz
##下載php包
yum install -y libxml2-dev el openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel openldap-devel
##增加相容性
tar xf php-5.6.29.tar.gz
cd php-5.6.29
#添加組groupadd www#添加php-fpm使用者useradd -c php-fpm-user -g www -M php-fpm./configure --prefix=/usr/local/php--with-libdir=lib64##如果64位作業系統,指定為/usr/lib64為預設庫路徑--enable-fpm--with-fpm-user=php-fpm--with-fpm-group=www--enable-mysqlnd--with-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--enable-opcache##PHP編譯位元組程式碼快取,如果需要將 Xdebug 擴充和 OPcache 一起使用,必須在 Xdebug 擴充之前載入 OPcache 擴充--enable-pcntl##進程式控制制,預設關閉,編譯開啟--enable-mbstring##寬字元支援--enable-soap##簡易物件存取通訊協定 (SOAP),使用xml傳輸資料,目前已經不常用--enable-zip##zip檔案處理--enable-calendar##日曆處理--enable-bcmath##任意精度數學擴充--enable-exif##(可交換影像檔格式),專門為數位相機和照片設定,記錄數位照片的屬性資訊和拍攝資料--enable-ftp--enable-intl##國際化支援--with-openssl##支援ssl加密--with-zlib--with-curl--with-gd--with-zlib-dir=/usr/lib--with-png-dir=/usr/lib--with-jpeg-dir=/usr/lib--with-gettext##語言翻譯--with-mhash##hash庫支援--with-ldap##ldap支援make && make install
./configure --prefix=/usr/local/php --with-libdir=lib64 --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=www --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-opcache --enable-pcntl --enable-mbstring --enable-soap --enable-zip --enable-calendar --enable-bcmath --enable-exif --enable-ftp --enable-intl --with-openssl --with-zlib --with-curl --with-gd --with-zlib-dir=/usr/lib --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-gettext --with-mhash --with-ldap ##複製版本
php編譯安裝及fastcgi使用