編譯安裝PHP-5.4.29環境

來源:互聯網
上載者:User

標籤:php 編譯安裝

一、部署編譯PHP環境,提前需要安裝依賴包模組:

   libmcrypt、libmcrypt-devel、mhash、mhash-devel、mcrypt

   通過rpm -qa | grep 如檢查沒有安裝,則進行安裝

   備忘:以下的安裝方式都已經寫成了簡易指令碼,安裝起來比較方便


二、編譯PHP環境所需模組

#!/bin/bash# ------------------install libmcrypt-2.5.8 :: begin ------------------cd /usr/localmkdir libmcryptcp /app/install-tar/libmcrypt-2.5.8.tar.gz /usr/local/libmcrypt/cd libmcrypttar xf libmcrypt-2.5.8.tar.gzcd libmcrypt-2.5.8./configuremakemake checkmake install


#!/bin/bash# ------------------install mcrypt-2.6.8 :: begin --------------------cd /usr/localmkdir mcryptcp /app/mcrypt-2.6.8.tar.gz /usr/local/mcrypt/cd mcrypttar xf mcrypt-2.6.8.tar.gzcd mcrypt-2.6.8export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATHexport LD_LIBRARY_PATH=/usr/local/libmcrypt/lib:/usr/local/mhash/libexport LDFLAGS="-L/usr/local/mhash/lib -I/usr/local/mhash/include/"export CFLAGS="-I/usr/local/mhash/include/"export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH./configuremakemake checkmake install


#!/bin/bash# ------------------install mhash-0.9.9.9 :: begin --------------------cd /usr/localmkdir mhashcp /app/install-tar/mhash-0.9.9.9.tar.gz /usr/local/mhash/cd mhashtar xf mhash-0.9.9.9.tar.gzcd mhash-0.9.9.9./configuremakemake checkmake install


三、模組安裝完畢後,要開始正式編譯PHP環境

#!/bin/bash# ------------------install php-5.4.29 :: begin --------------------cp /app/install-tar/php-5.4.29.tar.gz /app/cd /apptar zxvf php-5.4.29.tar.gzcd php-5.4.29./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-config-file-scan-dir=/usr/local/php5/etc/php.d --with-mcrypt=/usr/include --enable-mysqlnd --with-mysqli --with-pdo-mysql --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-gd --with-iconv --with-zlib --enable-xml --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --with-jpeg-dir --with-freetype-dir --disable-fileinfo        #不限制記憶體make ZEND_EXTRA_LIBS=‘-liconv‘ make testnmake install#啟動服務cd /usr/local/php5/etcmv php-fpm.conf.default php-fpm.conf/usr/local/php5/sbin/php-fpm


服務命令參數:

啟動: /usr/local/php5/sbin/php-fpm  停止: pkill php-fpm


本文出自 “xiaobao” 部落格,謝絕轉載!

編譯安裝PHP-5.4.29環境

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.