Nginx限速及线程限制

2012年4月29日 没有评论

Nginx可以通过HTTPLimitZoneModule和HTTPCoreModule两个目录来限速。

示例:

limit_zone one $binary_remote_addr 10m;  

 

location / {   

        limit_conn one 1;   

        limit_rate 100k;   

说明:

limit_zone,是针对每个IP定义一个存储session状态的容器。这个示例中定义了一个10m的容器,按照32bytes/session,可以处理320000个session。[......]

Read more

分类: nginx 标签:

MySQL双主复制及利用keepalived做高可用

2012年4月28日 没有评论

1、架构
      vip 192.168..45.244
      mysql-1:192.168.45.238
      mysql-2:192.168.45.239

2、mysql双主设置
      192.168.45.238

#vim /etc/my.cnf
[client]
port            = 3306
socket          = /tmp/mysql.sock

[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
datadir=/usr[......]

Read more

分类: mysql 标签:

Linux/centos/redhat基本常用操作

2012年4月27日 没有评论

复制硬盘:

if=/dev/sdc of=/dev/sde conv=noerror,sync bs=1024000

分类: LINUX 标签:

Memcached服务端安装与使用

2012年4月24日 没有评论

1.下载libevent和memcached

http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz

2.安装libevent

tar -zxvf libevent-2.0.18-stable.tar.gz
cd libevent-2.0.18-stable
./configure --prefix=/usr/local/libevent
make &&[......]

Read more

分类: LINUX 标签:

PHP imagick-3.0.1无法安装,提示fatal error: wand/MagickWand.h: No such file or directory 解决方法

2012年4月24日 没有评论

PHP安装imagick-3.0.1时提示:

an error occur: fatal error: wand/MagickWand.h: No such file or directory

解决办法:
1.确认已安装
2.安装pkgconfig

yum install gtk+-devel
export PKG_CONFIG_PATH=/usr/local/ImageMagick/lib/pkgconfig/

3.重装安装imagick

cd imagick-3.0.1/
/usr/local/php/bin/phpize
./configure --with-php-[......]

Read more

分类: php 标签:

nginx无法启动: libpcre.so.1/libpcre.so.0: cannot open shared object file解决办法

2012年4月24日 没有评论

NGINX启动时提示错误:

/usr/local/nginx/sbin/nginx -t
/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

ldd $(which /usr/local/nginx/sbin/nginx)

linux-vdso.so.1 => (0x00007fff48ff0000)
libcrypt.so.1 => /lib64/[......]

Read more

分类: nginx 标签:

安装Office2007时出现1706错误的解决方案

2012年4月18日 没有评论

1.首先下载一款软件windows installer Clean Up。这个是微软出品的,用来专门卸载微软公司出品的软件的,据说能卸载得很干净,彻底。(我放上来了,要的童鞋请自己下载。)

 

2.按照提示一步步安装。

 

3.打开软件,选择如下选项(不要选错了,选错貌似还是会安装出问题的。)

 

 

选中如上选项,然后点“Remove”,千万别点“Clear All”。看懂英文的童鞋都应该知道是什么意思吧。

 

4.删除了以后,就可以关闭这个软件,然后顺利安装Office2007了[......]

Read more

分类: 杂七杂八 标签:

文件上传大小限制解决方案修改IIS7/7.5配置

2012年4月6日 没有评论

IIS 7 默认文件上传大小时30M 要突破这个限制:

1. 修改IIS的applicationhost.config     打开 %windir%\system32\inetsrv\config\applicationhost.config      找到: <requestFiltering>节点,   这个节点默认没有 <requestLimits maxAllowedContentLength=”上传大小的值(单位:byte)” /> 元素,IIS 7和IIS 7.5上测试过  最大值只能是<requestLimits maxAllowedCont[......]

Read more

分类: 系统相关 标签:

DRBD编译安装与配置

2012年4月6日 没有评论
 

DRBD介绍

DRBD是一个用软件实现的、无共享的、服务器之间镜像块设备内容的存储复制解决方案。 DRBD Logo数据镜像:实时、透明、同步(所有服务器都成功后返回)、异步(本地服务器成功后返回)。DBRD的核心功能通过Linux的内核实现,最接近系统的IO栈,但它不能神奇地添加上层的功能比如检测到EXT3文件系统的[......]

Read more

分类: 存储 标签:

nginx geo

2012年4月1日 没有评论

1:次测试主要是通过nginx-0.6*的geo模块,阻止部分自定义的IP访问网站资源,用来实现客户的“不允许国外用户访问”的需求。

配置代码如下:
1:在http{}代码块中,配置geo:
geo $guowai {
default default; ##default为未定义的ip,这里取名也叫default,可以更改。其代表的IP在这里就是非国外的IP。
include guowai.ip; ## guowai.ip为自定义的国外的ip列表,取acl名为usa
122.11.55.0/24 usa; ## 这里是一条acl,名称叫usa,值为122.11.55.0[......]

Read more

分类: nginx 标签: