lnmp之php5.6.29安裝

來源:互聯網
上載者:User

標籤:images   ini   bsp   image   toc   zlib   編譯   openldap   install   

linux下lnmp環境之php安裝

為了防止出現缺失,安裝下面整合,複製的時候請將這個複製成一個整行,下面3行是一整行

[[email protected] src]#yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gd gd2 gd-devel gd2-devel perl-CPAN pcre-devel

[[email protected] src]# wget  http://cn2.php.net/get/php-5.6.29.tar.gz/from/this/mirror

[[email protected] src]# mv mirror  phpphp.tar.gz

[[email protected] src]# tar vfxz phpphp.tar.gz

[[email protected] php-5.6.29]#./configure --prefix=/usr/local/php \
--with-config-file-path=/etc/php \
--with-gd \
--enable-gd-native-ttf \
--enable-mysqlnd \
--with-mysql=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl \
--enable-mbstring \
--enable-fpm

這個不需要管,如果已經安裝了mysql,這個錯誤就不會出現

[[email protected] php-5.6.29]# make && make install

執行編譯安裝...

ok,安裝成功

[[email protected] php-5.6.29]# cd /usr/local/php

[[email protected] php]# ./sbin/php-fpm

出現如上錯誤

[[email protected] etc]# cp /usr/local/php/etc/php-fpm.conf.default php-fpm.conf

補充:[[email protected] etc]# cp /usr/local/src/php-5.6.29/php.ini-development  /etc/php/php.ini

php-fpm運行成功

[[email protected] php]# ./bin/php

小結:php-fpm是php和nginx聯通的的橋樑

 

 

********************************************************************************************************

後記針對安裝php7如出現如下問題,下面有解決方案:

問題

解決方案

 

 

 

 

 

 

 



 

lnmp之php5.6.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.