#定义Nginx运行的用户和用户组user www www;#nginx进程数,建议设置为等于CPU总核心数。worker_processes 8;#全局错误日志定义类型,[ debug | info | notice | warn | error | crit ]error_log ar/logi...
分类:
其他好文 时间:
2014-08-02 09:51:53
阅读次数:
259
一、安装mongodb 创建/etc/yum.repos.d/mongodb.repo文件,配置文件内容如下: [mongodb]
name=MongoDB?Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1 ...
分类:
数据库 时间:
2014-08-01 23:24:52
阅读次数:
524
mac自带了php,不过只是最基本的.要用来开发害的装其他版本./private/etc/sudorm-rfphp-fpm.conf.defaultphp.iniphp.ini.default
/usr/bin/sudorm-rfphpphp-configphpdocphpize
/usr/includesudorm-rfphp
/usr/libsudorm-rfphp
/usr/sbinsudorm-rfphp-fpm
/usr/sharesudorm-rfph..
分类:
Web程序 时间:
2014-08-01 20:16:14
阅读次数:
260
在上篇LNMP的基础上进行测试vim/usr/local/nginx/html/test.php<?php$link=mysql_connect(‘localhost‘,‘root‘,‘mysql服务器密码,没有就在两个单引号中为空‘);if(!$link)echo"fail";elseecho"success";mysql_close();?>chmod755/usr/local/apache/htdocs/testdb.phpservi..
分类:
数据库 时间:
2014-08-01 20:13:03
阅读次数:
258
PHP运行模式:1)cgi通用网关接口(CommonGatewayInterface))2)fast-cgi常驻(long-live)型的CGI3)cli命令行运行(CommandLineInterface)4)web模块模式(apache等web服务器运行的模块模式)HTTPServer有三种架构比较流行:(1)Apache+mod_php5(2)lighttp+spawn-fcgi(3)..
分类:
Web程序 时间:
2014-08-01 20:05:32
阅读次数:
381
先这边文章是为了Django项目的nginx配置
注意点;
以下是/etc/nginx/nginx.conf的内容
include /etc/nginx/conf.d/*.conf;#所以我们可以使用 service nginx start ----如果不需要指定特定的nginx配置
include /etc/nginx/sites-enabled/*;#运行上面的命令时 会加载...
分类:
其他好文 时间:
2014-08-01 19:43:12
阅读次数:
315
一、安装必要软件 负载均衡服务器:IP设置为192.168.1.10 Web服务器1:安装Apache或者Nginx,IP设置为192.168.1.11; Web服务器2:安装Apache或者Nginx,IP设置为192.168.1.12。二、配置负载均衡服务器 1、在Nginx的conf目...
分类:
其他好文 时间:
2014-08-01 15:53:11
阅读次数:
205
最近系统部署用到nginx,于是学习部署nginx.要成功安装nginx,得先安装pcre库,否则在安装nginx里,总是提示找不到PCRE相关文件,于是先安装pcre.一、安装PCRE1.下载PCRE包首先去官网下载pcre的安装包如果通过FTP的方式,下载地址为:ftp://ftp.csx.ca...
分类:
其他好文 时间:
2014-08-01 13:30:41
阅读次数:
193
本文记录了在CentOS 6.3上,把Nginx从1.2.4升级到1.6.0的过程。
分类:
其他好文 时间:
2014-08-01 04:52:31
阅读次数:
226
负载均衡
Nginx提供了较多的负载均衡策略,包括加权轮询、IP哈希、fair、一致哈希等。前两个是Nginx官方源码内置的策略,而后面几个都是第三方模块,所以下面我们重点来看前两个内置策略。
Nginx默认采用round_robin加权算法,如果要采用IP哈希策略,那么必须在Nginx的配置文件里通过配置指令ip_hash明确指定。
当整个http配置块被Nginx解析完毕...
分类:
其他好文 时间:
2014-08-01 00:12:11
阅读次数:
549