• 
    

      <address id="upfr9"><pre id="upfr9"><strike id="upfr9"></strike></pre></address>
      1. <address id="upfr9"><tr id="upfr9"></tr></address><dl id="upfr9"></dl>

        LAMP中的php編譯安裝

        下載安裝包:wget  http://cn2.php.net/distributions/php-5.6.29.tar.gz

        10年積累的網(wǎng)站建設(shè)、成都網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對客戶對網(wǎng)站的新想法和需求。提供各種問題對應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有鞍山免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。

        php編譯安裝步驟:

        一,配置編譯參數(shù)./configure

        ./configure   \

        >--prefix=/usr/local/php  \

        >--with-apxs2=/usr/local/apache2/bin/apxs  \     //安裝該參數(shù)后會(huì)出現(xiàn)php_module模塊

        >--with-config-file-path=/usr/local/php/etc  \

        >--with-MySQL=/usr/local/mysql   \

        >--with-libxml-dir  \

        >--with-gd

        >--with-jpeg-dir  \

        >--with-png-dir \

        >--with-freetype-dir \

        >--with-iconv-dir \

        >--with-zlib-dir \

        >--with-bz2  \

        >--with-openssl  \

        >--with-mcrypt  \

        >--enable-soap  \

        >--enable-gd-native-ttf   \

        >--enable-mbstring   \

        >--enable-sockets   \

        >--enable-exif    \

        >--disable-ipv6

        ./configure編譯之后遇到的一些錯(cuò)誤信息:

        1.configure: error: Cannot find OpenSSL's <evp.h>

        解決方法:yum install -y  openssl  openssl-devel

        2.checking for BZip2 in default path... not found

        configure: error: Please reinstall the BZip2 distribution

        解決方法:yum install -y bzip2 bzip2-devel

        3.configure: error: jpeglib.h not found.

        解決方法:yum install -y  libjpeg-turbo  libjpeg-turbo-devel

        4.configure: error: png.h not found.

        解決方法:yum install -y  libpng  libpng-devel

        5.configure: error: freetype-config not found.

        解決方法:yum  install  -y  freetype   freetype-devel

        6.configure: error: mcrypt.h not found. Please reinstall libmcrypt.

        解決方法:yum   install  -y   epel-release

          yum    install  -y  libmcrypt-devel

        (因?yàn)镃entos默認(rèn)的yum源沒有l(wèi)ibmcrypt-devel這個(gè)包,只能借epel的yum源)

        7.checking for xml2-config path...

        configure: error: xml2-config not found. Please check your libxml2 installation.

        解決方法:yum  install  -y  libxml2-devel

        二,編譯make

        三,安裝make install

        安裝完成后,還不能使用,還需要進(jìn)一步配置一下

        拷貝php配置文件:(在./configure配置參數(shù)時(shí)的目錄下)

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

        (這一步必須得有,要不然后面不能正常解析php文件)

        LAMP中的php編譯安裝

        修改apache配置文件

        vi  /usr/local/apache2/conf/httpd.conf

        1.找到:

        <Directory "/usr/local/apache2//cgi-bin">

           AllowOverride None

           Options None

           Order allow,deny

           Denyfrom all

        </Directory>

        改為:

        <Directory "/usr/local/apache2//cgi-bin">

           AllowOverride None

           Options None

           Order allow,deny

           Allowfrom all

        </Directory>

        說明:如果不修改這個(gè)地方,我們訪問網(wǎng)站會(huì)禁止訪問,顯示403

        2.找到: AddType application/x-gzip .gz .tgz

        在該行下面添加: AddType application/x-httpd-php .php

        說明:要想支持PHP腳本解析,必須要加上對應(yīng)的類型

        3.找到:

        <IfModule dir_module>

           DirectoryIndex index.html index.htm

        </IfModule>

        改為:

        <IfModule dir_module>

           DirectoryIndex index.html index.htmindex.php

        </IfModule>

        說明:增加針對php的索引,如果一個(gè)站點(diǎn)默認(rèn)頁為index.php,那么就得加上這個(gè)index.php的支持。

        4.找到:

        #ServerName  www.example.com:80

        改為:

        ServerName   localhost:80

        說明:如果不去掉#,啟動(dòng)apache時(shí),會(huì)有警告信息

        5.去掉/user/local/apache2/conf/httpd.conf里#Include conf/extra/httpd-vhosts.conf的井號(hào),解析localhost下的php提示404.

        原因:/usr/local/apache2/confhttpd.conf下的php文件在doucmentroot=/usr/local/apache2/htdocs下;而/usr/local/apache2/conf/extra/httpd-vhosts.conf下的php文件在doucmentroot=/data/www下。兩個(gè)路徑不一樣所以不能通用php文件

        6.要想使用curl  localhost/1.php:要開啟httpd服務(wù),該命令才可以使用

        本文題目:LAMP中的php編譯安裝
        網(wǎng)頁地址:http://www.jbt999.com/article44/jhdshe.html

        成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、App開發(fā)微信公眾號(hào)、小程序開發(fā)、網(wǎng)站營銷定制開發(fā)

        廣告

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

        網(wǎng)站托管運(yùn)營

      2. 
        

          <address id="upfr9"><pre id="upfr9"><strike id="upfr9"></strike></pre></address>
          1. <address id="upfr9"><tr id="upfr9"></tr></address><dl id="upfr9"></dl>
            豆花网站高清无码18 | 欧美日韩福利 | 51久久国产露脸精品国产 | 乱伦中文网| 日日模日日 | 美女网站黄a | 操逼视频大片 | 日韩高清一区在线 | 色婷婷亚洲1 | 亚洲av网站在线观看 |