<?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>Eric&#039;s linux and nginx!</title>
	<atom:link href="http://www.nginxs.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nginxs.com</link>
	<description>eric&#039;s blog</description>
	<lastBuildDate>Tue, 22 Nov 2011 10:20:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>招人</title>
		<link>http://www.nginxs.com/linux/480.html</link>
		<comments>http://www.nginxs.com/linux/480.html#comments</comments>
		<pubDate>Tue, 22 Nov 2011 10:20:59 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[招人]]></category>
		<category><![CDATA[招聘]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=480</guid>
		<description><![CDATA[招人： 1.熟悉apache mysql php5 搭建 2.熟悉shell 能自己写些简单脚本 3.熟悉 LVS 和 haproxy 搭建与调试 4.熟悉nagios 监控方式，能独立对一些系统应用编写脚本 5.了解 oracle sqlserver 6.能出短差 3-7天 工作地点： 北京 如有意愿，请投简历： eric@nginxs.com]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/480.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>openvpn 网络对网络</title>
		<link>http://www.nginxs.com/linux/476.html</link>
		<comments>http://www.nginxs.com/linux/476.html#comments</comments>
		<pubDate>Mon, 24 Oct 2011 13:33:44 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[openvpn]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=476</guid>
		<description><![CDATA[前段时间一直在为公司折腾这对各个地方的服务器的管理，因为有这 windows 服务器和linux 服务器，地级市的服务器没有固定IP地址，只有ADSL，所以只能别的办法穿透网络来实现网络对网络。 我的实现方法是 在IDC 机房 放置一台 LINUX 服务器来做 openvpn服务器，然后 各个地级市 的 linux 服务器为客户端，拨入openvpn服务器，然后添加路由，地级市的windows 服务器的网关设置为 本地网络linux 服务器，本地linux 开启转发。]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/476.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysql 无缝迁移</title>
		<link>http://www.nginxs.com/linux/474.html</link>
		<comments>http://www.nginxs.com/linux/474.html#comments</comments>
		<pubDate>Tue, 28 Jun 2011 06:51:51 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=474</guid>
		<description><![CDATA[说是无缝迁移可能说大了·但是经过这次迁移的确算是无缝迁移，因为凌晨两点做的迁移一直有用户在注册，一个用户也没有丢掉···

四台主机
<pre>mysql  master    10.100.0.2  （要替换掉）
mysql  slave      10.100.0.3  (要替换掉)

mysql master     10.100.0.10  (新的机器)
mysql slave       10.100.0.11  (新的机器)</pre>

迁移过程很简单  
<pre>mysql   master --&#62; slave(master) --&#62; slave(master)--&#62; slave</pre>

注意一点是  原 mysql slave 做新机器(10.100.0.3) 做 master 必须要开启日志的更新。

<pre>cat /etc/mysql/my.cnf</pre>

<pre>server-id       = 20002
master-host     = 10.100.0.2
master-user     = rel_eric
master-password = 123456
master-port     = 3306
<span style="color: #ff0000;"><strong> log-slave-updates </strong></span></pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/474.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iptables 端口针对动态IP（adsl）映射规则</title>
		<link>http://www.nginxs.com/linux/471.html</link>
		<comments>http://www.nginxs.com/linux/471.html#comments</comments>
		<pubDate>Wed, 01 Jun 2011 09:06:46 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=471</guid>
		<description><![CDATA[iptables -A PREROUTING -t nat -i ppp1 -p tcp &#8211;dport 8080 -j DNAT &#8211;to 1.1.1.3:22 iptables -A POSTROUTING -t nat -o ppp1 -p tcp -m tcp &#8211;dport 8080 -j SNAT &#8211;to 1.1.1.1 iptables -A INPUT -p tcp -m state &#8211;state NEW &#8211;dport 22 -i eth1 -j ACCEPT iptables -A PREROUTING -t nat -i ppp1 -p [...]]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/471.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>check_memcache with python</title>
		<link>http://www.nginxs.com/linux/464.html</link>
		<comments>http://www.nginxs.com/linux/464.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 04:21:52 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nagios]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=464</guid>
		<description><![CDATA[在 http://exchange.nagios.org/ 上有shell 写的脚本，<strong><a href="http://www.nginxs.com">nagios</a></strong>可以监控到命中率，他是基于 telnet 的，使用之后看到 进程里有个telnet 进程，很不爽，而且脚本休要修改一下，不然会报错，不知道大家是不是同样的问题，而我，想要的是监控命中率，还有内存使用率以及，当前连接数·所以只能自己动手来写个脚本了·在<strong><a href="http://www.nginxs.com">python</a></strong> 的官网上看到有 python-memcache包，就下来看了一下源码，使用还是很方便的·。

<pre>shell $> cat check_memcache.py</pre>
<pre>
#!/usr/bin/python
import memcache
import getopt
import sys

def usage():
   print """check_memcache is a Nagios to monitor memcached memory Plugin
   Usage:

   check_memcache [-h&#124;--help][-w&#124;warning][-c&#124;critical]

   Options:
       --help&#124;-h)
            print check_memcache help
       --warning&#124;-w)
            Sets a warning level for memcache use memory.Default is :off
       --critical&#124;-c)
            Sets a critical level for memcache use memory.Default is:off. """
   sys.exit(0)</pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/464.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iphone 流媒体服务</title>
		<link>http://www.nginxs.com/linux/459.html</link>
		<comments>http://www.nginxs.com/linux/459.html#comments</comments>
		<pubDate>Wed, 20 Apr 2011 10:38:47 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[媒体服务]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[流媒体]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=459</guid>
		<description><![CDATA[        <strong>iPhone HTTP Streaming with FFMpeg and an Open Source Segmenter</strong>

由于项目需要，需要搭建一个手机流媒体服务器，之前有做过流媒体服务器，不过都是PC客户端的•首选的是 <strong>flash media server</strong>。但是这次客户端是手机，手机客户端的种类很多，Nokia,iphone, android,他们没有一个支持 rtmp协议的而且支持的格式也很少，后来查询google,得知 android 支持rtsp,又是一路的 google 后来锁定在 live555 和 feng stream server,经过试验•用VLC 播放是可以的，在android上rtsp播放就是个废物不给力，也许是我研究的不够透彻，也在网上看其他网站的手机视频，时光网直接给的是http协议mp4•没有做任何处理•这样有一个弊端就是客户端与服务端建立连接一直下载视频，占用服务器带宽和资源，好处是解决各个手机客户端的不兼容问题。就在准备直接使用http 协议播放mp4的时候，有同事提到视频切片，就在google 上搜索，搜索到 一篇老外的文章，通过<strong><a href="http://www.nginxs.com">ffmpeg</a></strong>把视频转码，转成TS流文件，而后通过开源的 segmenter 把流文件切割成几个TS流文件，生成一个播放列表维护切成的散文件。经过试验，效果不错•该作者的 <strong><a href="http://www.nginxs.com">ffmpeg</a></strong> 参数是专门真多 iphone做了优化•在vlc上播放的效果远不如iphone上的效果~下面我把我安装过程与遇到的一些小问题都记录下来•
]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/459.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>nginx的Split Clients模块</title>
		<link>http://www.nginxs.com/linux/455.html</link>
		<comments>http://www.nginxs.com/linux/455.html#comments</comments>
		<pubDate>Fri, 01 Apr 2011 07:53:16 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[模块]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=455</guid>
		<description><![CDATA[在nginx 官网上浏览这些日子nginx 的更新，看到 更新了Split Clients 的模块·然后就看了一下·发现官网wiki的几点问题·写帮助文档的人有些不负责，我编译安装后，按照wiki的方法配置nginx.conf 报错。 官网wiki : http://wiki.nginx.org/HttpSplitClientsModule http { split-clients "${remote-addr}AAA" $variant { 0.5% .one; 2.0% .two; - ""; } server { location / { index index${variant}.html; 我实际的代码是： http { split_clients "${remote_addr}AAA" $variant { 0.5% .one; 2% .two; 3% .eric; 4% .yang; 50% .thr; * ""; } server { location / { [...]]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/455.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>博客服务器搬家美国</title>
		<link>http://www.nginxs.com/linux/450.html</link>
		<comments>http://www.nginxs.com/linux/450.html#comments</comments>
		<pubDate>Wed, 30 Mar 2011 06:18:27 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=450</guid>
		<description><![CDATA[博客关闭了有些日子了，经常来访的朋友不好意思了，由于本人刚刚到新公司，比较忙碌的原因，没有细心照料blog,所以VPS租用时间到期也没有去理会，现在的blog 服务器搬家美国了,相比访问速度会有点慢，我会精心优化的！]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/450.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>更新check_nginx插件</title>
		<link>http://www.nginxs.com/linux/441.html</link>
		<comments>http://www.nginxs.com/linux/441.html#comments</comments>
		<pubDate>Tue, 25 Jan 2011 04:24:02 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=441</guid>
		<description><![CDATA[<strong>新增功能：
增加 BasicAuth 认证功能，
去掉了显示：serveraccepts handled requests
只显示主要的: ActiveConn reading writing waiting
优化代码可以省去不需要的参数。</strong>

源码：
<pre># -*- coding: utf-8 -*-
#!/usr/bin/python
# check_nginx is a Nagios to monitor nginx statu
# my blog: http://www.nginxs.com
# The version is 1.0.1
# MSN: yangzi2008@126.com

import string
import urllib2
import getopt
import sys

def usage():
   print """check_nginx is a Nagios to monitor nginx status
   Usage:

   check_nginx [-h&#124;--help][-u&#124;--url][-p&#124;--path][-w&#124;--warning][-c&#124;--critical]

   Options:
          --help&#124;-h)</pre>]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/441.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>func install in ubuntu-server</title>
		<link>http://www.nginxs.com/linux/438.html</link>
		<comments>http://www.nginxs.com/linux/438.html#comments</comments>
		<pubDate>Fri, 21 Jan 2011 08:21:02 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[func]]></category>
		<category><![CDATA[运维工具]]></category>
		<category><![CDATA[集中管理]]></category>

		<guid isPermaLink="false">http://www.nginxs.com/?p=438</guid>
		<description><![CDATA[<strong>简介：</strong>
<strong><a href="http://www.nginxs.com">func</a></strong>: fedora 上的同意网络控制器

<strong><a href="http://www.nginxs.com">func</a></strong>为我们带来了什么:
   · 你曾经试图命令或查询的系统大量使用SSH？ 你想要一个更好的办法？
  ·你需要一个方法来审核你的系统你所有的远程命令呢？
  ·厌倦了编写shell脚本和解析命令的输出？
  ·你是美联储通过CIM，WBEM的，复杂的通信系统，防止doing /real/ work?？
  ·那么我们有没有给你买了一个解决方案。 它的 功能 。

func几乎可以解决运维上任何问题：
一个方案，系统和一些工具，需要大量的沟通方式。功能提供了一种双向认证的统称做这些事情的排序制度。你可以建立自己的在顶部，这样，很容易扩大应用在其他模块添加功能，无论你 希望通过这些工作func命令行或其他一些应用的手段。如果你只是想用命令行的功能，这是伟大的。如果你想建立应用程序的功能工具，那也很好。如果这听起来很笼统空泛，它只是因为它确实是容易扩展。

下载源码：
<pre>git clone git://git.fedorahosted.org/certmaster.git
git clone git://git.fedorahosted.org/func.git
或者：
wget https://fedorahosted.org/releases/f/u/func/func-0.27.tar.gz
wget https://fedorahosted.org/releases/c/e/certmaster/certmaster-0.27.tar.gz</pre>

#修改 master机器 hosts
<pre>127.0.0.1       localhost
127.0.1.1       mysql
127.0.1.1       certmaster
192.168.6.161   master
192.168.6.160   minions</pre>
]]></description>
		<wfw:commentRss>http://www.nginxs.com/linux/438.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

