Centos 6.5 下php5.6.2 的編譯安裝

來源:互聯網
上載者:User

標籤:centos6 php5.6.2 mysql

  1. 純淨的Centos 6.5系統

  2. 配置163yum源 (稍後會寫一篇文檔)

  3. 安裝  開發軟體包:yum  -y groupinstall  "Development Tools"

  4. 安裝     mysql :        yum  -y install mysql mysql-server mysql-devel

  5. 下載php-5.6.2      wgethttp://cn2.php.net/distributions/php-5.6.2.tar.gz

  6.  解壓  tar -zxvf php-5.6.2.tar.gz

  7.  切換到 php-5.6.2

  8.  ./configure \
    --prefix=/usr/local/php \
    --with-config-file-path=/usr/local/php/etc \
    --enable-fpm \
    --with-fpm-user=php-fpm \
    --with-fpm-group=php-fpm \
    --with-mysql=mysqlnd \                  //這裡mysqlnd 是內部尋找命令
    --with-mysql-sock=/tmp/mysql.sock \
    --with-libxml-dir \
    --with-gd \
    --with-jpeg-dir \
    --with-png-dir \
    --with-freetype-dir \
    --with-iconv-dir \
    --with-zlib-dir \
    --with-mcrypt \
    --enable-soap \
    --enable-gd-native-ttf \
    --enable-ftp \
    --enable-mbstring \
    --enable-exif \
    --disable-ipv6 \
    --with-pear \
    --with-curl \
    --with-openssl

9.出現未安裝的錯誤,直接用yum 進行安裝即可 記得不要忘了裝上 -devel    (libcurl libpng libcrul12等等)
10.出現找不到檔案路徑的情況下  用find / -name ‘name‘去尋找一下
11.出現warning 的情況大多是因為版本已經預設安裝了,可以去掉該行

12.make
13.make install


本文出自 “嘿linux” 部落格,請務必保留此出處http://heilinux.blog.51cto.com/6123663/1575582

Centos 6.5 下php5.6.2 的編譯安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.