lnmp之php

來源:互聯網
上載者:User

標籤:lnmp   php   


server3.example.com  172.25.85.3


1.server3:

tar jxf php-5.6.19.tar.bz2
yum install curl-devel   -y
yum install re2c-0.13.5-1.el6.x86_64.rpm  gmp-devel   net-snmp-devel 

        gd-devel-2.0.35-11.el6.x86_64.rpm  libxml2-devel     -y
cd  /root/php-5.6.19
./configure  --prefix=/usr/local/lnmp/php 

--with-config-file-path=/usr/local/lnmp/php/etc      --with-mysql=mysqld   --with-mysqli=mysqld

--with-pdo-mysql=mysqld   --with-openssl      --with-snmp     --with-gd     --with-zlib

--with-curl               ##文本瀏覽

--with-libxml-dir    --with-png-dir         --with-jpeg-dir      --with-freetype-dir    --without-pear         ##不連網安裝

--with-gettext     --with-gmp     --enable-inline-optimization 

--enable-soap       ##支援動態載入模組

-enable-ftp     --enable-sockets    --enable-mbstring       --enable-fpm 

--with-fpm-user=nginx      --with-fpm-group=nginx
 


make
make install


cp php.ini-production /usr/local/lnmp/php/etc/php-ini
vim  .bash_profile

PATH=$PATH:$HOME/bin:/usr/local/lnmp/mysql/bin:/usr/local/lnmp/nginx/sbin:/usr/local/lnmp/php/bin

source  .bash_profile

cd /usr/local/lnmp/php/etc
cp php-fpm.conf.default php-fpm.conf
vim php.ini

date.timezone = Asia/Shanghaipdo_mysql.default_socket= /usr/local/lnmp/mysql/data/mysql.sockmysql.default_port = /usr/local/lnmp/mysql/data/mysql.sockmysqli.default_socket=/usr/local/lnmp/mysql/data/mysql.sock



/etc/init.d/mysqld start
 ll /usr/local/lnmp/mysql/data/mtsql.sock

chmod  755  /usr/local/lnmp/mysql/data


vim php-fpm.conf

pid = run/php-fpm.pid


cd php-5.6.19/sapi/fpm/cp   init.d.php-fpm /etc/init.d/fpmchmod    +x   /etc/init.d/fpm/etc/init.d/fpm startphp -m    ##查看php支援外掛程式


vim /usr/local/lnmp/nginx/html/index.php
<?phpphpinfo();?>


vim /usr/local/lnmp/nginx/conf/nginx.conf
locaton ~ \.php$ {       root    html;       fastcgi_pass  127.0.0.1:9000;       fastcgi_index  index.php;       fastcgi_param  SCRIPT_FILENAME /scripts$factcgi_script_name;       include   fastcgi.conf;    }


cd /usr/local/lnmp/nginx/conf/

ls



nginx -tnginx -s reload


論壇的搭建(未完):






lnmp之php

聯繫我們

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