lnmp之php

发布时间:2020-05-28 14:44:45 作者:南有嘉鱼
来源:网络 阅读:268


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/Shanghai
pdo_mysql.default_socket= /usr/local/lnmp/mysql/data/mysql.sock
mysql.default_port = /usr/local/lnmp/mysql/data/mysql.sock
mysqli.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/fpm
chmod    +x   /etc/init.d/fpm
/etc/init.d/fpm start
php -m    ##查看php支持插件


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


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 -t
nginx -s reload


论坛的搭建(未完):






推荐阅读:
  1. LNMP架构之Mysql如何实现安装及部署
  2. 部署LNMP架构之安装nginx服务

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

php lnmp nm

上一篇:怎么提高服务器的并发处理能力?

下一篇:通过session会话实现认证和授权

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》