<?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"
	>

<channel>
	<title>笞熊降猫&#124;蛋糕面包熊猫店 &#187; linux</title>
	<atom:link href="http://latteye.com/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://latteye.com</link>
	<description>latteye blog</description>
	<pubDate>Fri, 21 Nov 2008 06:10:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>抛弃VM converter, 从VM server迁移到ESXi</title>
		<link>http://latteye.com/2008/11/%e6%8a%9b%e5%bc%83vm-converter-%e4%bb%8evm-server%e8%bf%81%e7%a7%bb%e5%88%b0esxi.html</link>
		<comments>http://latteye.com/2008/11/%e6%8a%9b%e5%bc%83vm-converter-%e4%bb%8evm-server%e8%bf%81%e7%a7%bb%e5%88%b0esxi.html#comments</comments>
		<pubDate>Thu, 20 Nov 2008 09:10:12 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[system]]></category>

		<category><![CDATA[esx]]></category>

		<category><![CDATA[esxi]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[vmfs]]></category>

		<category><![CDATA[vmkfstool]]></category>

		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=486</guid>
		<description><![CDATA[迁移环境
VM server 1.04 ==&#62;  ESXi 3.0 update 3
guest OS： RHEL4.4   虚拟机硬盘使用的是lsi的方式
废话不说了，就说一下整个迁移步骤：
1. 打开ESXi的ssh来上传VM server的虚拟机文件
安装好ESXi后，虽然可... ]]></description>
			<content:encoded><![CDATA[<p>迁移环境<br />
VM server 1.04 ==&gt;  ESXi 3.0 update 3<br />
guest OS： RHEL4.4   虚拟机硬盘使用的是lsi的方式</p>
<p>废话不说了，就说一下整个迁移步骤：</p>
<p>1. 打开ESXi的ssh来上传VM server的虚拟机文件<br />
安装好ESXi后，虽然可以通过访问datastore上传下载文件，但速度实在不敢恭维，而且很容易连接超时而中断上传。<br />
打开ssh方法如下：<br />
登录到ESXi的console，按Alt-F1，输入unsupported，会提示password。 输入root的密码就可以进入shell了。<br />
ESXi的ssh是dropbear提供的，这个软件在嵌入式设备上用的很常见吧。<br />
言归正传，在/etc/inetd.conf中将如下行的注释去掉<br />
ssh     stream  tcp     nowait  root    /sbin/dropbearmulti     dropbear ++min=0,swap,group=shell -i<br />
然后ps |grep inetd 将pid记下，最后kill -HUP  这样ssh就可以连上来了。</p>
<p>2. 将VM server的虚拟机文件上传到ESXi的vmfs卷上，只要vmdk的文件全部上传就可以了</p>
<p>3. 使用vmkfstools转换磁盘格式<br />
vmkfstools -i  上传的磁盘文件  要生成的新磁盘文件（必须全路径）</p>
<p>4. 在VIC上新建虚拟机，选custom方式，虚拟机配置最好和原来VM server上一致，在建立磁盘选项中，选择使用已存在的磁盘，然后选中你上面生成的新磁盘文件。</p>
<p>好了， 完毕。没问题的话，你应该可以正常使用了原来的虚拟机了。</p>
<p>经测试，不管是windows还是linux都可以用以上方式迁移，但源虚拟机磁盘必须是scsi， 不能使用ide硬盘。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/11/%e6%8a%9b%e5%bc%83vm-converter-%e4%bb%8evm-server%e8%bf%81%e7%a7%bb%e5%88%b0esxi.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>kickstart 安装配置</title>
		<link>http://latteye.com/2008/11/autoinstall-with-kickstart.html</link>
		<comments>http://latteye.com/2008/11/autoinstall-with-kickstart.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 03:11:24 +0000</pubDate>
		<dc:creator>latteye</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[system]]></category>

		<category><![CDATA[kickstart]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=484</guid>
		<description><![CDATA[到了新公司，按照要求做一个基于 CentOS 5.2 的最小的系统。其极致性的最小仅需要保证系统能够开机。在不考虑 rpm 关联的情况下，成功的将 rpm 包的数量控制在了 60 个（还可以更小），不过这... ]]></description>
			<content:encoded><![CDATA[<p>到了新公司，按照要求做一个基于 CentOS 5.2 的最小的系统。其极致性的最小仅需要保证系统能够开机。在不考虑 rpm 关联的情况下，成功的将 rpm 包的数量控制在了 60 个（还可以更小），不过这样的系统并没有实际使用意义。</p>
<p>不过另外两个 kickstart 还是有实际用途的。<br />
<strong>1.</strong> 将包控制在了 90 个不到。满足了基本的系统。但不包含 ssh 等工具。所谓基本的系统即使没有破坏其基本的依赖关系。保证了 dmraid lvm2 等包的存在。</p>
<p><a href="http://www.divshare.com/download/5854132-ce9">点击下载</a></p>
<p>2. 将包控制在了 101 个。除了基本系统以外，包含了 iptables (仅 ipv4) ，ssh server &#038; client ，snmp。默认开启了 ssh 服务，关闭了 snmp 服务。默认 iptables 规则仅开放 22 以及 icmp。</p>
<p><a href="http://www.divshare.com/download/5854131-95c">点击下载</a></p>
<p>至于 kickstart 的使用，这里就不多说了。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/11/autoinstall-with-kickstart.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Vmware server console 连接故障解决一例</title>
		<link>http://latteye.com/2008/11/ts-vmware-server-console.html</link>
		<comments>http://latteye.com/2008/11/ts-vmware-server-console.html#comments</comments>
		<pubDate>Tue, 18 Nov 2008 03:36:03 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[console]]></category>

		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=479</guid>
		<description><![CDATA[今天发现vmware server无法用console连接上去，该服务器系统rhel4.4， vmware server 1.04，连接出错的提示是511 Error connecting to /usr/sbin/vmware-serverd process，查vmware-serverd.log，发现如下出错信息：
Nov 18 10:49:... ]]></description>
			<content:encoded><![CDATA[<p>今天发现vmware server无法用console连接上去，该服务器系统rhel4.4， vmware server 1.04，连接出错的提示是511 Error connecting to /usr/sbin/vmware-serverd process，查vmware-serverd.log，发现如下出错信息：</p>
<blockquote><p>Nov 18 10:49:25: app| The vm-list file has changed! Reloading the list of registered vms<br />
Nov 18 10:49:25: app| SSL: Unknown SSL Error<br />
Nov 18 10:49:25: app| SSL Error: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure<br />
Nov 18 10:49:25: app| OvlHostStartIo: errno 0<br />
Nov 18 10:49:25: app| vmdbPipe_Streams: Couldn&#8217;t read<br />
Nov 18 10:49:25: app| Failed to add connection to database : -32<br />
Nov 18 10:49:25: app| Failed to accept new client vmdb connection<br />
Nov 18 10:49:25: app| SP: Deleting user session: 0 username: tester<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get IPC connection<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get connection on vmdb port<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get IPC connection<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get connection on vmdb port<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get IPC connection<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get connection on vmdb port<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get IPC connection<br />
Nov 18 10:49:25: app| CnxAcceptConnection: Could not send the magic marker on 20: Broken pipe<br />
Nov 18 10:49:25: app| Failed to get connection on vmdb port</p></blockquote>
<p>ifconfig查看网卡情况，居然连vmnet的虚拟网卡都不见了，好在虚拟机还是能正常访问和工作的。<br />
查看secure登录，发现：</p>
<blockquote><p>Nov 18 10:32:40 sghsrv13 vmware-authd[11053]: PAM unable to dlopen(/lib/security/pam_unix2.so)<br />
Nov 18 10:32:40 sghsrv13 vmware-authd[11053]: PAM [dlerror: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory]</p></blockquote>
<p>看来vmware的验证模块有些问题， 将<code>/etc/pam.d/ssh</code>拷贝成vmware-authd后，log显示正常，但还是不能登陆。</p>
<p>最后索性将vmware-serverd进程kill掉，然后再<code>/usr/sbin/vmware-serverd -s -d</code>重启服务。<br />
<strong>kill vmware-serverd不会影响运行中的虚拟机，这一步其实是这次解决问题的关键</strong></p>
<p>此时尝试登陆，还是有出错提示，但已经可以登录console了，查看vmware-serverd日志：</p>
<blockquote><p>Nov 18 11:10:00: app| The vm-list file has changed! Reloading the list of registered vms<br />
Nov 18 11:10:00: app| Failed to lookup owner for: /vm/win2003/Windows Server 2003 Standard Edition.vmx. Reason: No such file or directory<br />
Nov 18 11:10:00: app| Could not get canonical path for /vm/win2003/Windows Server 2003 Standard Edition.vmx: No such file or directory<br />
Nov 18 11:10:00: app| Error Adding vm: /vm/win2003/Windows Server 2003 Standard Edition.vmx</p></blockquote>
<p>看来是删除了虚拟机但vm-list没有更新造成以上错误。<br />
手动<code>update vm-list</code>然后再登陆vmware server console，一切正常了。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/11/ts-vmware-server-console.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>RHCS cluster问题一例Cluster is not quorate.Refusing connection.</title>
		<link>http://latteye.com/2008/10/rhcs-cluster%e9%97%ae%e9%a2%98%e4%b8%80%e4%be%8bcluster-is-not-quoraterefusing-connection.html</link>
		<comments>http://latteye.com/2008/10/rhcs-cluster%e9%97%ae%e9%a2%98%e4%b8%80%e4%be%8bcluster-is-not-quoraterefusing-connection.html#comments</comments>
		<pubDate>Wed, 29 Oct 2008 10:34:31 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[cluster]]></category>

		<category><![CDATA[rhcs]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=465</guid>
		<description><![CDATA[公司两台服务器用RHCS做HA， 最近出了问题， HA状态显示failed。无奈重启node1后发现cman起不来，报错：
Oct 29 14:14:51  ccsd[5232]: Cluster is not quorate.  Refusing connection.
Oct 29 14:14:51  ccsd[5232]: Error while proc... ]]></description>
			<content:encoded><![CDATA[<p>公司两台服务器用RHCS做HA， 最近出了问题， HA状态显示failed。无奈重启node1后发现cman起不来，报错：<br />
Oct 29 14:14:51  ccsd[5232]: Cluster is not quorate.  Refusing connection.<br />
Oct 29 14:14:51  ccsd[5232]: Error while processing connect: Connection refused<br />
Oct 29 14:14:51  kernel: CMAN: sending membership request<br />
fence进程也启动不了</p>
<p>查阅资料无数， 解决方法如下：<br />
把node2上cluster进程全部关闭，然后依次重新启动服务，顺序如下<br />
service rgmanager stop<br />
service fenced stop<br />
service cman stop<br />
service ccsd stop<br />
然后按相反的顺序启动service，即<br />
node2上 service ccsd start<br />
node1上 service ccsd start<br />
node2上 service cman start<br />
node1上 service cman start<br />
&#8230;&#8230;&#8230;<br />
&#8230;&#8230;&#8230;<br />
总算干净了</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/rhcs-cluster%e9%97%ae%e9%a2%98%e4%b8%80%e4%be%8bcluster-is-not-quoraterefusing-connection.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Telnet带验证的邮件发送过程</title>
		<link>http://latteye.com/2008/10/telnet-email-sending.html</link>
		<comments>http://latteye.com/2008/10/telnet-email-sending.html#comments</comments>
		<pubDate>Tue, 28 Oct 2008 09:25:43 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[mail]]></category>

		<category><![CDATA[base64]]></category>

		<category><![CDATA[smtp]]></category>

		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=459</guid>
		<description><![CDATA[本文记录一次 telnet email server 发邮件的过程。邮件排错中，通常用这种方式比较直观，同时更容易看到“返回信息”，来帮助管理员工作。对 email 发送的过程也可以有了解。
telnet a.b.c.d 25
Trying... ]]></description>
			<content:encoded><![CDATA[<p>本文记录一次 telnet email server 发邮件的过程。邮件排错中，通常用这种方式比较直观，同时更容易看到“返回信息”，来帮助管理员工作。对 email 发送的过程也可以有了解。</p>
<blockquote><p>telnet a.b.c.d 25<br />
Trying a.b.c.d&#8230;<br />
Connected to a.b.c.d.<br />
Escape character is &#8216;^]&#8217;.<br />
220 XXX SMTP System<br />
<strong>HELO localhost</strong>  // 与服务器打招呼，并告知客户端使用的机器名字，可以随便填写<br />
250 OK<br />
<strong>AUTH LOGIN</strong>     //使用身份认证登陆指令，如果这个指令返回“Send hello first”的错误，那么需要将上面的HELO改成EHLO重试登录<br />
334 dXNlcm5hbWU6<br />
<strong>casDsdezMw== </strong> //输入已经base64_encode()过的用户名.  base64加密字符可以google一下，输入明文就可以得到加密后的字符串<br />
334 UGFzc3dvcmQ6<br />
<strong>MbSddwq3NQ==</strong>  //输入已经base64_encode()过的密码<br />
235 Authentication successful<br />
<strong>MAIL FROM: test@test.com</strong> //告诉服务器发信人的地址，这里是test@test.com<br />
250 Mail OK<br />
<strong>RCPT TO: yourname@test.com</strong>//告诉服务器收信人的地址，这里是yourname@test.com<br />
250 Mail OK<br />
<strong>DATA </strong>  //正面开始传输信件的内容，且最后要以只含有 . 的特殊行结束。<br />
354 End data with .<br />
<strong>To:yourname@test.com<br />
From:test@test.com<br />
Subject:test mail<br />
test body<br />
．</strong> //结束传输信件<br />
<strong>QUIT</strong>  //退出服务器</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/telnet-email-sending.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Apache的几个安全设定</title>
		<link>http://latteye.com/2008/10/apache-security-config.html</link>
		<comments>http://latteye.com/2008/10/apache-security-config.html#comments</comments>
		<pubDate>Tue, 28 Oct 2008 04:30:25 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=456</guid>
		<description><![CDATA[turn off indexing
edit httpd.conf file and locate the following line
Options Indexes FollowSymLinks MultiViews
Add a minus sign in front of the Indexes statement it should look like this when completed
Options -Indexes FollowSymLinks MultiViews
Apache ba... ]]></description>
			<content:encoded><![CDATA[<p><strong>turn off indexing</strong><br />
edit httpd.conf file and locate the following line<br />
Options Indexes FollowSymLinks MultiViews<br />
Add a minus sign in front of the Indexes statement it should look like this when completed<br />
Options -Indexes FollowSymLinks MultiViews</p>
<p><strong>Apache banner</strong><br />
edit httpd.conf and change the value of servertokens as following:<br />
ServerTokens Prod</p>
<p><strong>Trace/Track :</strong><br />
edit httpd.conf and set as following:<br />
RewriteEngine on<br />
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)<br />
RewriteRule .* - [F]</p>
<p><strong>Preventing Web-based Directory Enumeration Attacks</strong><br />
Customize a 404 page 404.html in documentroot directory，and add following in httpd.conf<br />
ErrorDocument 404 /404.html<br />
ErrorDocument 403 /404.html<br />
ErrorDocument 500 /404.html<br />
ErrorDocument 501 /404.html</p>
<p><strong>SSL configuration</strong><br />
SSLEngine on<br />
SSLProtocol -all +TLSv1 +SSLv3<br />
SSLCipherSuite HIGH:MEDIUM:!aNULL:!ADH:+SHA1:+MD5+HIGH:MEDIUM</p>
<p>SSLRequire %{SSL_CIPHER_USEKEYSIZE} &gt;= 128<br />
SSLCipherSuite HIGH:MEDIUM</p>
<p><strong>Solve utf-7 vulnerability</strong><br />
There are several workarounds in Apache HTTP Server to dodge this particular vulnerability on your own sites, including<br />
   AddDefaultCharset ISO-8859-1<br />
and by enabling multilanguage error docs (each translation with an explicit charset) by simply uncommenting this Include of the default httpd.conf file;<br />
   # Multi-language error messages<br />
   Include conf/extra/httpd-multilang-errordoc.conf </p>
<p><strong>mod_security</strong><br />
Strong recommend to use mod_security to protect apache.<br />
Please refer to this <a href="http://www.modsecurity.org/">http://www.modsecurity.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/apache-security-config.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>VPNC 工具的使用</title>
		<link>http://latteye.com/2008/10/vpnc-howto.html</link>
		<comments>http://latteye.com/2008/10/vpnc-howto.html#comments</comments>
		<pubDate>Sat, 25 Oct 2008 15:53:05 +0000</pubDate>
		<dc:creator>latteye</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[cisco]]></category>

		<category><![CDATA[pcf]]></category>

		<category><![CDATA[vpn]]></category>

		<category><![CDATA[vpnc]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=450</guid>
		<description><![CDATA[上周朋友给了一个 Cisco VPN 工具。通过导入 pcf 配置文件，连接到公司VPN服务器。用起来非常方便。而且 Cisco VPN 路由定义的非常好，有需要的地方才加路由，不像 Windows PPTP 服务器&#8211;一刀切... ]]></description>
			<content:encoded><![CDATA[<p>上周朋友给了一个 Cisco VPN 工具。通过导入 pcf 配置文件，连接到公司VPN服务器。用起来非常方便。而且 Cisco VPN 路由定义的非常好，有需要的地方才加路由，不像 Windows PPTP 服务器&#8211;一刀切。</p>
<p>但是我大多数的工作时间都呆在了 Arch Linux 下。如何在 Linux 下实现呢？<a href="http://www.vpnc.org/">VPNC</a> 可以做到。</p>
<p><strong>一、安装</strong></p>
<p><code>pacman -S vpnc</code></p>
<p><strong>二、配置</strong></p>
<p><strong>1. 配置文件结构</strong></p>
<p>vpnc 只读取一个配置文件，第一个读取的是 /etc/vpnc/default.conf ，当此文件不可用时 /etc/vpnc.conf 成为了第二选择。</p>
<p><strong>2. 配置文件内容</strong></p>
<p>其基本内容如下：</p>
<blockquote><p>IPSec gateway vpngateway.domain.org<br />
IPSec ID group_id<br />
IPSec secret group_password<br />
Xauth username network_signon<br />
Xauth password network_password</p></blockquote>
<p>可能还会带有类似内容：</p>
<blockquote><p>IKE Authmode psk<br />
IKE DH Group dh2</p></blockquote>
<p>ipsec 的加密方式之前已经讨论过了，相信这些字段不陌生。</p>
<p>配置描述：<br />
IPSec gateway  #VPN网关地址，可以是域名，可以是 IP。<br />
IPSec ID  ＃取个名字<br />
IPSec secret ＃交换密钥<br />
Xauth username ＃登录用户名<br />
Xauth password  ＃登录使用密码，如果配置文件不包含此字段，会在连接时请求输入。</p>
<p>3. PCF 文件的转换</p>
<p>Windows 环境下经常可以下载到 pcf 配置文件，vpnc 已经包含了 pcf2vpnc 工具。可以快速将 pcf 转换为 vpnc 配置文件。</p>
<p><code>pcf2vpnc pcffilename > /etc/vpnc.conf</code></p>
<p><strong>三、 VPNC 连接</strong></p>
<p><strong>1. 模块加载</strong></p>
<p>确定 tun 模块是否加载：</p>
<p><code>lsmod | grep tun</code></p>
<p>加载 tun 模块：</p>
<p><code>modprobe tun</code></p>
<p>查看 TUN 模块加载 dmesg 信息：</p>
<p><code>dmesg | grep TUN<br />
tun: Universal TUN/TAP device driver, 1.6</code></p>
<p>当然，在这之前，你要确定 TUN 被编译成了模块，或者已经编译进了内核中：</p>
<blockquote><p>
Device Drivers  &#8212;><br />
  Networking support  &#8212;><br />
    [*] Universal TUN/TAP device driver support</p></blockquote>
<p><strong>2. 建立链接</strong></p>
<p><code>sudo vpnc</code></p>
<p>建立此链接需要 root 权限。</p>
<p>3.断开链接</p>
<p><code>sudo vpnc-disconnect</code></p>
<p><strong>四、查看链接信息</strong></p>
<p><strong>1. tun 设备</strong></p>
<p><code>#ip add show</code></p>
<p>6: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc pfifo_fast state UNKNOWN qlen 500<br />
    link/[65534]<br />
    inet 1.1.1.30/32 scope global tun0</p>
<p><strong>2. 路由信息</strong></p>
<p><code>#ip route show</code></p>
<blockquote><p>63.149.188.150 via 172.16.5.1 dev eth0  src 172.16.5.2  mtu 1500 advmss 1460<br />
172.16.21.10 dev tun0  scope link<br />
172.16.21.11 dev tun0  scope link<br />
192.168.6.0/24 dev tun0  scope link<br />
1.1.75.0/24 dev tun0  scope link<br />
172.16.5.0/24 dev eth0  proto kernel  scope link  src 172.16.5.2<br />
192.168.3.0/24 dev tun0  scope link<br />
192.168.50.0/24 dev tun0  scope link<br />
172.16.150.0/24 dev vmnet8  proto kernel  scope link  src 172.16.150.1<br />
192.168.2.0/24 dev tun0  scope link<br />
172.16.0.0/24 dev tun0  scope link<br />
192.168.15.0/24 dev tun0  scope link<br />
192.168.12.0/24 dev tun0  scope link<br />
192.168.27.0/24 dev vmnet1  proto kernel  scope link  src 192.168.27.1<br />
10.80.0.0/16 dev tun0  scope link<br />
10.2.0.0/16 dev tun0  scope link<br />
10.3.0.0/16 dev tun0  scope link<br />
172.24.0.0/16 dev tun0  scope link<br />
10.16.0.0/16 dev tun0  scope link<br />
10.32.0.0/16 dev tun0  scope link<br />
10.55.0.0/16 dev tun0  scope link<br />
10.101.0.0/16 dev tun0  scope link<br />
10.6.0.0/16 dev tun0  scope link<br />
172.30.0.0/16 dev tun0  scope link<br />
10.100.0.0/16 dev tun0  scope link<br />
10.102.0.0/16 dev tun0  scope link<br />
172.18.0.0/16 dev tun0  scope link<br />
172.19.0.0/16 dev tun0  scope link<br />
172.16.0.0/16 dev tun0  scope link<br />
172.17.0.0/16 dev tun0  scope link<br />
172.22.0.0/16 dev tun0  scope link<br />
172.20.0.0/16 dev tun0  scope link<br />
172.21.0.0/16 dev tun0  scope link<br />
default via 172.16.5.1 dev eth0
</p></blockquote>
<p>其他 unix 可以用 netstat -r 查看。话说我还是很佩服 Linux 的高级路由的。<br />
可以清楚的看到，只有特定路由被定义到了 tun 设备上。</p>
<p>好了，基本的功能就介绍到这里。其他高级功能，比如按需自动拨号之类，网上搜搜也能搜到很多了。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/vpnc-howto.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>jboss cluster配置小结</title>
		<link>http://latteye.com/2008/10/jboss-cluster%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.html</link>
		<comments>http://latteye.com/2008/10/jboss-cluster%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.html#comments</comments>
		<pubDate>Fri, 24 Oct 2008 03:13:13 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[cluster]]></category>

		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=448</guid>
		<description><![CDATA[本周做了一个jboss cluster，配置过程不说了，网上多的是，讲讲容易出现问题的地方:
1  jboss的监听地址一定要写网卡绑定的ip，要跟前端apache mod_jk配置中指定的ip一致，不要偷懒写0.0.0.0，否则出... ]]></description>
			<content:encoded><![CDATA[<p>本周做了一个jboss cluster，配置过程不说了，网上多的是，讲讲容易出现问题的地方:<br />
1  jboss的监听地址一定要写网卡绑定的ip，要跟前端apache mod_jk配置中指定的ip一致，不要偷懒写0.0.0.0，否则出现问题的时候会让你抓狂。<br />
2  jboss cluster最好取个名字，不要使用默认的，否则同网段其他jboss的服务器也可能会加入进来，带来麻烦。<br />
    自定义名字也很简单，只需要在jboss启动脚本中加入“-Djboss.partition.name=yourcluster”, yourcluster改成你要的名字。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/jboss-cluster%e9%85%8d%e7%bd%ae%e5%b0%8f%e7%bb%93.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Linux 下 Firefox 的字体显示</title>
		<link>http://latteye.com/2008/10/configure-firefox-font-in-linux.html</link>
		<comments>http://latteye.com/2008/10/configure-firefox-font-in-linux.html#comments</comments>
		<pubDate>Sat, 11 Oct 2008 00:46:01 +0000</pubDate>
		<dc:creator>latteye</dc:creator>
		
		<category><![CDATA[desktop]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[font]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=426</guid>
		<description><![CDATA[很小的问题，但是之前都没花心思看。
我的 Arch 下 Linux 在很多网页上字体显示都有问题。具体表现为：显示出来的页面都是“_____”的符号。
即使将－首选项－内容－字体里面，设置了WenQuanYi... ]]></description>
			<content:encoded><![CDATA[<p>很小的问题，但是之前都没花心思看。<br />
我的 Arch 下 Linux 在很多网页上字体显示都有问题。具体表现为：显示出来的页面都是“_____”的符号。</p>
<p>即使将－首选项－内容－字体里面，设置了WenQuanYi，也无济于事。</p>
<p>最后在 about:config 里面解决了问题。</p>
<p>在 about:config 中，找到 font.default.zh_CN 设置为 WenQuanYi Bitmap Song<br />
                     找到 font.default.x-western 设置为 WenQuanYi Bitmap Song</p>
<p>重启，搞定！</p>
<p>其问题在于，原先的默认字体无法显示很多字符。</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/10/configure-firefox-font-in-linux.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>配置 Tomcat 使用 SSL</title>
		<link>http://latteye.com/2008/09/config-tomcat-use-ssl.html</link>
		<comments>http://latteye.com/2008/09/config-tomcat-use-ssl.html#comments</comments>
		<pubDate>Thu, 25 Sep 2008 10:21:32 +0000</pubDate>
		<dc:creator>Kiever</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[openssl]]></category>

		<category><![CDATA[ssl]]></category>

		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://latteye.com/?p=420</guid>
		<description><![CDATA[Use keytool to create ssl certificate – only for self-signed certificate
      First, use following command to generate keystore file
      keytool -genkey -alias tomcat -keyalg RSA -keystore $SavePath/KeyFile
      $SavePath is the path you save the f... ]]></description>
			<content:encoded><![CDATA[<p><strong>Use keytool to create ssl certificate – only for self-signed certificate</strong></p>
<p>      First, use following command to generate keystore file</p>
<p>      keytool -genkey -alias tomcat -keyalg RSA -keystore $SavePath/KeyFile</p>
<p>      $SavePath is the path you save the file.</p>
<p>      Second, uncomment the “SSL HTTP/1.1 Connector” entry in server.xml;</p>
<p>      <strong>Third, update server.xml to use the ssl configuration as above:</strong></p>
<blockquote><p>      <Connector port=”443″ minSpareThreads=”5″ maxSpareThreads=”75″<br />
      enableLookups=”true” disableUploadTimeout=”true”<br />
      acceptCount=”100″ maxThreads=”200″<br />
      scheme=”https” secure=”true” SSLEnabled=”true”<br />
      keystoreFile=”test.keystore” keystorePass=”123654″<br />
      clientAuth=”false” sslProtocol=”TLS”/></p></blockquote>
<p>      The bold font is the keystore filename and password.</p>
<p>      Here we use 443 as the ssl port.</p>
<p>      <strong>Use openssl to make certificate and import to tomcat</strong></p>
<p>      Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies.</p>
<p>      Requirements:</p>
<p>      APR 1.2+ development headers (libapr1-dev package)</p>
<p>      OpenSSL 0.9.7+ development headers (libssl-dev package)</p>
<p>      JNI headers from Java compatible JDK 1.4+</p>
<p>      GNU development environment (gcc, make)</p>
<p>      The wrapper library sources are located in the Tomcat binary bundle, in the bin/tomcat-native.tar.gz archive. Once the build environment is installed and the source archive is extracted, the wrapper library can be compiled using (from the folder containing the configure script, default is /usr/local/apr):</p>
<p><code> ./configure &#038;&#038; make &#038;&#038; make install</code></p>
<p>      After that,</p>
<p>      <code>export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/apr/lib</code></p>
<p>      and then update Catalina.sh script file, add following line:</p>
<p>      <code>CATALINA_OPTS=”-Djava.library.path=/usr/local/apr/lib”</code></p>
<p>      To make sure whether tomcat enabled apr, check tomcat log, if no apr enabled, the log file contains: org.apache.coyote.http11.Http11Protocol start, if apr enabled, the log should be org.apache.coyote.http11.Http11AprProtocol start.</p>
<p>      And last, need update server.xml, add line like following:</p>
<blockquote><p><Connector protocol=”org.apache.coyote.http11.Http11AprProtocol”<br />
      address=”{tomcat.listen.address}” port=”443″<br />
      enableLookups=”true” disableUploadTimeout=”true”<br />
      acceptCount=”100″ maxThreads=”200″<br />
      scheme=”https” secure=”true” SSLEnabled=”true” SSLEngine=”on”<br />
      clientAuth=”false” sslProtocol=”TLS”<br />
      SSLProtocol=”-all +SSLv3 +TLSv1″<br />
      SSLCipherSuite=”HIGH:MEDIUM:!aNULL:!ADH:+SHA1:+MD5+HIGH:MEDIUM”<br />
      SSLCertificateFile=”{your certificate file}”<br />
      SSLCertificateKeyFile=”{your certificate key file}”<br />
      SSLPassword=”{your password of certificate}” /></p></blockquote>
<p>      And if we want tomcat only listen on the certen IP, then server.xml should be updated as following:</p>
<blockquote><p>      <Connector port=”443″ address=”10.10.0.1″ minSpareThreads=”5″ maxSpareThreads=”75″<br />
      enableLookups=”true” disableUploadTimeout=”true”<br />
      acceptCount=”100″ maxThreads=”200″<br />
      scheme=”https” secure=”true” SSLEnabled=”true”<br />
      keystoreFile=”test.keystore” keystorePass=”123654″<br />
      clientAuth=”false” sslProtocol=”TLS”/></p></blockquote>
<p>      Add address parameter, tomcat will only listen the IP you defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://latteye.com/2008/09/config-tomcat-use-ssl.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
