<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>精東·博客 &#187; 服务器</title>
	<atom:link href="http://www.wemvc.com/category/development/server/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wemvc.com</link>
	<description>男人的胸怀是委屈撑大的。</description>
	<lastBuildDate>Sun, 29 Aug 2010 04:21:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Linux(Centos)防DDOS攻击软件-DDoS-Deflate</title>
		<link>http://www.wemvc.com/1361.html</link>
		<comments>http://www.wemvc.com/1361.html#comments</comments>
		<pubDate>Tue, 29 Jun 2010 18:51:32 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[实用工具]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1361</guid>
		<description><![CDATA[(D)DoS-Deflate是一款免费的用来防御和减轻DDoS攻击。它通过netstat监测跟踪创建大量网络连接的IP地址，在检测到某个结点超过预设的限制时，该程序会通过APF或IPTABLES禁止或阻挡这些IP. 
DDoS-Deflate安装及配置

1、安装

wget http://www.inetbase.com/scripts/ddos/install.sh
chmod 0700 install.sh
./install.sh


2、配置
配置文件是 /usr/local/ddos/ddos.conf ，默认有如下配置

FREQ=1
NO_OF_CONNECTIONS=150
APF_BAN=1
KILL=1
EMAIL_TO=”root”
BAN_PERIOD=600

IP地址白名单：/usr/local/ddos/ignore.ip.list
卸载

wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
chmod 0700 uninstall.ddos
./uninstall.ddos

MediaLayer was in need of a script to automatically mitigate (D)DoS attacks. The necessity started when MediaLayer was the target of a rather large, consistent attack originating from multiple IP addresses. Each IP would have a large amount of connections to the server, as shown as [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1361.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下安装&amp;使用压力测试工具Webbench-1.5</title>
		<link>http://www.wemvc.com/1316.html</link>
		<comments>http://www.wemvc.com/1316.html#comments</comments>
		<pubDate>Sat, 26 Jun 2010 07:58:24 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[webbench]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1316</guid>
		<description><![CDATA[Webbench是有名的网站压力测试工具，它是由Lionbridge公司（http://www.lionbridge.com）开发。它的帮助文件和文档请到：www.webbench.com上查看。
Webbech 能测试处在相同硬件上，不同服务的性能以及不同硬件上同一个服务的运行状况。webBech的标准测试可以向我们展示服务器的两项内容：每秒钟相应请求数和每秒钟传输数据量。webbench不但能具有便准静态页面的测试能力，还能对动态页面（ASP,PHP,JAVA,CGI）进行测试的能力。还有就是他支持对含有SSL的安全网站例如电子商务网站进行静态或动态的性能测试。

下面介绍如何在Ubuntu下安装webbench:
1、安装依赖包CTAGS

apt-get install ctags

2、安装Webbench 1.5

wget http://www.wemvc.com/wp-content/uploads/2010/06/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make &#38;&#38; make install

3、使用介绍

webbench -c 500 -t 30 http://127.0.0.1/test.jpg

参数说明：-c表示并发数，-t表示时间(秒)
4、测试结果

webbench-1.5$ sudo webbench -c 500 -t 10 http://localhost/
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
&#160;
Benchmarking: GET http://localhost/
500 clients, running 10 sec.
&#160;
Speed=816 pages/min, 13094 bytes/sec.
Requests: 136 susceed, 0 failed.

]]></description>
		<wfw:commentRss>http://www.wemvc.com/1316.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 64bit 编译安装MySQL5.1.x、 PHP 5.3、NGINX 0.8.x</title>
		<link>http://www.wemvc.com/1272.html</link>
		<comments>http://www.wemvc.com/1272.html#comments</comments>
		<pubDate>Wed, 23 Jun 2010 13:48:47 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1272</guid>
		<description><![CDATA[一时兴起，决定体验Ubuntu，当然少不了要配置开发环境。从网上收集了一些资料，开始配置安装过程。
首先我们现配置下系统，避免以后的问题。
1、locale 的问题，可能会造成在 SSH 终端下的乱码，Debian 可以用 dpkg-reconfigure locales 来设定，Ubuntu就不是这样了。可以先查看一下 /usr/share/i18n/SUPPORTED 这个文件，有哪些受支持的 locale 设定，然后用命令激活即可。

locale-gen en_US.UTF-8
locale-gen fr_FR
locale-gen zh_CN.UTF-8
locale-gen zh_CN
locale-gen zh_CN.GBK
locale-gen zh_CN.GB18030

然后设定系统默认的编码语言，这样 SSH 下面就不会有乱码了，打开 /etc/default/locale 文件，输入以下内容，然后重启系统即可。

LANG=&#34;zh_CN.UTF-8&#34;
LANGUAGE=&#34;zh_CN:zh&#34;

2、因为系统的pygrub已经更换成pvgrub，此时我们可以根据自己的喜好升级系统内核了…那么我们就敲命令把内核也一起升掉好了…

apt-get update
apt-get upgrade
apt-get dist-upgrade

现在我们需要确认一下系统内核，然后把多余的系统内核给卡擦了…

uname -a #确定下版本，不要把现在正在用的给删了
dpkg --get-selections &#124; grep linux  #可以看到系统内核的列表

然后更改 /boot/grub/menu.lst，修改其中的版本就可以了，当然建议重启一下然后再删除系统内核。
4、安装一些必备的软件：

aptitude install vim
aptitude install wget
aptitude install rcconf
aptitude install cron
aptitude install build-essential
aptitude install imagemagick
aptitude install postfix
aptitude install vsftpd
aptitude install mailx
aptitude install gawk
aptitude install [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1272.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[多图] Ubuntu 8.04 中开启3D桌面特效与设置方法</title>
		<link>http://www.wemvc.com/1263.html</link>
		<comments>http://www.wemvc.com/1263.html#comments</comments>
		<pubDate>Sat, 19 Jun 2010 18:22:57 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1263</guid>
		<description><![CDATA[Ubuntu 8.04 (Hardy Heron) 中集成了强大3D交互界面，Ubuntu 的 3D桌面特效给用户带来了一种全新的视觉用户。想必有很多朋友也因为看到了 Ubuntu 8.04 那炫目的 3D 桌面特效才开始慢慢地了解Ubuntu 8.04 (Hardy Heron) 的。虽然在这之前也不少的朋友写过设置 Ubuntu  Linux 3D桌面特效的文章，但新发行版的发布也会有新的朋友看到了 Ubuntu 3D 桌面特效而接触 Ubuntu  Linux 。因此，我觉得有必要把在Ubuntu 8.04 (Hardy Heron) 开启 3D 桌面特效的方法给新手们再详细的介绍一下。

本文采用图文并茂的方式给新们讲解，几乎每一步骤都有配图片和文字说明，通过本文的介绍了后,没有多少 Ubuntu Linux  基础的新手们也应该能轻松地在 Ubuntu 8.04 (Hardy Heron) 中开启3D 桌面特效。
1.说明:作者的是用的 NVIDIA GeForce FX 5200 的显卡. 如果你是用的其它的型号的 NVIDIA显卡,设置方法与本文类似。在 Ubuntu 8.04 LTS (Hardy Heron) 加入了大量的 ATI 的驱动。因此，ATI显卡的设置方法的思路也是类似的。由于作者是用的英文版的系统，可能和你看到的有一点不一样。
2.Ubuntu 8.04 [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1263.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>centos 5.2 安装pptpd配置vpn服务器</title>
		<link>http://www.wemvc.com/1001.html</link>
		<comments>http://www.wemvc.com/1001.html#comments</comments>
		<pubDate>Tue, 27 Apr 2010 10:39:44 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[pptp]]></category>
		<category><![CDATA[pptpd]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1001</guid>
		<description><![CDATA[1、安装ppp和iptables
yum install -y ppp iptables
2、下载pptpd的rpm包并安装
32位 http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
64 位 http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.x86_64.rpm
要注意64位的系统要下载64位的rpm包，32位的系统要下载32位的rpm包，别搞错了

64位系统安装命令：
rpm -ivh pptpd*.x86_64.rpm
32位系统安装命令：
rpm -ivh pptpd*.i386.rpm
3、编辑配置文件 vi /etc/pptpd.conf
需要有如下内容：
option /etc/ppp/options.pptpd
logwtmp
localip 172.16.195.1
remoteip 172.16.195.101-200
一般只需加入后两行即可，即分配服务器IP和客户端IP范围，可自己选择合适的IP
4、编辑配置文件 vi /etc/ppp/options.pptpd
需要如下内容：
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 208.67.222.222
ms-dns 208.67.220.220
一般只需设定后两行的dns服务器地址即可，即去掉#号，把IP改为服务器的dns IP供客户端使用
5、编辑配置文件 vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret   IP addresses
(user) pptpd (passwd) *
四项分别为客户端用户名，vpn服务器名（一般不改动），登陆密码，IP分配址（*为自动），中间用空格或Tab键隔开
可加入多个用户，分行录入
6、开启ip转发功能（否则只能连到vpn服务器，不能通过vpn服务器访问外部网络），修改配置文件
vi /etc/sysctl.conf 中的相应内容如下
net.ipv4.ip_forward = 1
使配置立即生效：
/sbin/sysctl -p
7、启用日志 vi /etc/syslog.conf
追加一行：
daemon.debug /var/log/pptpd.log
重起syslog：
kill -SIGHUP `cat /var/run/syslogd.pid`
8、配置iptables，此步关键，不然无法访问外网！
/sbin/iptables -A POSTROUTING -t nat -s [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1001.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>有趣的Nginx QUERY_STRING BUG</title>
		<link>http://www.wemvc.com/951.html</link>
		<comments>http://www.wemvc.com/951.html#comments</comments>
		<pubDate>Thu, 25 Mar 2010 03:49:43 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=951</guid>
		<description><![CDATA[今天在开发一个验证签名的功能，所以需要从$_SERVER['QUERY_STRING']截取到签名前的字符串。但是开发环境中是APACHE的，生产环境是NGINX+PHP_FASTCGI，问题就从这里来了，请看下面。
NGINX下的QUERY_STRING：
[QUERY_STRING] =&#62; gateway/login/&#38;&#38;MemberID=110000009569680&#38;EmpFlg=N&#38;UserName=LIJOSHUA&#38;EmpOrgName=&#38;sysDate=03%2F25%2F2010+10%3A55%3A30&#38;paSignature=6CA0B32525DEEF5A4571AE2CB7D16C326E1636E08367F8658B422B279FFA787C9206F0FFBFF1D876E5602928E0F745FB83856D12FE3DF2C5EF28A4BE1EF15D7DB6F1E0A4C841F0029F6463C0483E761789F1C9
APACHE下的QUERY_STRING：
[QUERY_STRING] =&#62; MemberID=110000009569680&#38;EmpFlg=N&#38;UserName=LIJOSHUA&#38;EmpOrgName=&#38;sysDate=03%2F25%2F2010+10%3A55%3A30&#38;paSignature=6CA0B32525DEEF5A4571AE2CB7D16C326E1636E08367F8658B422B279FFA787C9206F0FFBFF1D876E5602928E0F745FB83856D12FE3DF2C5EF28A4BE1EF15D7DB6F1E0A4C84
用法修改：
$query_string = $_SERVER['QUERY_STRING'];
改为：
$uri = $_SERVER['REQUEST_URI'];
$arrURL = parse_url($uri);
$query_string = $arrURL['query'];
]]></description>
		<wfw:commentRss>http://www.wemvc.com/951.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cent OS 5 安装飞信机器人(Fetion Robt) 发送短信、错误警报</title>
		<link>http://www.wemvc.com/824.html</link>
		<comments>http://www.wemvc.com/824.html#comments</comments>
		<pubDate>Mon, 19 Jan 2009 06:23:52 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fetion]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=824</guid>
		<description><![CDATA[飞信机器人介绍
飞信机器人是国内第一款面向企业应用的第三方飞信产品:
1、高效CLI（命令行）操作方式
2、高效C＋＋语言开发
3、跨平台应用（X86下LINUX／WINDOWS，其它平台请联系定制服务）
4、插件支持，完全开放的插件接口，用户通过重写插件，可以实现自己的应用
5、支持批处理运行
6、支持SOCKET调用（查看socket_interface/demo）下代码
7、内部集成小型WEB服务器，支持WEB状态查询及交互
8、软件完全免费
官方网站
http://www.it-adv.net
新版交互式飞信安装方法
 开始我下载的是64位的，但是报错：bash: ./fetion: cannot execute binary file，后来安装Redhat32位的，问题得到解。
下载安装程序：
fetion20080522004-linrh4tar
libraryrh4x32tar

cd /usr/local
wget http://www.it-adv.net/fetion/download/fetion20080522004-linrh4.tar.gz
tar xf fetion20080522004-linrh4.tar.gz
mv install sms
rm fetion20080522004-linrh4.tar.gz

安装支持库：

cd fetion
mkdir lib
wget http://www.it-adv.net/fetion/libraryrh4x32.tar.gz
tar xf libraryrh4x32.tar.gz
rm libraryrh4x32.tar.gz
ln -s /usr/local/sms/lib/libcrypto.so.0.9.7a /usr/local/fetion/lib/libcrypto.so.4
ln -s /usr/local/sms/lib/libssl.so.0.9.7a /usr/local/fetion/lib/libssl.so.4
echo &#34;/usr/local/sms/lib&#34; &#62; /etc/ld.so.conf.d/fetion-i386.conf
/sbin/ldconfig

开始使用
看看帮助信息，很有必要

 ./fetion -h
 ************************ IMPORTANT STATEMENT ************************
 **                    [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/824.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Nagios 配置篇</title>
		<link>http://www.wemvc.com/815.html</link>
		<comments>http://www.wemvc.com/815.html#comments</comments>
		<pubDate>Sat, 17 Jan 2009 10:47:24 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=815</guid>
		<description><![CDATA[nagios.cfg
nagios_group=nagcmd
]]></description>
		<wfw:commentRss>http://www.wemvc.com/815.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios 配置文件详解</title>
		<link>http://www.wemvc.com/807.html</link>
		<comments>http://www.wemvc.com/807.html#comments</comments>
		<pubDate>Sat, 17 Jan 2009 10:35:52 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[监控]]></category>
		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=807</guid>
		<description><![CDATA[作者：Joshua
注意

 当创建或编辑配置文件时，要遵守如下要求：
 以符号&#8217;#'开头的行将视为注释不做处理；
 变量必须是新起的一行 － 变量之前不能有空格符；
 变量名是大小写敏感的；

配置文件列表：
主配置文件
主配置文件[--prefix/nagios/etc/nagios.cfg]：

##############################################################################
#
# NAGIOS.CFG - Sample Main Config File for Nagios 3.0.6
#
# Read the documentation for more information on this configuration
# file.  I've provided some comments here, but things may not be so
# clear without further explanation.
#
# Last Modified: 10-15-2008
#
##############################################################################
&#160;
# LOG FILE
# This is the main log file where service [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/807.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD安装Nagios监控系统</title>
		<link>http://www.wemvc.com/347.html</link>
		<comments>http://www.wemvc.com/347.html#comments</comments>
		<pubDate>Sat, 17 Jan 2009 00:16:01 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[网络监控]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=347</guid>
		<description><![CDATA[通过前篇文章《Linux安装Nagios监控系统, perl-fcgi, nginx》看，Nagios的安装比较简单，即使是用nginx来替代apache。复杂的是设置和配置参数的设定。不过你要放松一点，毕竟我们要搞定它，不是吗？那就开始吧：
1：获得最新的安装包，http://www.nagios.org/download
2：以root身份登录服务器，目前最新的版本是3.0.6：
1）nagios，版本2.5：
wget http://nchc.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz
2）获得nagios插件，版本1.4.3：
wget http://jaist.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
3）获得图库文件：
http://dl.sf.net/nagios/imagepak-base.tar.gz
4）NRPE，版本2.5.2
http://ufpr.dl.sourceforge.net/sourceforge/nagios/nrpe-2.5.2.tar.gz
5）NSCA，版本2.6
http://kent.dl.sourceforge.net/sourceforge/nagios/nsca-2.6.tar.gz
3：切换到root用户：
sudo su
4：解压缩
tar zxvf nagios-2.5.tar.gz
5：建立运行nagios的用户：
adduser nagios
6：建立安装nagios的文件夹，并使这个文件夹的所有者为nagios:nagios
mkdir /usr/local/nagios
chown nagios.nagios /usr/local/nagios
7：确认web服务器的用户
可能会通过web接口执行一些命令，必须确定web服务器以哪个用户运行的，通常为：apache：
grep &#8220;^User&#8221; /usr/local/apache2/conf/httpd.conf
8：建立命令文件组
这个新的组会包括apache的用户和nagios的用户
pw groupadd nagcmd
pw usermod apache -G nagcmd
pw usermod nagios -G nagcmd
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
cat /etc/group
nagcmd:*:9007:apache,nagios
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
8：运行配置脚本并安装nagios
cd nagios-3.0.6
./configure &#8211;prefix=/usr/local/nagios &#8211;with-gd-lib=/usr/local/lib &#8211;with-gd-inc=/usr/local/include
make all
make install
make install-init
make install-commandmode
make install-config
9：安装nagios-plugins
tar zxvf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13
./configure &#8211;prefix=/usr/local/nagios-plugins
make all
make install
安装完成以后在/usr/local/nagios-plugins-plugins会产生一个libexec的目录，将该目录全部移动到/usr/local/nagios目录下即可。
mv /usr/local/nagios-plugins-plugins/libexec/ /usr/local/nagios/
10：imagepak-base.tar.gz的安装
tar –xvzf imagepak-base.tar.gz
解压以后是base目录
mv base/ /usr/local/nagios/share/images/logos/
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
现在开始配置：
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
1：配置web接口
假设你已经运行了apache，如果没有，请参考：
http://localhost/upload/blog.php?do-showone-tid-18.html
vi /usr/local/apache2/conf/httpd.conf
添加如下内容：
引用
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName &#8220;Nagios [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/347.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
