久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      centos6怎么安裝php模塊

      centos6安裝php模塊的方法:1、準(zhǔn)備環(huán)境,安裝依賴包;2、編譯安裝,添加環(huán)境變量;3、配置Apache支持PHP即可。

      centos6怎么安裝php模塊

      本文操作環(huán)境:centos 6系統(tǒng)、php 5.6、thinkpad t480電腦。

      下面是centos6.5編譯安裝php 5.6(apache模塊)的方法步驟:

      一、環(huán)境準(zhǔn)備

      1、下載php源碼包

      # wget http://cn2.php.net/distributions/php-5.6.30.tar.gz # tar -xf php-5.6.30.tar.gz -C /usr/local/src/

      2、創(chuàng)建www用戶

      # groupadd www # useradd -g www -s /sbin/nologin -M www

      3、安裝epel源

      # yum install epel-release -y

      4、安裝依賴包

      # yum install gcc gcc-c++ make zlib zlib-devel libxml2 libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv libiconv-devel freetype-devel libpng-devel gd bison bison-devel readline-devel gd-devel libicu-devel libedit-devel libcurl-devel sqlite-devel jemalloc jemalloc-devel libxslt-devel libmcrypt libmcrypt-devel mhash mhash-devel mcrypt pcre pcre-devel bzip2 bzip2-devel curl curl-devel openssl-devel openldap openldap-devel -y

      二、編譯安裝

      ./configure --prefix=/usr/local/php  --with-config-file-path=/etc/php/  --with-apxs2=/usr/local/httpd24/bin/apxs  --with-mysql=mysqlnd  --with-mysqli=mysqlnd  --with-pdo-mysql=mysqlnd  --with-gd  --with-iconv  --with-mcrypt  --with-mhash  --with-openssl  --with-curl  --with-zlib  --with-bz2  --with-freetype-dir  --with-jpeg-dir  --with-png-dir  --with-xsl  --with-pcre-dir  --with-readline  --with-gettext  --with-xmlrpc  --with-libxml-dir  --enable-shared  --enable-bcmath  --enable-soap  --enable-mbregex  --enable-pcntl  --enable-opcache  --enable-calendar  --enable-shmop  --enable-xml  --enable-sysvmsg  --enable-sysvsem  --enable-sysvshm  --enable-sockets  --enable-ftp  --enable-zip  --enable-gd-jis-conv  --enable-exif  --enable-mbstring  --enable-inline-optimization  --disable-debug  --disable-rpath
      # make && make install

      三、配置服務(wù)

      # mkdir /etc/php # cp php.ini-development /etc/php/php.ini

      添加環(huán)境變量PATH

      # vim /etc/profile PATH=$PATH:/usr/local/php/bin     export PATH   # source /etc/profile

      查看php配置文件路徑

      # /usr/local/php/bin/php --ini

      查看php編譯參數(shù)

      # /usr/local/php/bin/php-config

      四、配置apache支持php

      修改Apache的配置文件httpd.conf
      DirectoryIndex index.html index.php #添加index.php
      找到:
      AddType application/x-compress .Z
      AddType application/x-gzip .gz .tgz
      添加如下內(nèi)容
      AddType application/x-httpd-php-source .phps
      AddType application/x-httpd-php .php
      檢查L(zhǎng)oadModule php5_module modules/libphp5.so 是否已經(jīng)添加 libphp5.so文件是否存在
      編寫(xiě)測(cè)試文件index.php內(nèi)容如下,放到Apache的默認(rèn)的Web站點(diǎn)目錄DocumentRoot #默認(rèn)路徑/var/www/html

      <?php phpinfo(); ?>

      啟動(dòng)Apache服務(wù),若啟動(dòng)失敗,查看配置文件httpd.conf,找到錯(cuò)誤日志error.log,針對(duì)問(wèn)題修改。

      service httpd restart

      用瀏覽器訪問(wèn)http://IP/,可以查看到PHP配置就表示你成功了

      推薦學(xué)習(xí):php培訓(xùn)

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)