久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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)站

      centos7下如何安裝PHP7?

      添加的庫文件路徑一定要和系統(tǒng)平臺(tái)arch一致,32bit的系統(tǒng)直接添加【/usr/local/lib】即可,64bit系統(tǒng)要填加【/usr/local/lib64.】否則依舊會(huì)報(bào)錯(cuò),本文將詳細(xì)介紹centos7下如何安裝PHP7。

      centos7下如何安裝PHP7?

      一、官網(wǎng)安裝方法:

      http://php.net/manual/zh/install.unix.nginx.php

      相關(guān)學(xué)習(xí)推薦:PHP 編程從入門到精通

      二、編譯安裝

      1.下載php7

      wget -O php7.tar.gz http://cn2.php.net/get/php-7.1.20.tar.gz/from/this/mirror

      或者直接網(wǎng)頁下載

      http://php.net/get/php-7.1.20.tar.gz/from/a/mirror

      2.解壓php7

      tar -xvf php7.tar.gz

      3.進(jìn)入php目錄

      cd /usr/local/src/php-7.1.20

      4.安裝依賴包

      yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

      5.編譯配置(如果出現(xiàn)錯(cuò)誤,基本都是上一步的依賴文件沒有安裝所致)

      ./configure

      –prefix=/software/php

      –with-config-file-path=/etc

      –enable-fpm

      –with-fpm-user=www

      –with-fpm-group=www

      –enable-inline-optimization

      –disable-debug

      –disable-rpath

      –enable-shared

      –enable-soap

      –with-libxml-dir

      –with-xmlrpc

      –with-openssl

      –with-mcrypt

      –with-mhash

      –with-pcre-regex

      –with-sqlite3

      –with-zlib

      –enable-bcmath

      –with-iconv

      –with-bz2

      –enable-calendar

      –with-curl

      –with-cdb

      –enable-dom

      –enable-exif

      –enable-fileinfo

      –enable-filter

      –with-pcre-dir

      –enable-ftp

      –with-gd

      –with-openssl-dir

      –with-jpeg-dir

      –with-png-dir

      –with-zlib-dir

      –with-freetype-dir

      –enable-gd-native-ttf

      –enable-gd-jis-conv

      –with-gettext

      –with-gmp

      –with-mhash

      –enable-json

      –enable-mbstring

      –enable-mbregex

      –enable-mbregex-backtrack

      –with-libmbfl

      –with-onig

      –enable-pdo

      –with-mysqli=mysqlnd

      –with-pdo-mysql=mysqlnd

      –with-zlib-dir

      –with-pdo-sqlite

      –with-readline

      –enable-session

      –enable-shmop

      –enable-simplexml

      –enable-sockets

      –enable-sysvmsg

      –enable-sysvsem

      –enable-sysvshm

      –enable-wddx

      –with-libxml-dir

      –with-xsl

      –enable-zip

      –enable-mysqlnd-compression-support

      –with-pear

      –enable-opcache

      報(bào)錯(cuò)解決

      最實(shí)用的解決辦法如下:

      問題:

      1: wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz

      2: tar zxf libmcrypt-2.5.7.tar.gz

      3: ./configure –prefix=/usr/local

      4: make && make install

      問題:configure: error: Don't know how to define struct flock on this system, set –enable-opcache=no

      解決:解決辦法:

      vim /etc/ld.so.conf.d/local.conf # 編輯庫文件

      /usr/local/lib # 添加該行

      ldconfig -v # 使之生效

      注意事項(xiàng):

      這里添加的庫文件路徑一定要和你系統(tǒng)平臺(tái)arch一致,32bit的系統(tǒng)直接添加/usr/local/lib即可,64bit系統(tǒng)要填加/usr/local/lib64.否則依舊會(huì)報(bào)錯(cuò),我當(dāng)時(shí)就是添加了/usr/local/lib死活編輯不了,后來更改為/usr/local/lib64才可以。

      6.正式安裝

      make && make install

      7.配置環(huán)境變量

      vi /etc/profile

      PATH=$PATH:/usr/local/php/bin

      export PATH

      source /etc/profile

      8.配置php-fpm

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

      cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

      cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf

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

      chmod +x /usr/local/php/etc/php-fpm

      ln /usr/local/php/etc/php.ini /etc/php.ini

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

      useradd www

      10、配置啟動(dòng)項(xiàng)參數(shù)

      vim /usr/local/php/etc/php-fpm.d/www.conf

      pm.max_children = 500

      pm.start_servers = 105

      pm.min_spare_servers = 10

      pm.max_spare_servers = 200

      11.啟動(dòng)php-fpm

      /usr/local/php/etc/php-fpm start

      設(shè)置 php-fpm開機(jī)啟動(dòng)

      cp /usr/local/src/php-5.5.14/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm #拷貝php-fpm到啟動(dòng)目錄

      chmod +x /etc/rc.d/init.d/php-fpm #添加執(zhí)行權(quán)限

      chkconfig php-fpm on #設(shè)置開機(jī)啟動(dòng)

      service php-fpm start

      pkill php-fpm 強(qiáng)制關(guān)閉

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