栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

lnmp之php

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

1

2

PATH=$PATH:$HOME/bin:/usr/local/lnmp/mysql/bi

n:/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

1

2

3

4

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

1pid = 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支持插件


1vim /usr/local/lnmp/nginx/html/index.php

1

2

3

phpinfo();

?>


vim /usr/local/lnmp/nginx/conf/nginx.conf

1

2

3

4

5

6

7

8

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

转载请注明:文章转载自 www.mshxw.com
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号