PHP--編譯安裝

小Q:今天重新用最新版本搭建了lnmp架構(gòu),正好整合一下我博客的模塊;

創(chuàng)新互聯(lián)是專業(yè)的洪江管理區(qū)網(wǎng)站建設(shè)公司,洪江管理區(qū)接單;提供做網(wǎng)站、成都網(wǎng)站建設(shè),網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行洪江管理區(qū)網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!

1、編譯參數(shù)詳解和編譯參數(shù)安裝;

2、拷貝配置文件;

3、出的錯誤;

--------------------------------------------------------------------------------------------------------

1、編譯參數(shù)詳解和編譯參數(shù)安裝;

因為是源碼安裝,下載解壓就不說了,直接說重點;

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-MySQL=/usr/local/mysql --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear --with-zlib --enable-pdo --with-pdo-mysql --with-mysql

--with-mysqli=/usr/bin/mysql_config

make  &&  make install

--prefix=/usr/local/php
指定 php 安裝目錄 
--with-apxs2=/usr/local/apache/bin/apxs
整合 apache,apxs功能是使用mod_so中的LoadModule指令,加載指定模塊到 apache,要求 apache 要打開SO模塊
--with-config-file-path=/usr/local/php/etc               
指定php.ini位置 
--with-MySQL=/usr/local/mysql
mysql安裝目錄,對mysql的支持 
--with-mysqli=/usr/local/mysql/bin/mysql_config            
mysqli擴展技術(shù)不僅可以調(diào)用MySQL的存儲過程、處理MySQL事務(wù),而且還可以使訪問數(shù)據(jù)庫工作變得更加穩(wěn)定。 
--enable-safe-mode   打開安全模式 
--enable-ftp   打開ftp的支持
 --enable-zip   打開對zip的支持 
--with-bz2    打開對bz2文件的支持        
--with-jpeg-dir   打開對jpeg圖片的支持 
--with-png-dir   打開對png圖片的支持 
--with-freetype-dir   打開對freetype字體庫的支持 
--without-iconv   關(guān)閉iconv函數(shù),種字符集間的轉(zhuǎn)換 
--with-libXML-dir   打開libxml2庫的支持 
--with-XMLrpc    打開xml-rpc的c語言 
--with-zlib-dir   打開zlib庫的支持 
--with-gd    打開gd庫的支持 
--enable-gd-native-ttf   支持TrueType字符串函數(shù)庫
 --with-curl    打開curl瀏覽工具的支持 
--with-curlwrappers    運用curl工具打開url流 
--with-ttf     打開freetype1.*的支持,可以不加了
 --with-xsl     打開XSLT 文件支持,擴展了libXM2庫 ,需要libxslt軟件 
--with-gettext     打開gnu 的gettext 支持,編碼庫用到 
--with-pear    打開pear命令的支持,PHP擴展用的 
--enable-calendar    打開日歷擴展功能 
--enable-mbstring    多字節(jié),字符串的支持 
--enable-bcmath    打開圖片大小調(diào)整,用到zabbix監(jiān)控的時候用到了這個模塊 
--enable-sockets     打開 sockets 支持 
--enable-exif    圖片的元數(shù)據(jù)支持 
--enable-magic-quotes    魔術(shù)引用的支持 
--disable-rpath    關(guān)閉額外的運行庫文件
 --disable-debug    關(guān)閉調(diào)試模式 
--with-mime-magic=/usr/share/file/magic.mime      魔術(shù)頭文件位置
CGI方式安裝才用的參數(shù)
--enable-fpm                       
打上PHP-fpm 補丁后才有這個參數(shù),CGI方式安裝的啟動程序
--enable-fastCGI                
支持fastcgi方式啟動PHP 
--enable-force-CGI-redirect        
重定向方式啟動PHP 
--with-ncurses                     
支持ncurses 屏幕繪制以及基于文本終端的圖形互動功能的動態(tài)庫
--enable-pcntl                     freeTDS需要用到的,可能是鏈接mssql 才用
mhash和mcrypt算法的擴展
--with-mcrypt                     算法 
--with-mhash                      算
以上函數(shù)庫需要安裝
--with-gmp  應(yīng)該是支持一種規(guī)范 
--enable-inline-optimization  優(yōu)化線程
--with-openssl                     openssl的支持,加密傳輸時用到的 
--enable-dbase                     建立DBA 作為共享模塊
--with-pcre-dir=/usr/local/bin/pcre-config      perl的正則庫案安裝位置 
--disable-dmalloc
--with-gdbm                     dba的gdbm支持 
--enable-sigchild
--enable-sysvsem
--enable-sysvshm
--enable-zend-multibyte         
支持zend的多
--with-openssl,需要openssl庫。

2、配置文件

cp php.ini-production /usr/local/php/etc/php-ini

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

chmod 755 /etc/init.d/php-fpm

 chkconfig --add php-fpm

 chkconfig  php-fpm  on

/usr/local/php/sbin/php-fpm -t

/etc/init.d/php-fpm start

3、錯誤簡解

a.  error: wrong mysql library version or lib not found. Check config.log for more information.

    解決:將上邊標紅的編譯參數(shù)去掉,之后活動編譯該模塊 --with-mysqli=/usr/bin/mysql_config

b. ERROR: [pool www] cannot get uid for user 'php-fpm'

    解決:useradd -s /sbin/nologin php-fpm

c. /lib64/liblber-2.4.so.2: could not read symbols: Invalid operation

   解決:進入Makefile 文件,找到開頭為 EXTRA_LIBS=,在最后邊加上-llber 即可


網(wǎng)站標題:PHP--編譯安裝
本文來源:http://www.muchs.cn/article18/pdhgdp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開發(fā)移動網(wǎng)站建設(shè)、虛擬主機、網(wǎng)站設(shè)計公司ChatGPT、面包屑導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計