LNMP linux+nginx+mysql+php 环境搭建(基于centos)
2017-02-28 00:00
1096 查看
摘要: 有个项目需要用php,所有服务器就搭建了一下
http://blog.csdn.net/jiangwei0910410003/article/details/50929955
上面的是百度的方法,我是按照这个搭建的,已经成功!(中间有些不符合自己情况,自行解决)
此方法个别地方有些问题:
此处,应该改为
./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm --enable-fastcgi --with-libxml-dir=/usr/local/libxml2 --disable-fileinfo --with-zlib-dir=/usr/local/zlib
可以避免之后的错误.........................
接下来nginx配置:
server {
listen 80;
#server_name DLPROSPEROUS.COM;
root /home/project;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}
}
软件保存在自己的网盘:http://pan.baidu.com/s/1dEM5OK5 密码:msfr
https://help.aliyun.com/document_detail/50700.html
这个是阿里的解决方案,之后才看到了,因为已经搭建成功了,所以就没有整,但是阿里的,应该也没问题,所以就记录下来
http://blog.csdn.net/jiangwei0910410003/article/details/50929955
上面的是百度的方法,我是按照这个搭建的,已经成功!(中间有些不符合自己情况,自行解决)
此方法个别地方有些问题:
此处,应该改为
./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm --enable-fastcgi --with-libxml-dir=/usr/local/libxml2 --disable-fileinfo --with-zlib-dir=/usr/local/zlib
可以避免之后的错误.........................
接下来nginx配置:
server {
listen 80;
#server_name DLPROSPEROUS.COM;
root /home/project;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}
}
软件保存在自己的网盘:http://pan.baidu.com/s/1dEM5OK5 密码:msfr
https://help.aliyun.com/document_detail/50700.html
这个是阿里的解决方案,之后才看到了,因为已经搭建成功了,所以就没有整,但是阿里的,应该也没问题,所以就记录下来
相关文章推荐
- 基于CentOS 6.8平台最新源代码包编译安装LNMP环境搭建(Nginx+MySQL+PHP)
- centos linux 下LNMP 环境快速yum搭建(nginx+mysql+memcached+iptables+php)
- centos 下lnmp(linux+nginx+mysql+php)环境搭建
- 在CentOS 7 64位操作系统环境下搭建LNMP(Linux+Nginx+MySQL+PHP)来运行Zabbix监控程序
- Linux\CentOS系统下的服务器搭建,下载编译环境,安装vsFtpd、nginx、MySQL、JDK、Tomcat、PHP
- LNMP(linux+nginx+mysql+php)环境搭建_1
- LNMP(linux+nginx+mysql+php)环境搭建_2
- Cacti监控服务器配置教程(基于CentOS+Nginx+MySQL+PHP环境搭建)
- LNMP(Linux+Nginx+Mysql+PHP---源码)环境搭建
- lnmp 环境搭建 源代码包安装 linux,nginx,mysql,php
- LNMP环境搭建 linux+NGINX+MYSql+PHP
- linux下搭建LNMP(linux+nginx+mysql+php)环境之php5.4安装
- LNMP(Linux+nginx+MySQL+PHP)环境搭建
- LNMP环境的基础搭建,即Linux、Nginx、MySQL、PHP环境
- LNMP(Linux+Nginx+MySQL+PHP)环境搭建
- linux下搭建LNMP(linux+nginx+mysql+php)环境之nginx安装
- CentOS 5.5安装Nginx、PHP(FastCGI)、MySQL --搭建LNMP环境安装Wordpress
- CentOS 5.5安装Nginx、PHP(FastCGI)、MySQL --搭建LNMP环境安装Wordpress、Discuz
- LNMP环境搭建,nginx+linux+mysql+php