<?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>Star life &#187; Tech Script</title>
	<atom:link href="http://liuchangjun.com/category/all-for-tech-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://liuchangjun.com</link>
	<description>无欲速 无见小利 欲速则不达 见小利则大事不成</description>
	<lastBuildDate>Wed, 13 Jul 2011 15:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Howto: Update php 5.1 to 5.2 in CentOS 5</title>
		<link>http://liuchangjun.com/2010/11/09/howto-update-php-5-1-to-5-2-in-centos-5/</link>
		<comments>http://liuchangjun.com/2010/11/09/howto-update-php-5-1-to-5-2-in-centos-5/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 06:54:04 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=231</guid>
		<description><![CDATA[<p>使用yum升级php</p> <p># uname -a Linux hzserver2 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux</p> <p># cat /etc/yum.repos.d/CentOS-Testing.repo [c5-testing] name=CentOS-5 Testing #baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/ baseurl=http://dev.centos.org/centos/5/testing/i386/ enabled=1 gpgcheck=1 gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing includepkgs=php*</p> <p># yum update php</p> <p>Refer to: PHP 5.1 To 5.2</p> ]]></description>
			<content:encoded><![CDATA[<p>使用yum升级php</p>
<blockquote><p># uname -a<br />
Linux hzserver2 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux</p>
<p># cat /etc/yum.repos.d/CentOS-Testing.repo<br />
[c5-testing]<br />
name=CentOS-5 Testing<br />
#baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/<br />
baseurl=http://dev.centos.org/centos/5/testing/i386/<br />
enabled=1<br />
gpgcheck=1<br />
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing<br />
includepkgs=php*</p>
<p># yum update php</p></blockquote>
<p>Refer to:<br />
<a href="http://wiki.centos.org/HowTos/PHP_5.1_To_5.2">PHP 5.1 To 5.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2010/11/09/howto-update-php-5-1-to-5-2-in-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP header warning: Cannot modify header information &#8211; headers already sent by &#8230;</title>
		<link>http://liuchangjun.com/2009/12/29/php_header_warning_header_already_sent/</link>
		<comments>http://liuchangjun.com/2009/12/29/php_header_warning_header_already_sent/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 07:36:35 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=174</guid>
		<description><![CDATA[<p>学习Wordpress插件中，出现PHP错误告警信息： Cannot modify header information &#8211; headers already sent by &#8230;&#8230; 参考下面的文章，使用工具去除PHP代码中的BOM，问题解决。</p> <p>Refer to: Cannot modify header information &#8211; headers already sent by错误解决办法</p> ]]></description>
			<content:encoded><![CDATA[<p>学习Wordpress插件中，出现PHP错误告警信息：<br />
Cannot modify header information &#8211; headers already sent by &#8230;&#8230;<br />
参考下面的文章，使用工具去除PHP代码中的BOM，问题解决。</p>
<p>Refer to:<br />
<a href="http://www.91php.cn/rewrite.php/read-188.html">Cannot modify header information &#8211; headers already sent by错误解决办法</a></p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/12/29/php_header_warning_header_already_sent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Nuggets, a cool CSS slide share!</title>
		<link>http://liuchangjun.com/2009/11/12/css-nuggets/</link>
		<comments>http://liuchangjun.com/2009/11/12/css-nuggets/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:33:28 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=168</guid>
		<description><![CDATA[CSS Nuggets</p> View more presentations from Anna Debenham. [...]]]></description>
			<content:encoded><![CDATA[<div id="__ss_2347968" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="CSS Nuggets" href="http://www.slideshare.net/maban/css-nuggets">CSS Nuggets</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=bcl7-091026061858-phpapp01&amp;rel=0&amp;stripped_title=css-nuggets" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=bcl7-091026061858-phpapp01&amp;rel=0&amp;stripped_title=css-nuggets" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/maban">Anna Debenham</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/11/12/css-nuggets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: 如何创建和发布自己的WordPress插件</title>
		<link>http://liuchangjun.com/2009/09/25/howto-create-wordpress-plugin/</link>
		<comments>http://liuchangjun.com/2009/09/25/howto-create-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 08:55:17 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=153</guid>
		<description><![CDATA[发布插件到官网。当插件更新时，每个安装插件的博客就可以自动更新了。 [...]]]></description>
			<content:encoded><![CDATA[<p>Refer to: <a href="http://wordpress.org/extend/plugins/about/">http://wordpress.org/extend/plugins/about/</a></p>
<p>第一步：注册插件开发的账号<br />
<a href="http://wordpress.org/extend/plugins/register.php">http://wordpress.org/extend/plugins/register.php</a><br />
注：该账号可以开发和提交插件和主题。</p>
<p>第二步：提交插件申请<br />
<a href="http://wordpress.org/extend/plugins/add/">http://wordpress.org/extend/plugins/add/</a><br />
注：因为是人工审批，一般提交后1到2天才能完成。</p>
<p>第三步：提交插件</p>
<p>任务1：提交新的插件<br />
# 创建插件目录<br />
$ mkdir my-local-dir<br />
# Check out 版本<br />
$ svn co http://svn.wp-plugins.org/your-plugin-name my-local-dir<br />
# 复制插件文件<br />
$ cd my-local-dir/<br />
my-local-dir/$ cp ~/my-plugin.php trunk/my-plugin.php<br />
my-local-dir/$ cp ~/readme.txt trunk/readme.txt<br />
# 添加文件到版本<br />
my-local-dir/$ svn add trunk/*<br />
> A	trunk/my-plugin.php<br />
> A	trunk/readme.txt<br />
# Check in 版本<br />
my-local-dir/$ svn ci -m &#8216;Adding first version of my plugin&#8217;<br />
> Adding	trunk/my-plugin.php<br />
> Adding	trunk/readme.txt<br />
> Transmitting file data .<br />
> Committed revision 11326.</p>
<p>任务2：修改插件<br />
# 更新本地版本<br />
$ cd my-local-dir/<br />
my-local-dir/$ svn up<br />
> At revision 11326.<br />
# 修改本地插件<br />
my-local-dir/$ vi trunk/my-plugin.php<br />
# 检查哪些文件修改过<br />
my-local-dir/$ svn stat<br />
> M	trunk/my-plugin.php<br />
# 检查文件修改的内容<br />
my-local-dir/$ svn diff<br />
> * What comes out is essentially the result of a<br />
  * standard `diff -u` between your local copy and the<br />
  * original copy you downloaded.<br />
# Check in 版本<br />
my-local-dir/$ svn ci -m “fancy new feature: now you can foo *and* bar at the same time”<br />
> Sending	trunk/my-plugin.php<br />
> Transmitting file data .<br />
> Committed revision 11327.</p>
<p>任务3：标记新版本<br />
# 复制最新的文件到到新版本目录<br />
my-local-dir/$ svn cp trunk tags/2.0<br />
> A tags/2.0<br />
# Check in 新版本目录<br />
my-local-dir/$ svn ci -m “tagging version 2.0&#8243;<br />
> Adding         tags/2.0<br />
> Adding         tags/2.0/my-plugin.php<br />
> Adding         tags/2.0/readme.txt<br />
> Committed revision 11328.<br />
注：如果只需要保存最新版本，可以省略这个步骤。</p>
<p>SVN链接和具体操作步骤：<br />
Wordpress plugin SVN  Link: <a href="http://plugins.svn.wordpress.org/XXX/">http://plugins.svn.wordpress.org/XXX/</a><br />
Wordpress plugin SVN  Howto: <a href="http://wordpress.org/extend/plugins/about/svn/">http://wordpress.org/extend/plugins/about/svn/</a></p>
<p>插件的说明文件需要符合标准：<br />
FAQ: <a href="http://wordpress.org/extend/plugins/about/faq/">http://wordpress.org/extend/plugins/about/faq/</a><br />
readme.txt standard: <a href="http://wordpress.org/extend/plugins/about/readme.txt">http://wordpress.org/extend/plugins/about/readme.txt</a><br />
readme.txt validator:: <a href="http://wordpress.org/extend/plugins/about/validator/">http://wordpress.org/extend/plugins/about/validator/</a><br />
注：XXX就是提交的插件名称；官网上提供插件说明文件的验证。</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/09/25/howto-create-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apply one ssh account from blockcn.com</title>
		<link>http://liuchangjun.com/2009/08/14/apply-one-ssh-account-from-blockcn-com/</link>
		<comments>http://liuchangjun.com/2009/08/14/apply-one-ssh-account-from-blockcn-com/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 15:57:51 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[Tech Tools]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=139</guid>
		<description><![CDATA[<p>For Linux study and access the internet unlimited, I applied one ssh account from blockcn.com.</p> <p>Ps. </p> <p>Tutorial of CheDong</p> <p>Putty Homepage</p> <p># plink user@ssh.server -D 127.0.0.1:7070</p> ]]></description>
			<content:encoded><![CDATA[<p>For Linux study and access the internet unlimited, I applied one ssh account from <a href="http://blockcn.com">blockcn.com</a>.</p>
<p>Ps. <a href="http://www.chedong.com/blog/archives/001246.html"></a></p>
<p><a href="http://www.chedong.com/blog/archives/001246.html">Tutorial of CheDong</a></p>
<p><a href="http://www.putty.org/">Putty Homepage</a></p>
<p># plink user@ssh.server -D 127.0.0.1:7070</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/08/14/apply-one-ssh-account-from-blockcn-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenVPN server install and config the bridge on Fedora 10</title>
		<link>http://liuchangjun.com/2009/06/30/openvpn-server-install-and-config-the-bridge-on-fedora-10/</link>
		<comments>http://liuchangjun.com/2009/06/30/openvpn-server-install-and-config-the-bridge-on-fedora-10/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:50:31 +0000</pubDate>
		<dc:creator>Liu Changjun</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=123</guid>
		<description><![CDATA[<p>Transfered from my journal.</p> <p>Note: It is easy to install and config OpenVPN server on Windows XP. We should remember add the bridge (桥接) between the local network interface and the virtual network interface.</p> <p>Official document: OpenVPN 2.0 HOWTO Ethernet Bridging Useful document: OpenVPN&#8212;-桥接 常见问题 1.拨通vpn后ping不通vpn server的内网ip 原因：server.conf中dev 配置有问题 解决方案：将dev tap设置为dev tap0 2.各个vpn客户端之间不能互通 原因：server.conf中client-to-client配置没有打开 解决方案：将此项加入到server.conf中</p> [...]]]></description>
			<content:encoded><![CDATA[<p>Transfered from my journal.</p>
<p>Note: It is easy to install and config OpenVPN server on Windows XP. We should remember add the bridge (桥接) between the local network interface and the virtual network interface.</p>
<p>Official document:<br />
<a rel="nofollow" href="http://openvpn.net/howto.html" target="_blank">OpenVPN 2.0 HOWTO</a><br />
<a rel="nofollow" href="http://openvpn.net/bridge.html" target="_blank">Ethernet Bridging</a><br />
<span id="more-123"></span><br />
Useful document:<br />
<a rel="nofollow" href="http://blog.chinaunix.net/u1/46701/showart_1147730.html" target="_blank">OpenVPN&#8212;-桥接</a><br />
常见问题<br />
1.拨通vpn后ping不通vpn server的内网ip<br />
原因：server.conf中dev 配置有问题<br />
解决方案：将dev tap设置为dev tap0<br />
2.各个vpn客户端之间不能互通<br />
原因：server.conf中client-to-client配置没有打开<br />
解决方案：将此项加入到server.conf中</p>
<p>Required package:<br />
<a rel="nofollow" href="http://rpm.pbone.net/index.php3/stat/4/idpl/10414045/com/bridge-utils-1.2-6.fc10.i386.rpm.html" target="_blank">bridge-utils rpm build for : Fedora 10</a><br />
Content of RPM :<br />
/usr/sbin/brctl<br />
/usr/share/doc/bridge-utils-1.2<br />
/usr/share/doc/bridge-utils-1.2/AUTHORS<br />
/usr/share/doc/bridge-utils-1.2/COPYING<br />
/usr/share/doc/bridge-utils-1.2/FAQ<br />
/usr/share/doc/bridge-utils-1.2/HOWTO<br />
/usr/share/man/man8/brctl.8.gz</p>
<p>System environment:</p>
<p>#&gt; uname -a<br />
Linux frontend 2.6.27.5-117.fc10.i686 #1 SMP Tue Nov 18 12:19:59 EST 2008 i686 i686 i386 GNU/Linux</p>
<p>#&gt; ifconfig -a<br />
eth0      Link encap:Ethernet  HWaddr 00:13:72:40:26:7F<br />
          inet addr:10.4.3.17  Bcast:10.4.3.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::213:72ff:fe40:267f/64 Scope:Link<br />
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1<br />
          RX packets:51999 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:15652 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:100<br />
          RX bytes:5051569 (4.8 MiB)  TX bytes:1757669 (1.6 MiB)</p>
<p>eth1      Link encap:Ethernet  HWaddr 00:13:72:40:26:80<br />
          inet addr:192.168.100.17  Bcast:192.168.100.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::213:72ff:fe40:2680/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:5747 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:2340 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:1000<br />
          RX bytes:470066 (459.0 KiB)  TX bytes:253434 (247.4 KiB)</p>
<p>lo        Link encap:Local Loopback<br />
          inet addr:127.0.0.1  Mask:255.0.0.0<br />
          inet6 addr: ::1/128 Scope:Host<br />
          UP LOOPBACK RUNNING  MTU:16436  Metric:1<br />
          RX packets:491 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:491 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:0<br />
          RX bytes:130767 (127.7 KiB)  TX bytes:130767 (127.7 KiB)</p>
<p>#&gt; route -n<br />
Kernel IP routing table<br />
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br />
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0<br />
10.4.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1<br />
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth1<br />
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth0<br />
192.168.0.0     192.168.100.254 255.255.0.0     UG    0      0        0 eth0<br />
0.0.0.0         10.4.3.1        0.0.0.0         UG    0      0        0 eth1</p>
<p>Installed configuration:</p>
<p>#&gt; cat /etc/rc.d/rc.local<br />
# Start OpenVPN service<br />
/etc/openvpn/bridge-start<br />
/sbin/service openvpn start<br />
# Add route<br />
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.100.254 eth1<br />
#route add default gw 10.4.3.1 eth0<br />
route add default gw 10.4.3.1 br0<br />
Note 1:<br />
We should add the default gateway after we started the OpenVPN server, the bridge-start script will clear the default gateway.<br />
Note2:<br />
The default route should changed to br0 not eth0 &#8211; the bridged interface.</p>
<p>#&gt; ifconfig -a<br />
br0       Link encap:Ethernet  HWaddr 00:13:72:40:26:7F<br />
          inet addr:10.4.3.17  Bcast:10.4.3.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::213:72ff:fe40:267f/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:48639 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:15365 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:0<br />
          RX bytes:4152487 (3.9 MiB)  TX bytes:1727401 (1.6 MiB)</p>
<p>eth0      Link encap:Ethernet  HWaddr 00:13:72:40:26:7F<br />
          inet addr:10.4.3.17  Bcast:10.4.3.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::213:72ff:fe40:267f/64 Scope:Link<br />
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1<br />
          RX packets:51999 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:15652 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:100<br />
          RX bytes:5051569 (4.8 MiB)  TX bytes:1757669 (1.6 MiB)</p>
<p>eth1      Link encap:Ethernet  HWaddr 00:13:72:40:26:80<br />
          inet addr:192.168.100.17  Bcast:192.168.100.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::213:72ff:fe40:2680/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:5747 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:2340 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:1000<br />
          RX bytes:470066 (459.0 KiB)  TX bytes:253434 (247.4 KiB)</p>
<p>lo        Link encap:Local Loopback<br />
          inet addr:127.0.0.1  Mask:255.0.0.0<br />
          inet6 addr: ::1/128 Scope:Host<br />
          UP LOOPBACK RUNNING  MTU:16436  Metric:1<br />
          RX packets:491 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:491 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:0<br />
          RX bytes:130767 (127.7 KiB)  TX bytes:130767 (127.7 KiB)</p>
<p>tap0      Link encap:Ethernet  HWaddr AE:11:02:37:F7:88<br />
          inet6 addr: fe80::ac11:2ff:fe37:f788/64 Scope:Link<br />
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1<br />
          RX packets:301 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:34402 errors:0 dropped:17 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:100<br />
          RX bytes:30484 (29.7 KiB)  TX bytes:3010000 (2.8 MiB)</p>
<p>#&gt; route -n<br />
Kernel IP routing table<br />
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br />
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1<br />
10.4.3.0        0.0.0.0         255.255.255.0   U     0      0        0 br0<br />
10.4.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0<br />
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0<br />
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1<br />
192.168.0.0     192.168.100.254 255.255.0.0     UG    0      0        0 eth1<br />
0.0.0.0         10.4.3.1        0.0.0.0         UG    0      0        0 br0</p>
<p>#&gt; ls /etc/openvpn<br />
bridge-start  sample-keys<br />
bridge-stop   server.conf</p>
<p>#&gt; cat /etc/openvpn/bridge-start<br />
#!/bin/bash</p>
<p>#################################<br />
# Set up Ethernet bridge on Linux<br />
# Requires: bridge-utils<br />
#################################</p>
<p># Define Bridge Interface<br />
br=”br0&#8243;</p>
<p># Define list of TAP interfaces to be bridged,<br />
# for example tap=”tap0 tap1 tap2&#8243;.<br />
tap=”tap0&#8243;</p>
<p># Define physical ethernet interface to be bridged<br />
# with TAP interface(s) above.<br />
eth=”eth0&#8243;<br />
eth_ip=”10.4.3.17&#8243;<br />
eth_netmask=”255.255.255.0&#8243;<br />
eth_broadcast=”10.4.3.255&#8243;</p>
<p>for t in $tap; do<br />
    openvpn &#8211;mktun &#8211;dev $t<br />
done</p>
<p>brctl addbr $br<br />
brctl addif $br $eth</p>
<p>for t in $tap; do<br />
    brctl addif $br $t<br />
done</p>
<p>for t in $tap; do<br />
    ifconfig $t 0.0.0.0 promisc up<br />
done</p>
<p>ifconfig $eth 0.0.0.0 promisc up</p>
<p>ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast</p>
<p>#&gt; cat /etc/openvpn/bridge-stop<br />
#!/bin/bash</p>
<p>####################################<br />
# Tear Down Ethernet bridge on Linux<br />
####################################</p>
<p># Define Bridge Interface<br />
br=”br0&#8243;</p>
<p># Define list of TAP interfaces to be bridged together<br />
tap=”tap0&#8243;</p>
<p>ifconfig $br down<br />
brctl delbr $br</p>
<p>for t in $tap; do<br />
    openvpn &#8211;rmtun &#8211;dev $t<br />
done</p>
<p>#&gt; cat /etc/openvpn/server.conf<br />
#################################################<br />
# Sample OpenVPN 2.0 config file for            #<br />
# multi-client server.                          #<br />
#                                               #<br />
# This file is for the server side              #<br />
# of a many-clients &lt;-&gt; one-server              #<br />
# OpenVPN configuration.                        #<br />
#                                               #<br />
# OpenVPN also supports                         #<br />
# single-machine &lt;-&gt; single-machine             #<br />
# configurations (See the Examples page         #<br />
# on the web site for more info).               #<br />
#                                               #<br />
# This config should work on Windows            #<br />
# or Linux/BSD systems.  Remember on            #<br />
# Windows to quote pathnames and use            #<br />
# double backslashes, e.g.:                     #<br />
# “C:\\Program Files\\OpenVPN\\config\\foo.key” #<br />
#                                               #<br />
# Comments are preceded with &#8216;#&#8217; or &#8216;;&#8217;         #<br />
#################################################</p>
<p># Which local IP address should OpenVPN<br />
# listen on? (optional)<br />
;local a.b.c.d</p>
<p># Which TCP/UDP port should OpenVPN listen on?<br />
# If you want to run multiple OpenVPN instances<br />
# on the same machine, use a different port<br />
# number for each one.  You will need to<br />
# open up this port on your firewall.<br />
port 1194<br />
;port 5000</p>
<p># TCP or UDP server?<br />
;proto tcp<br />
proto udp</p>
<p># “dev tun” will create a routed IP tunnel,<br />
# “dev tap” will create an ethernet tunnel.<br />
# Use “dev tap0&#8243; if you are ethernet bridging<br />
# and have precreated a tap0 virtual interface<br />
# and bridged it with your ethernet interface.<br />
# If you want to control access policies<br />
# over the VPN, you must create firewall<br />
# rules for the the TUN/TAP interface.<br />
# On non-Windows systems, you can give<br />
# an explicit unit number, such as tun0.<br />
# On Windows, use “dev-node” for this.<br />
# On most systems, the VPN will not function<br />
# unless you partially or fully disable<br />
# the firewall for the TUN/TAP interface.<br />
dev tap0<br />
;dev tun</p>
<p># Windows needs the TAP-Win32 adapter name<br />
# from the Network Connections panel if you<br />
# have more than one.  On XP SP2 or higher,<br />
# you may need to selectively disable the<br />
# Windows firewall for the TAP adapter.<br />
# Non-Windows systems usually don&#8217;t need this.<br />
;dev-node MyTap</p>
<p># SSL/TLS root certificate (ca), certificate<br />
# (cert), and private key (key).  Each client<br />
# and the server must have their own cert and<br />
# key file.  The server and all clients will<br />
# use the same ca file.<br />
#<br />
# See the “easy-rsa” directory for a series<br />
# of scripts for generating RSA certificates<br />
# and private keys.  Remember to use<br />
# a unique Common Name for the server<br />
# and each of the client certificates.<br />
#<br />
# Any X509 key management system can be used.<br />
# OpenVPN can also use a PKCS #12 formatted key file<br />
# (see “pkcs12&#8243; directive in man page).<br />
ca sample-keys/tmp-ca.crt<br />
cert sample-keys/server.crt<br />
key sample-keys/server.key  # This file should be kept secret</p>
<p># Diffie hellman parameters.<br />
# Generate your own with:<br />
#   openssl dhparam -out dh1024.pem 1024<br />
# Substitute 2048 for 1024 if you are using<br />
# 2048 bit keys.<br />
dh sample-keys/dh1024.pem</p>
<p># Configure server mode and supply a VPN subnet<br />
# for OpenVPN to draw client addresses from.<br />
# The server will take 10.8.0.1 for itself,<br />
# the rest will be made available to clients.<br />
# Each client will be able to reach the server<br />
# on 10.8.0.1. Comment this line out if you are<br />
# ethernet bridging. See the man page for more info.<br />
;server 10.8.0.0 255.255.255.0</p>
<p># Maintain a record of client &lt;-&gt; virtual IP address<br />
# associations in this file.  If OpenVPN goes down or<br />
# is restarted, reconnecting clients can be assigned<br />
# the same virtual IP address from the pool that was<br />
# previously assigned.<br />
;ifconfig-pool-persist ipp.txt</p>
<p># Configure server mode for ethernet bridging.<br />
# You must first use your OS&#8217;s bridging capability<br />
# to bridge the TAP interface with the ethernet<br />
# NIC interface.  Then you must manually set the<br />
# IP/netmask on the bridge interface, here we<br />
# assume 10.8.0.4/255.255.255.0.  Finally we<br />
# must set aside an IP range in this subnet<br />
# (start=10.8.0.50 end=10.8.0.100) to allocate<br />
# to connecting clients.  Leave this line commented<br />
# out unless you are ethernet bridging.<br />
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100<br />
server-bridge 10.4.3.17 255.255.0.0 10.4.3.221 10.4.3.230</p>
<p># Push routes to the client to allow it<br />
# to reach other private subnets behind<br />
# the server.  Remember that these<br />
# private subnets will also need<br />
# to know to route the OpenVPN client<br />
# address pool (10.8.0.0/255.255.255.0)<br />
# back to the OpenVPN server.<br />
;push “route 192.168.10.0 255.255.255.0&#8243;<br />
;push “route 192.168.20.0 255.255.255.0&#8243;<br />
push “route 10.4.0.0 255.255.0.0 10.4.3.1&#8243;</p>
<p># To assign specific IP addresses to specific<br />
# clients or if a connecting client has a private<br />
# subnet behind it that should also have VPN access,<br />
# use the subdirectory “ccd” for client-specific<br />
# configuration files (see man page for more info).</p>
<p># EXAMPLE: Suppose the client<br />
# having the certificate common name “Thelonious”<br />
# also has a small subnet behind his connecting<br />
# machine, such as 192.168.40.128/255.255.255.248.<br />
# First, uncomment out these lines:<br />
;client-config-dir ccd<br />
;route 192.168.40.128 255.255.255.248<br />
# Then create a file ccd/Thelonious with this line:<br />
#   iroute 192.168.40.128 255.255.255.248<br />
# This will allow Thelonious&#8217; private subnet to<br />
# access the VPN.  This example will only work<br />
# if you are routing, not bridging, i.e. you are<br />
# using “dev tun” and “server” directives.</p>
<p># EXAMPLE: Suppose you want to give<br />
# Thelonious a fixed VPN IP address of 10.9.0.1.<br />
# First uncomment out these lines:<br />
;client-config-dir ccd<br />
;route 10.9.0.0 255.255.255.252<br />
# Then add this line to ccd/Thelonious:<br />
#   ifconfig-push 10.9.0.1 10.9.0.2</p>
<p># Suppose that you want to enable different<br />
# firewall access policies for different groups<br />
# of clients.  There are two methods:<br />
# (1) Run multiple OpenVPN daemons, one for each<br />
#     group, and firewall the TUN/TAP interface<br />
#     for each group/daemon appropriately.<br />
# (2) (Advanced) Create a script to dynamically<br />
#     modify the firewall in response to access<br />
#     from different clients.  See man<br />
#     page for more info on learn-address script.<br />
;learn-address ./script</p>
<p># If enabled, this directive will configure<br />
# all clients to redirect their default<br />
# network gateway through the VPN, causing<br />
# all IP traffic such as web browsing and<br />
# and DNS lookups to go through the VPN<br />
# (The OpenVPN server machine may need to NAT<br />
# the TUN/TAP interface to the internet in<br />
# order for this to work properly).<br />
# CAVEAT: May break client&#8217;s network config if<br />
# client&#8217;s local DHCP server packets get routed<br />
# through the tunnel.  Solution: make sure<br />
# client&#8217;s local DHCP server is reachable via<br />
# a more specific route than the default route<br />
# of 0.0.0.0/0.0.0.0.<br />
;push “redirect-gateway”</p>
<p># Certain Windows-specific network settings<br />
# can be pushed to clients, such as DNS<br />
# or WINS server addresses.  CAVEAT:<br />
# <a rel="nofollow" href="http://openvpn.net/faq.html#dhcpcaveats" target="_blank">http://openvpn.net/faq.html#dhcpcaveats</a><br />
;push “dhcp-option DNS 10.8.0.1&#8243;<br />
;push “dhcp-option WINS 10.8.0.1&#8243;</p>
<p># Uncomment this directive to allow different<br />
# clients to be able to “see” each other.<br />
# By default, clients will only see the server.<br />
# To force clients to only see the server, you<br />
# will also need to appropriately firewall the<br />
# server&#8217;s TUN/TAP interface.<br />
;client-to-client<br />
client-to-client</p>
<p># Uncomment this directive if multiple clients<br />
# might connect with the same certificate/key<br />
# files or common names.  This is recommended<br />
# only for testing purposes.  For production use,<br />
# each client should have its own certificate/key<br />
# pair.<br />
#<br />
# IF YOU HAVE NOT GENERATED INDIVIDUAL<br />
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,<br />
# EACH HAVING ITS OWN UNIQUE “COMMON NAME”,<br />
# UNCOMMENT THIS LINE OUT.<br />
;duplicate-cn<br />
duplicate-cn</p>
<p># The keepalive directive causes ping-like<br />
# messages to be sent back and forth over<br />
# the link so that each side knows when<br />
# the other side has gone down.<br />
# Ping every 10 seconds, assume that remote<br />
# peer is down if no ping received during<br />
# a 120 second time period.<br />
keepalive 10 120</p>
<p># For extra security beyond that provided<br />
# by SSL/TLS, create an “HMAC firewall”<br />
# to help block DoS attacks and UDP port flooding.<br />
#<br />
# Generate with:<br />
#   openvpn &#8211;genkey &#8211;secret ta.key<br />
#<br />
# The server and each client must have<br />
# a copy of this key.<br />
# The second parameter should be &#8217;0&#8242;<br />
# on the server and &#8217;1&#8242; on the clients.<br />
;tls-auth ta.key 0 # This file is secret</p>
<p># Select a cryptographic cipher.<br />
# This config item must be copied to<br />
# the client config file as well.<br />
;cipher BF-CBC        # Blowfish (default)<br />
;cipher AES-128-CBC   # AES<br />
;cipher DES-EDE3-CBC  # Triple-DES</p>
<p># Enable compression on the VPN link.<br />
# If you enable it here, you must also<br />
# enable it in the client config file.<br />
comp-lzo</p>
<p># The maximum number of concurrently connected<br />
# clients we want to allow.<br />
;max-clients 100</p>
<p># It&#8217;s a good idea to reduce the OpenVPN<br />
# daemon&#8217;s privileges after initialization.<br />
#<br />
# You can uncomment this out on<br />
# non-Windows systems.<br />
user nobody<br />
group nobody</p>
<p># The persist options will try to avoid<br />
# accessing certain resources on restart<br />
# that may no longer be accessible because<br />
# of the privilege downgrade.<br />
persist-key<br />
persist-tun</p>
<p># Output a short status file showing<br />
# current connections, truncated<br />
# and rewritten every minute.<br />
status openvpn-status.log</p>
<p># By default, log messages will go to the syslog (or<br />
# on Windows, if running as a service, they will go to<br />
# the “\Program Files\OpenVPN\log” directory).<br />
# Use log or log-append to override this default.<br />
# “log” will truncate the log file on OpenVPN startup,<br />
# while “log-append” will append to it.  Use one<br />
# or the other (but not both).<br />
;log         openvpn.log<br />
;log-append  openvpn.log</p>
<p># Set the appropriate level of log<br />
# file verbosity.<br />
#<br />
# 0 is silent, except for fatal errors<br />
# 4 is reasonable for general usage<br />
# 5 and 6 can help to debug connection problems<br />
# 9 is extremely verbose<br />
verb 4</p>
<p># Silence repeating messages.  At most 20<br />
# sequential messages of the same message<br />
# category will be output to the log.<br />
;mute 20</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/06/30/openvpn-server-install-and-config-the-bridge-on-fedora-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sun Solaris 10 Jumpstart installation</title>
		<link>http://liuchangjun.com/2009/06/30/sun-solaris-10-jumpstart-installation/</link>
		<comments>http://liuchangjun.com/2009/06/30/sun-solaris-10-jumpstart-installation/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:49:35 +0000</pubDate>
		<dc:creator>Liu Changjun</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=121</guid>
		<description><![CDATA[<p>Transfered from my journal.</p> <p>Sun installation document: 820-5239 &#60;&#60;Solaris 10 10/08 Installation Guide: CustomJumpStart and Advanced Installations&#62;&#62; 820-5237 &#60;&#60;Solaris 10 10/08 Installation Guide:Network-Based Installations&#62;&#62; Create installation directory: CD 1 #&#62; /cdrom/s0/Solaris_10/Tools/setup_install_server /export/install10 CD 2-5 #&#62; /cdrom/Solaris_10/Tools/add_to_install_server /export/install10 Solaris 10 patch #&#62; unzip /export/install10/patchdb/5.10/sparc/10_Recommended.zip</p> <p>Update /etc/hosts 192.168.1.45 autotest</p> <p>Update /etc/ethers 0:17:4f:0f:42:b0 autotest</p> <p>Update /etc/dfs/dfstab share -F [...]]]></description>
			<content:encoded><![CDATA[<p>Transfered from my journal.</p>
<p>Sun installation document:<br />
820-5239<br />
&lt;&lt;Solaris 10 10/08 Installation Guide: CustomJumpStart and Advanced Installations&gt;&gt;<br />
820-5237<br />
&lt;&lt;Solaris 10 10/08 Installation Guide:Network-Based Installations&gt;&gt;<br />
<span id="more-121"></span><br />
Create installation directory:<br />
CD 1<br />
#&gt; /cdrom/s0/Solaris_10/Tools/setup_install_server  /export/install10<br />
CD 2-5<br />
#&gt; /cdrom/Solaris_10/Tools/add_to_install_server /export/install10<br />
Solaris 10 patch<br />
#&gt; unzip /export/install10/patchdb/5.10/sparc/10_Recommended.zip</p>
<p>Update /etc/hosts<br />
192.168.1.45   autotest</p>
<p>Update /etc/ethers<br />
0:17:4f:0f:42:b0 autotest</p>
<p>Update /etc/dfs/dfstab<br />
share -F nfs -o ro,anon=0 /jstart<br />
share -F nfs -o ro,anon=0 /export/install10<br />
#&gt; shareall<br />
#&gt; /etc/init.d/nfs.server stop|start</p>
<p>Update Jumpstart config file<br />
cp –pr /export/install10/Solaris_10/Misc/jumpstart_sample /jstart</p>
<p>Update /jstart/sysidcfg<br />
keyboard=English<br />
system_locale=en_US<br />
timezone=US/Central<br />
terminal=vt100<br />
timeserver=localhost<br />
name_service=none<br />
nfs4_domain=dynamic<br />
root_password=IbIPT4W6ebNWc<br />
network_interface=primary<br />
{<br />
default_route=10.4.3.1<br />
netmask=255.255.255.0<br />
protocol_ipv6=no<br />
}<br />
security_policy=none<br />
service_profile=open</p>
<p>Update /jstart/rules<br />
hostname cbtmsu1   &#8211;   any_machine.280  10recommended</p>
<p>Update /jstart/any_machine.280<br />
install_type    initial_install<br />
system_type     server<br />
partitioning    explicit<br />
filesys         c1t0d0s0 2048    swap<br />
filesys         c1t0d0s1 free    /</p>
<p>Check the Jumpstart config<br />
#&gt; /jstart/check</p>
<p>Update /jstart/10recommended<br />
LUPATCHHOST=10.4.3.250<br />
LUPATCHPATHROOT=/export/install10/patchdb</p>
<p>Update client<br />
#&gt; /export/install10/Solaris_10/Tools/add_install_client -s 10.4.3.250:/export/install10 -c 10.4.3.250:/jstart -p 10.4.3.250:/jstart autotest sun4u<br />
/etc/bootparams will be updated<br />
autotest  root=vgtui_1:/export/install10/Solaris_10/Tools/Boot install=10.4.3.250:/export/install10 boottype=:in sysid_config=10.4.3.250:/jstart install_config=10.4.3.250:/jstart rootopts=:rsize=8192 </p>
<p>Install client<br />
ok boot net &#8211; install</p>
<p>　　== 准备jumpstart ==<br />
　　开始jumpstart之前，需要做以下准备：<br />
　　# 了解jumpstart基本知识，请google一下 &lt;br&gt;<br />
　　# 我们实验室已经建好了jumpstart server，通过frontend可以直接访问，hostname/usr/password: jstart/root/voip &lt;br&gt;<br />
　　# 了解jumpstart目标机器（也就是待安装机器），通过ifconfig -a获得其一个网卡物理地址并记录下来，安装时网线必须连接此网口，暂时称此网口为jumpstart网口 &lt;br&gt;<br />
　　# 将jstart的第一个网口（已经配置好专用于jumpstart）和目标机器的jumpstart网口连接到一个独立的hub上去，这样它们将位于一个独立的网络，jumpstart安装时目标机器需要通过广播包从jstart获得其IP地址然后进行下一步操作 &lt;br&gt;</p>
<p>　　== 配置jumpstart server ==<br />
　　=== 设置hosts和ethers ===<br />
　　# hosts中为目标机器选择一个IP地址和机器名称 &lt;br&gt;<br />
　　# ethers中则是指定目标地址的网卡物理地址，也就是上面记录的jumpstart网口对应的网卡物理地址 &lt;br&gt;</p>
<p>　　=== jumpstart专用配置 ===<br />
　　jstart上有一个jumpstart专用目录：/jstart &lt;br&gt;<br />
　　需要设置以下3个jumpstart配置文件： &lt;br&gt;<br />
　　# rules。注意：设置完此文件后需要运行一下./check &lt;br&gt;<br />
　　# any_machine.xxx。你会发现/jstart目录下有很多any_machine.大头的文件，文件的后缀名则是服务器种类，这类文件都是用来设置安装时目标机器分区用的，一般来说对于已有的服务器种类不需要再修改其any_machine文件，只需要在后面引用即可 &lt;br&gt;<br />
　　# client_dev.sh。这个shell脚本的主要作用是设置tftp，tftp是jumpstart安装时目标机器从jumpstart server下载文件用的，配置完后运行一下./client_dev.sh。 &lt;br&gt;</p>
<p>　　注意： &lt;br&gt;<br />
　　以上配置完成之后，需要检查以下几个地方： &lt;br&gt;<br />
　　# /etc/ethers &lt;br&gt;<br />
　　# /etc/inet/hosts &lt;br&gt;<br />
　　# /tftpboot（目录），检查rm.xxx中有没有对应目标机器的配置文件 &lt;br&gt;<br />
　　# /etc/inet/inetd.conf （见案例2） &lt;br&gt;<br />
　　# /etc/bootparams （见案例1） &lt;br&gt;<br />
　　# /etc/dfs/dfstab &lt;br&gt;</p>
<p>　　== 开始安装 ==<br />
　　步骤如下： &lt;br&gt;<br />
　　# 串口连接目标机器，运行init 0进入standalone无网络ok状态 &lt;br&gt;<br />
　　# 在ok提示状态下运行boot net &#8211; install &lt;br&gt;<br />
　　之后所有的安装将自动进行 &lt;br&gt; </p>
<p>FAQ:</p>
<p>=== 案例1 ===<br />
某次jumpstart solaris 10时下载完安装包后便报以下错误： &lt;br&gt;<br />
 Completed software installation</p>
<p> Solaris 9 software installation succeeded</p>
<p> Customizing system files<br />
         &#8211; Mount points table (/etc/vfstab)<br />
         &#8211; Network host addresses (/etc/hosts)<br />
         &#8211; Network host addresses (/etc/hosts)<br />
 WARNING: Could not set file attributes (/a/var/svc/profile/name_service.xml)</p>
<p> ERROR: Unable to copy a temporary file to it&#8217;s final location</p>
<p> ERROR: System installation failed<br />
 Solaris installation program exited.<br />
检查/etc/bootparams文件后发现是client_dev.sh中的安装包路径搞错了 &lt;br&gt;</p>
<p>=== 案例2 ===<br />
某次jumpstart时下载不了安装包，注：可以在jstart上snoop -v监控jumpstart安装过程的IP包 &lt;br&gt;<br />
最后检查/etc/inetd.conf配置发现tftp中启用了udp6所致，应该为如下配置： &lt;br&gt;<br />
 tftp    dgram   udp     wait    root    /usr/sbin/in.tftpd      in.tftpd -s /tftpboot</p>
<p>=== 案例3 ===<br />
某次jumpstart时发现，目标地址第一步动作——从jumpstart获取IP地址——失败，而snoop -v能够抓到目标机器的广播包。 &lt;br&gt;<br />
检查/etc/ethers文件发现有重复的物理地址，去掉之后就正常了。&lt;br&gt;<br />
&lt;br&gt;<br />
也有几次get IP地址失败竟然是因为插在hub上的网线松了。&lt;br&gt;</p>
<p>=== 案例4 ===<br />
有台机器的首个网口坏掉了，可以用以下方法jumpstart：&lt;br&gt;<br />
 ok devalias<br />
此命令能够列出所有设备，可以发现有多个网络设备，它们的命名方式一般是net, net1, net2, net3 &lt;br&gt;<br />
 ok boot net1 &#8211; install<br />
从net1（也就是第二个网口）启动并开始jumpstart</p>
<p>=== 案例5 ===<br />
ok boot net &#8211; install<br />
Boot device:  /pci@1f,0/pci@1,1/network@c,1  File and args: &#8211; install<br />
SunOS Release  5.10 Version Generic_118833-17 64-bit<br />
Copyright 1983-2005 Sun Microsystems,  Inc.  All rights reserved.<br />
Use is subject to license  terms.<br />
SUNW,eri0 : 100 Mbps full duplex link up<br />
whoami: no domain  name<br />
Configuring devices.<br />
Using RPC Bootparams for network configuration  information.<br />
Attempting to configure interface eri1&#8230;<br />
Skipped interface  eri1<br />
Attempting to configure interface eri0&#8230;<br />
Configured interface  eri0<br />
Beginning system identification&#8230;<br />
Searching for configuration  file(s)&#8230;<br />
Using sysid configuration file  10.4.3.250:/jumpstart/sysidcfg<br />
Search complete.<br />
Discovering additional  network configuration&#8230;<br />
Completing system identification&#8230;<br />
Starting  remote procedure call (RPC) services: done.<br />
System identification  complete.<br />
Starting Solaris installation program&#8230;<br />
Searching for JumpStart directory&#8230;<br />
not found<br />
Warning:  Could not find matching rule in rules.ok<br />
Press the return key for an  interactive Solaris install  program&#8230;<br />
已解决：<br />
修改/etc/netmasks，使所有的netmask保持一致。<br />
 a. /etc/netmasks；<br />
 b. sysidcfg中网络接口的配置；<br />
 c. /export/install10/Solaris_10/Tools/Boot/netmask<br />
 d. #ifconfig -a； &#8212;- 你的目标网卡设置的掩码是255.0.0.0，而其他几个的设置为255.255.255.0<br />
 bge1: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 3<br />
        inet 10.4.3.250 netmask ff000000 broadcast 10.255.255.255<br />
        ether 0:3:ba:9f:f7:d6</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/06/30/sun-solaris-10-jumpstart-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUN Netra-T1 LOM Usage</title>
		<link>http://liuchangjun.com/2009/06/30/sun-netra-t1-lom-usage/</link>
		<comments>http://liuchangjun.com/2009/06/30/sun-netra-t1-lom-usage/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:47:30 +0000</pubDate>
		<dc:creator>Liu Changjun</dc:creator>
				<category><![CDATA[Tech Script]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=119</guid>
		<description><![CDATA[<p>Transfered from my journal.</p> <p>Netra-T1 AC200 LOM Usage (SunSolve Document ID 40507, Date 17 Oct 2001) http://www.aaven.com/UNIX/Solaris/lom_commands.asp</p> <p>lom =&#62; ok lom&#62; bootmode reset_nvram lom&#62; power / reset</p> <p>ok =&#62; # ok boot net &#8211; install</p> <p># =&#62; lom #&#62; #. There are three prompts available on the Netra-t1. ok&#62; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; (normal prompt when the OS [...]]]></description>
			<content:encoded><![CDATA[<p>Transfered from my journal.</p>
<p>Netra-T1 AC200 LOM Usage (SunSolve Document ID 40507, Date 17 Oct 2001)<br />
<a rel="nofollow" href="http://www.aaven.com/UNIX/Solaris/lom_commands.asp" target="_blank">http://www.aaven.com/UNIX/Solaris/lom_commands.asp</a></p>
<p>lom =&gt; ok<br />
lom&gt; bootmode reset_nvram<br />
lom&gt; power / reset</p>
<p>ok =&gt; #<br />
ok boot net &#8211; install</p>
<p># =&gt; lom<br />
#&gt; #.<br />
<span id="more-119"></span><br />
There are three prompts available on the Netra-t1.<br />
  ok&gt;   &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; (normal prompt when the OS is not running)<br />
  lom&gt;  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; (available whether OS is running or not)<br />
  #     &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; (the OS prompt)</p>
<p>To move between the “ok&gt;” prompt and the “lom&gt;” prompt, type:<br />
  ok&gt; #.      There must be less than 1 second between the “#” and “.”<br />
  lom&gt;        &#8212;&#8212;&gt;      This is the prompt you get</p>
<p>  Root can change this character sequence:<br />
    # lomctl &lt;new first character&gt;</p>
<p>    Only the first character (“#”) can be changed. You don&#8217;t need<br />
    to know the previous character to do this.</p>
<p>  To find out the current sequence do an “init 5&#8243;:<br />
    # init 5<br />
    This shuts down the system and gives you the “lom&gt;” prompt</p>
<p>  Then to show the current two-character sequence type:<br />
    lom&gt; show escape</p>
<p>To move between the “lom&gt;” prompt and the “ok&gt;” prompt type:<br />
  lom&gt; console</p>
<p>See Infodoc 27372 for a flow chart of how to jump around between the “lom&gt;”,<br />
“ok&gt;” and “OS” prompts.</p>
<p>Some useful lom&gt; commands are:</p>
<p>lom&gt; poweron &#8212;&#8212;&#8212;&#8212;- (powers on the netra)<br />
lom&gt; poweroff &#8212;&#8212;&#8212;&#8212; (powers off the netra)<br />
lom&gt; reset &#8212;&#8212;&#8212;&#8212;&#8212; (the same as the ok&gt; reset command)<br />
lom&gt; reset -x &#8212;&#8212;&#8212;&#8212; (resets the CPU only- externally initiated<br />
                           reset XIR)<br />
lom&gt; break &#8212;&#8212;&#8212;&#8212;&#8212; (goes to the ok&gt; prompt from the OS- “Stop-a”)<br />
lom&gt; environment &#8212;&#8212;&#8212; (current status of all components in system)<br />
lom&gt; check &#8212;&#8212;&#8212;&#8212;&#8212; (updates component status after repairing it-<br />
                           run “lom&gt; environment” again)<br />
lom&gt; show eventlog &#8212;&#8212;- (show last 10 events on the system)<br />
lom&gt; set faulton &#8212;&#8212;&#8212; (turns on the fault LED)<br />
lom&gt; set faultoff &#8212;&#8212;&#8211; (turns off the fault LED)<br />
lom&gt; set alarmon [1-3] &#8212; (sets 1 of 3 alarms on)<br />
lom&gt; set alarmoff [1-3] &#8212; (sets 1 of 3 alarms off)<br />
lom&gt; show model &#8212;&#8212;&#8212;- (show the server model)<br />
lom&gt; show hostname &#8212;&#8212;- (same as uname -n)<br />
lom&gt; show &#8212;&#8212;&#8212;&#8212;&#8212;- (help for the “show” command)<br />
lom&gt; help &#8212;&#8212;&#8212;&#8212;&#8212;- (list of LOM commands)      </p>
<p>You can set the boot mode of a netra using the below “lom&gt;” command:</p>
<p>  lom&gt; bootmode [-u][normal|forth|reset_nvram|diag|skip_diag]</p>
<p>        -u      allows sharing of the console and LOM device</p>
<p>        normal  server boots using the OBP environment settings<br />
                -must reset server to take effect</p>
<p>        forth   server stops at the “ok&gt;” prompt- same as “Stop-f”<br />
                -must reset server to take effect</p>
<p>        reset_nvram -”ok&gt; set-defaults” or “Stop-n”<br />
                -must reset server to take effect</p>
<p>        diag    runs full POST- “ok&gt; diag-switch? true” or “Stop-d”<br />
                -must power off server and back on within 10 minutes</p>
<p>        skip_diag &#8211; ok&gt; setenv diag-switch? false”<br />
                -must power off server and back on within 10 minutes</p>
<p>Also see related Infodocs:</p>
<p>27372 How do I jump to LOM prompt on the the Netra T?<br />
26009 Installing the Netra T1 Model AC200 or DC200 from cdrom using<br />
      Solaris 8 Update 2 (10/00) or Solaris 8 Update 3 (01/01)<br />
26310 Reinstalling Solaris 8 on the Netra X1 including LOM (Lights<br />
      out Management) packages<br />
26667 Connecting a serial cable from a Netra T1 AC/DC200 server to<br />
      a laptop</p>
<p>&#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;&#8211;<br />
Complete List of Commands<br />
Command      Effect<br />
alarmoff n      Set alarm n off.<br />
(Where n is 1, 2, or 3.) These three alarms are software flags. They are associated with no specific conditions but are available to be set by your own processes.<br />
alarmon n      Set alarm n on.<br />
(Where n is 1, 2, or 3.)  These three alarms are software flags.  They are associated with no specific conditions but are available to be set by your own processes.<br />
break      Takes the server down to the OK prompt.<br />
bootmode mode      Determines the behavior of the server during the boot process.<br />
check      Resets monitoring to report all failures.<br />
If a monitored component has failed, the LOMlite2 device will not continue to report the same failure.  To check the status of the component, for example, after attempting to fix it, issue the check command.  This updates the status of all monitored components.<br />
console      The command takes you out of the LOMlite2 shell and back to the Solaris prompt.  It returns control of the serial connection to the console.<br />
environment      Displays the temperature of the server and the status of the fans, the power supply, the over-temperature monitors, the supply rails and circuit breakers, the alarms, and the fault LED.<br />
faulton      Sets the Fault LED to On.<br />
faultoff      Sets the Fault LED to Off.<br />
help      Displays the list of LOM commands.<br />
loghistory      Displays all the events in the LOMlite2 device&#8217;s Event Log.<br />
logout      This command is for use by named users you have set up with password access to the LOMlite2 device.  It returns them to the LOM user login prompt.<br />
poweron      Powers the server On.<br />
poweroff      Powers the server Off.<br />
reset      Resets the Netra T1 server.<br />
show model      Displays the server model.<br />
show hostname      Displays the server name (this command is equivalent to the Solaris uname -n command.<br />
show eventlog      Displays the LOMlite2 device&#8217;s event log.<br />
The event log is the list of the last 10 events to have been stored in the LOMlite2 device.  The most recent event is the one at the bottom of the list.<br />
show escape      Displays the current LOMlite2 escape sequence.<br />
show      Displays all the information available with the show command.<br />
useradd      Adds a user to the LOMlite2 device&#8217;s list of permitted users.<br />
userdel      Deletes a user to the LOMlite2 device&#8217;s list of permitted users.<br />
usershow user      Displays the details for the LOMlite2 account user.<br />
userpassword      Sets or changes a user&#8217;s password<br />
userperm      Sets the permission levels for a named user.<br />
version      Displays the version number of the LOMlite2 device.</p>
<p>Note:<br />
[Sparc] 任何时候通过Stop+a(SUN键盘)或者ctrl+break(PC键盘)进入到OBP提示符下<br />
ok</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/06/30/sun-netra-t1-lom-usage/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fedora 10 配置服务</title>
		<link>http://liuchangjun.com/2009/06/30/fedora-10-%e9%85%8d%e7%bd%ae%e6%9c%8d%e5%8a%a1/</link>
		<comments>http://liuchangjun.com/2009/06/30/fedora-10-%e9%85%8d%e7%bd%ae%e6%9c%8d%e5%8a%a1/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:45:01 +0000</pubDate>
		<dc:creator>Liu Changjun</dc:creator>
				<category><![CDATA[Tech Script]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=117</guid>
		<description><![CDATA[<p>Transfered from my journal.</p> http://trech.blogspot.com/2007/05/basics-cn.html Fedora里面有两种管理服务的方式, 一是使用图形化工具, 另一个就是仅仅使用命令行. 如果你不在图形化的环境中, 就需要用命令行方式. #&#62; ntsysv #&#62; service servicename status/start/stop http://blog.csdn.net/InnerSea/archive/2009/01/09/3742168.aspx Fed&#8230;&#8230; http://trech.blogspot.com/2007/05/basics-cn.html Fedora里面有两种管理服务的方式, 一是使用图形化工具, 另一个就是仅仅使用命令行. 如果你不在图形化的环境中, 就需要用命令行方式. #&#62; ntsysv #&#62; service servicename status/start/stop http://blog.csdn.net/InnerSea/archive/2009/01/09/3742168.aspx Fedora 10 配置服务 ConsoleKit（除非使用gdm和gnome） NetworkManager, NetworkManagerDispathcer（ADSL用户和需要切换网络的用户不要关闭此服务） avahi-daemon（除非使用ZeroConf） autofs（除非不使用U盘，不可能吧?） bluetooth（除非拥有蓝牙模块） capi（除非拥有ISDN设备） cups（打印服务） dund（蓝牙拨号软件） firstboot（只在首次启动时有用） gpm（终端下的鼠标支持） httpd（web服务） ip6tables（IPv6防火墙） irda（除非拥有红外线设备） isdn（除非拥有蓝牙模块） kudzu（检测硬件设备更新） lisa（类似网上邻居，使用samba或NFS时可以关闭） mdmonitor（除非使用RAID或LVM） netconsole（初始化网络控制台登录） netfs（自动挂载网络上的文件系统，不使用samba或NFS时可以关闭） nfs, [...]]]></description>
			<content:encoded><![CDATA[<p>Transfered from my journal.</p>
<div id="note_26712565_short" style="display: none;">http://trech.blogspot.com/2007/05/basics-cn.html Fedora里面有两种管理服务的方式, 一是使用图形化工具, 另一个就是仅仅使用命令行. 如果你不在图形化的环境中, 就需要用命令行方式. #&gt; ntsysv #&gt; service servicename status/start/stop http://blog.csdn.net/InnerSea/archive/2009/01/09/3742168.aspx Fed&#8230;&#8230;</div>
<div id="note_26712565_full" style="display: block;">
<pre><a rel="nofollow" href="http://trech.blogspot.com/2007/05/basics-cn.html" target="_blank">http://trech.blogspot.com/2007/05/basics-cn.html</a>
Fedora里面有两种管理服务的方式, 一是使用图形化工具, 另一个就是仅仅使用命令行. 如果你不在图形化的环境中, 就需要用命令行方式.
#&gt; ntsysv
#&gt; service servicename status/start/stop

<a rel="nofollow" href="http://blog.csdn.net/InnerSea/archive/2009/01/09/3742168.aspx" target="_blank">http://blog.csdn.net/InnerSea/archive/2009/01/09/3742168.aspx</a>
Fedora 10 配置服务
ConsoleKit（除非使用gdm和gnome）
NetworkManager, NetworkManagerDispathcer（ADSL用户和需要切换网络的用户不要关闭此服务）
avahi-daemon（除非使用ZeroConf）
autofs（除非不使用U盘，不可能吧?）
bluetooth（除非拥有蓝牙模块）
capi（除非拥有ISDN设备）
cups（打印服务）
dund（蓝牙拨号软件）
firstboot（只在首次启动时有用）
gpm（终端下的鼠标支持）
httpd（web服务）
ip6tables（IPv6防火墙）
irda（除非拥有红外线设备）
isdn（除非拥有蓝牙模块）
kudzu（检测硬件设备更新）
lisa（类似网上邻居，使用samba或NFS时可以关闭）
mdmonitor（除非使用RAID或LVM）
netconsole（初始化网络控制台登录）
netfs（自动挂载网络上的文件系统，不使用samba或NFS时可以关闭）
nfs, nfslock（除非拥有Linux－Linux的局域网）
nscd（除非使用NIS, NIS+, LDAP, 或hesiod）
pand（用过蓝牙构建局域网）
pcscd（使用PC／SC访问智能卡）
rdisc（发现局域网路由器）
restorecond（不使用SELinux时可以关闭）
rpcbind, rpcgssd, rpcidmapd, rpcsvcgssd（除非使用NFS）
saslauthd
sendmail（mail服务）
setroubleshoot（不使用SELinux时可以关闭）
smolt（跟踪硬件兼容性，没啥用）
sshd（ssh服务，远程登录时才需要）
wpa_supplicant（除非拥有无线网卡）
ypbind（除非使用NIS）

<a rel="nofollow" href="http://unix-cd.com/unixcd12/article_6258.html" target="_blank">http://unix-cd.com/unixcd12/article_6258.html</a>
Fedora Core 6 Linux服务详解

下面我们将对&amp;nbspFedora&amp;nbspCore&amp;nbsp6 中的各种服务（services）作简要的介绍，并提供使用建议。

认识服务（services）
请先阅读&amp;nbspFedora 服务管理指南。了解什么是服务/后台进程（services/daemons），什么是运行级别（runlevels）以及各种用于管理服务（sevices）的工具。

你可以在命令行下使用&amp;nbspchkonfig 或&amp;nbspntsysv 命令来管理服务（services），或者使用具有图形用户界面的&amp;nbspsystem-config-services 命令。GNOME 用户：系统－》管理－》服务器设置－》Services。

单个服务介绍
现在我们介绍&amp;nbspFedora&amp;nbspCore&amp;nbsp6 中所包含的各种服务（services）的功能，并提供使用建议。这不是一份详尽的清单。小心：不要关闭你不确定或不知道的服务（services）。

不要关闭以下服务（除非你有充足的理由）：
acpid,&amp;nbsphaldaemon,&amp;nbspmessagebus,&amp;nbspklogd,&amp;nbspnetwork,&amp;nbspsyslogd 

请确定修改的是运行级别&amp;nbsp3 和&amp;nbsp5。

NetworkManager,&amp;nbspNetworkManagerDispatcher

NetworkManager 是一个自动切换网络连接的后台进程。很多笔记本用户都需要启用该功能，它让你能够在无线网络和有线网络之间切换。大多数台式机用户应该关闭该服务。一些&amp;nbspDHCP 用户可能需要开启它。

acpid

ACPI（全称&amp;nbspAdvanced&amp;nbspConfiguration&amp;nbspand&amp;nbspPower&amp;nbspInterface）服务是电源管理接口。建议所有的笔记本用户开启它。一些服务器可能不需要&amp;nbspacpi。支持的通用操作有：“电源开关“，”电池监视“，” 笔记本&amp;nbspLid 开关“，“笔记本显示屏亮度“，“休眠”， “挂机”，等等。

anacron,&amp;nbspatd,&amp;nbspcron

这几个调度程序有很小的差别。 建议开启&amp;nbspcron，如果你的电脑将长时间运行，那就更应该开启它。对于服务器，应该更深入了解以确定应该开启哪个调度程序。大多数情况下，笔记本/台式机应该关闭&amp;nbspatd 和&amp;nbspanacron。注意：一些任务的执行需要&amp;nbspanacron，比如：清理 /tmp 或 /var。

apmd

一些笔记本和旧的硬件使用&amp;nbspapmd。如果你的电脑支持&amp;nbspacpi，就应该关闭&amp;nbspapmd。如果支持&amp;nbspacpi，那么&amp;nbspapmd 的工作将会由&amp;nbspacpi 来完成。

autofs

该服务自动挂载可移动存储器（比如&amp;nbspUSB 硬盘）。如果你使用移动介质（比如移动硬盘，U 盘），建议启用这个服务。

avahi-daemon,&amp;nbspavahi-dnsconfd

Avahi 是&amp;nbspzeroconf 协议的实现。它可以在没有&amp;nbspDNS 服务的局域网里发现基于&amp;nbspzeroconf 协议的设备和服务。它跟&amp;nbspmDNS 一样。除非你有兼容的设备或使用&amp;nbspzeroconf 协议的服务，否则应该关闭它。我把它关闭。

bluetooth,&amp;nbsphcid,&amp;nbsphidd,&amp;nbspsdpd,&amp;nbspdund,&amp;nbsppand

蓝牙（Bluetooth）是给无线便携设备使用的（非&amp;nbspwifi,&amp;nbsp802.11）。很多笔记本提供蓝牙支持。有蓝牙鼠标，蓝牙耳机和支持蓝牙的手机。很多人都没有蓝牙设备或蓝牙相关的服务，所以应该关闭它。其他蓝牙相关的服务有：hcid 管理所有可见的蓝牙设备，hidd 对输入设备（键盘，鼠标）提供支持，&amp;nbspdund 支持通过蓝牙拨号连接网络，pand 允许你通过蓝牙连接以太网。

capi

仅仅对使用&amp;nbspISDN 设备的用户有用。大多数用户应该关闭它。

cpuspeed

该服务可以在运行时动态调节&amp;nbspCPU 的频率来节约能源（省电）。许多笔记本的&amp;nbspCPU 支持该特性，现在，越来越多的台式机也支持这个特性了。如果你的&amp;nbspCPU 是：Petium- M，Centrino，AMD&amp;nbspPowerNow，&amp;nbspTransmetta，Intel&amp;nbspSpeedStep，Athlon- 64，Athlon-X2，Intel&amp;nbspCore&amp;nbsp2 中的一款，就应该开启它。如果你想让你的&amp;nbspCPU 以固定频率运行的话就关闭它。

cron

参见&amp;nbspanacron。

cupsd,&amp;nbspcups-config-daemon

打印机相关。如果你有能在&amp;nbspFedora 中驱动的&amp;nbspCUPS 兼容的打印机，你应该开启它。

dc_client,&amp;nbspdc_server

磁盘缓存（Distcache）用于分布式的会话缓存。主要用在&amp;nbspSSL/TLS 服务器。它可以被&amp;nbspApache 使用。大多数的台式机应该关闭它。

dhcdbd

这是一个让&amp;nbspDBUS 系统控制&amp;nbspDHCP 的接口。可以保留默认的关闭状态。

diskdump,&amp;nbspnetdump

磁盘转储（Diskdump）用来帮助调试内核崩溃。内核崩溃后它将保存一个 “dump“ 文件以供分析之用。网络转储（Netdump）的功能跟&amp;nbspDiskdump 差不多，只不过它可以通过网络来存储。除非你在诊断内核相关的问题，它们应该被关闭。

dund

参见&amp;nbspbluetooth。

firstboot

该服务是&amp;nbspFedora 安装过程特有的。它执行在安装之后的第一次启动时仅仅需要执行一次的特定任务。它可以被关闭。

gpm

终端鼠标指针支持（无图形界面）。如果你不使用文本终端（CTRL-ALT-F1,&amp;nbspF2..），那就关闭它。不过，我在运行级别&amp;nbsp3 开启它，在运行级别&amp;nbsp5 关闭它。

hidd

参见&amp;nbspbluetooth。 

hplip,&amp;nbsphpiod,&amp;nbsphpssd

HPLIP 服务在&amp;nbspLinux 系统上实现&amp;nbspHP 打印机支持，包括&amp;nbspInkjet，DeskJet，OfficeJet，Photosmart，Business&amp;nbspInkJet 和一部分&amp;nbspLaserJet 打印机。这是&amp;nbspHP 赞助的惠普&amp;nbspLinux 打印项目（HP&amp;nbspLinux&amp;nbspPrinting&amp;nbspProject）的产物。如果你有相兼容的打印机，那就启用它。

iptables

它是&amp;nbspLinux 标准的防火墙（软件防火墙）。如果你直接连接到互联网（如，cable，DSL，T1），建议开启它。如果你使用硬件防火墙（比如：D-Link，Netgear，Linksys 等等），可以关闭它。强烈建议开启它。

ip6tables

如果你不知道你是否在使用&amp;nbspIPv6，大部分情况下说明你没有使用。该服务是用于&amp;nbspIPv6 的软件防火墙。大多数用户都应该关闭它。阅读这里了解如何关闭&amp;nbspFedora 的&amp;nbspIPv6 支持。

irda,&amp;nbspirattach

IrDA 提供红外线设备（笔记本，PDA's，手机，计算器等等）间的通讯支持。大多数用户应该关闭它。

irqbalance

在多处理器系统中，启用该服务可以提高系统性能。大多数人不使用多处理器系统，所以关闭它。但是我不知道它作用于多核&amp;nbspCPU's 或 超线程&amp;nbspCPU's 系统的效果。在单&amp;nbspCPU 系统中关闭它应该不会出现问题。

isdn

这是一种互联网的接入方式。除非你使用&amp;nbspISDN 猫来上网，否则你应该关闭它。

kudzu

该服务进行硬件探测，并进行配置。如果更换硬件或需要探测硬件更动，开启它。但是绝大部分的台式机和服务器都可以关闭它，仅仅在需要时启动。

lm_sensors

该服务可以探测主板感应器件的值或者特定硬件的状态（一般用于笔记本电脑）。你可以通过它来查看电脑的实时状态，了解电脑的健康状况。它在&amp;nbspGKrellM 用户中比较流行。查看&amp;nbsplm_sensors 的主页获得更多信息。如果没有特殊理由，建议关闭它。

mctrans

如果你使用&amp;nbspSELinux 就开启它。默认情况下&amp;nbspFedora&amp;nbspCore 开启&amp;nbspSELinux。

mdmonitor

该服务用来监测&amp;nbspSoftware&amp;nbspRAID 或&amp;nbspLVM 的信息。它不是一个关键性的服务，可以关闭它。

mdmpd

该服务用来监测&amp;nbspMulti-Path 设备（该类型的存储设备能被一种以上的控制器或方法访问）。它应该被关闭。

messagebus

这是&amp;nbspLinux 的&amp;nbspIPC（Interprocess&amp;nbspCommunication，进程间通讯）服务。确切地说，它与&amp;nbspDBUS 交互，是重要的系统服务。强烈建议开启它。

netdump

参见&amp;nbspdiskdump。 

netplugd

Netplugd 用于监测网络接口并在接口状态改变时执行指定命令。建议保留它的默认关闭状态。

netfs

该服务用于在系统启动时自动挂载网络中的共享文件空间，比如：NFS，Samba 等等。如果你连接到局域网中的其它服务器并进行文件共享，就开启它。大多数台式机和笔记本用户应该关闭它。

nfs,&amp;nbspnfslock

这是用于&amp;nbspUnix/Linux/BSD 系列操作系统的标准文件共享方式。除非你需要以这种方式共享数据，否则关闭它。

ntpd

该服务通过互联网自动更新系统时间。如果你能永久保持互联网连接，建议开启它，但不是必须的。

pand

参见&amp;nbspbluetooth。

pcscd

该服务提供智能卡（和嵌入在信用卡，识别卡里的小芯片一样大小）和智能卡读卡器支持。如果你没有读卡器设备，就关闭它。

portmap

该服务是&amp;nbspNFS（文件共享）和&amp;nbspNIS（验证）的补充。除非你使用&amp;nbspNFS 或&amp;nbspNIS 服务，否则关闭它。

readahead_early,&amp;nbspreadahead_later

该服务通过预先加载特定的应用程序到内存中以提供性能。如果你想程序启动更快，就开启它。

restorecond

用于给&amp;nbspSELinux 监测和重新加载正确的文件上下文（file&amp;nbspcontexts）。它不是必须的，但如果你使用&amp;nbspSELinux 的话强烈建议开启它。

rpcgssd,&amp;nbsprpcidmapd,&amp;nbsprpcsvcgssd

用于&amp;nbspNFS&amp;nbspv4。除非你需要或使用&amp;nbspNFS&amp;nbspv4，否则关闭它。

sendmail

除非你管理一个邮件服务器或你想 在局域网内传递或支持一个共享的&amp;nbspIMAP 或&amp;nbspPOP3 服务。大多数人不需要一个邮件传输代理。如果你通过网页（hotmail/yahoo/gmail）或使用邮件收发程序（比如：Thunderbird，&amp;nbspKmail，Evolution 等等）收发邮件。你应该关闭它。

smartd

SMART&amp;nbspDisk&amp;nbspMonitoring 服务用于监测并预测磁盘失败或磁盘问题（前提：磁盘必须支持&amp;nbspSMART）。大多数的桌面用户不需要该服务，但建议开启它，特别是服务器。

smb

SAMBA 服务是在&amp;nbspLinux 和&amp;nbspWindows 之间共享文件必须的服务。如果有&amp;nbspWindows 用户需要访问&amp;nbspLinux 上的文件，就启用它。查看如何在&amp;nbspFedora&amp;nbspCore&amp;nbsp6 下配置&amp;nbspSamba。

sshd

SSH 允许其他用户登录到你的系统并执行程序，该用户可以和你同一网络，也可以是远程用户。开启它存在潜在的安全隐患。如果你不需要从其它机器或不需要从远程登录，就应该关闭它。

xinetd

（该服务默认可能不被安装）它是 一个特殊的服务。它可以根据特定端口收到的请求启动多个服务。比如：典型的&amp;nbsptelnet 程序连接到&amp;nbsp23 号端口。如果有&amp;nbsptelent 请求在&amp;nbsp23 号端口被&amp;nbspxinetd 探测到，那&amp;nbspxinetd 将启动&amp;nbsptelnetd 服务来响应该请求。为了使用方便，可以开启它。运行&amp;nbspchkconfig&amp;nbsp--list， 通过检查&amp;nbspxinetd 相关的输出可以知道有哪些服务被&amp;nbspxinetd 管理。 

<a rel="nofollow" href="http://unix-cd.com/unixcd12/article_6259.html" target="_blank">http://unix-cd.com/unixcd12/article_6259.html</a>
Redhat、Fedora Linux常见守护进程(服务)列表

Fedora&amp;nbspCore&amp;nbsp6对于服务进程的变化
bluetooth相关的服务有bluetooth,hcid,hidd,sdpd,dund,pand
capi 仅针对ISDN用户
mctrans&amp;nbspSELINUX必须的服务。
mdmpd 监视多路设备的服务
pcscd 支持智能卡的服务，这是FC6加入智能卡支持的特征之一

补充几个Fedora&amp;nbspCore&amp;nbsp5等新系统下的新服务：
NetworkManager,&amp;nbspNetworkManagerDispatcher
在不同的网络联接服务中切换，特别适合笔记本用户在固定网络联接和移动联接中切换，建议笔记本用户启用这个;

avahi-daemon,avahi-dnsconfd
zeroconf配置的具体现实，对于没有DNS情况下的本地网络服务很有用，有点类似于mDNS，一般可以disable;

bluetooth，hcid，hidd，sdpd
蓝牙设备相关的服务;hcid管理设备，hidd提供输入设备的支持;对于普通没有蓝牙用户应该可以禁止该功能的！

dc_client,dc_server
用语apache的SSL/TLS服务，一般桌面和服务器没有用;

dhcdbd
DBUS系统控制DHCP的接口，默认禁止;

diskdump，netdump
用于kernel调试的dump服务，一般用户没有用;

hplip，hpiod，hpssd
Linux下支持HP打印机的服务，只有用HP打印机的用户才需要;

im_sensors
主板监控传感器服务;

netplugd
监视网络接口变化的服务，一般可以禁止;

更新于&amp;nbsp2006 年&amp;nbsp4 月&amp;nbsp29 日

1.&amp;nbspalsasound ：Alsa声卡驱动守护程序。Alsa声卡驱动程序本来是为了 一种声卡Gravis
UltraSound(GUS)而写的，该程序被证 明很优秀，于是作者就开始为一般的声卡写 驱动程序。&amp;nbspAlsa和OSS/Free
及OSS/Linux兼容，但是有自己的接 口，甚至比OSS优秀。
2.&amp;nbspacpid：acpid（Advanced&amp;nbspConfiguration&amp;nbspand&amp;nbspPower&amp;nbspInterface）是为替代传统的APM电源管理标准而推出的新型电源管理标准。通常笔记本电脑需要启动电源进行管理。

3.&amp;nbspatalk：AppleTalk网络守护进程。注意不要在后台运行该程序，该程序的数据结构必须在运行其他进程前先花一定时间初始化。

4.&amp;nbspamd： 自动安装NFS守护进程。

5.&amp;nbspanacron：一个自动化运行任务守护进程。Red&amp;nbspHat&amp;nbspLinux 随带四个自动化任务的工具：cron、&amp;nbspanacron、at、和
batc。当你的Linux服务器并不是全天运行，这个anacron就可以帮你执行在”crontab”设定的时间内没有执行的工作。

6.&amp;nbspapmd：apmd（Advanced&amp;nbspPower&amp;nbspManagement）是高级电源管理。传统的电源管理标准，对于笔记本电脑比较有用，可以了解系统的电池电量信息。并将相关信息通过syslogd 写入日志。也可以用来在电源不足时关机。

7.&amp;nbsparptables_jf ：为arptables网络的用户控制过滤的守护进程。

8.&amp;nbsparpwatch： 记录日志并构建一个在LAN接口上看到的以太网地址和IP地址对数据库 。

atd：at和batch命令守护进程，用户用at命令调度的任务。Batch用于在系统负荷比较低时 运行批处理任务。

9.&amp;nbspautofs：自动安装管理进程automount，与NFS相关，依赖于NIS服务器。

10.&amp;nbspbootparamd：引导参数服务器，为LAN上的无盘工作站提供引导所需的相关信息。

11.&amp;nbspbluetooch：蓝牙服务器守护进程。

12.&amp;nbspcrond ：cron是Unix下的一个传统程序，该程序周期地运行用户 调度的任务。比起传统的Unix版本，Linux版本添加了不少属性，而且更安全，配置更简单。类似计划任务。

13.&amp;nbspchargen：使用tcp协议的 chargen&amp;nbspserver，chargen（Character&amp;nbspGenerator&amp;nbspProtocol）是一种网络服务，主要功能是提供类似远程打字的功能。

14.&amp;nbspchargen-udp：使用UDP协议的chargen&amp;nbspserver。

15.&amp;nbspcpuspeed：监测系统空闲百分比，降低或加快CPU时钟速度和电压从而在系统空闲时将能源消耗降为最小，而在系统繁忙时最大化加快系统执行速度。

16.&amp;nbspdhcpd：动态主机控制协议(Dynamic&amp;nbspHost&amp;nbspControl&amp;nbspProtocol)的服务守护进程。

17.&amp;nbspcups：&amp;nbspcups(Common&amp;nbspUNIX&amp;nbspPrinting&amp;nbspSystem)是通用UNIX打印守护进程，为Linux提供第三代打印功能。

18.&amp;nbspcups－config－daemons：cups打印系统切换守护进程。

19.&amp;nbspcups-lpd：cups行打印守护进程。

20.&amp;nbspdaytime：使用TCP 协议的Daytime守护进程，该协议为客户机实现从远程服务器获取日期 和时间的功能。预设端口：13。

21.&amp;nbspdaytime-udp：使用UDP 协议的Daytime守护进程。

22.&amp;nbspdc_server：使用SSL安全套接字的代理服务器守护进程。

23.&amp;nbspdc_client：使用SSL安全套接字的客户端守护进程。

24.&amp;nbspdiskdump：服务器磁盘备份守护进程。

25.&amp;nbspecho：服务器回显客户数据服务守护进程。

26.&amp;nbspecho-udp：使用UDP协议的服务器回显客户数据服务守护进程。

27.&amp;nbspeklogin：接受rlogin会话鉴证和用kerberos5加密的一种服务的守护进程。

28.&amp;nbspgated ：网关路由守护进程。它支持各种路由协议，包括RIP版本1和2、DCN&amp;nbspHELLO协议、&amp;nbspOSPF版本2以及EGP版本2到4。

29.&amp;nbspgpm：gpm（General&amp;nbspPurpose&amp;nbspMouse&amp;nbspDaemon ）守护进程为文本模式下的Linux程序如mc(Midnight&amp;nbspCommander)提供了鼠标的支持。它也支持控制台下鼠标 的拷贝，粘贴操作以及弹出式菜单。

30.&amp;nbspgssftp： 使用kerberos&amp;nbsp5认证的ftp守护进程

31.&amp;nbsphttpd：Web服务器Apache守护进程，可用来提供HTML文件以 及CGI动态内容服务。

32.&amp;nbspinetd ：因特网操作守护程序。监控网络对各种它管理的服务的需求，并在必要的时候启动相应的服务程序。在Redhat 和 Mandrake&amp;nbsplinux中被xinetd代替。Debian,&amp;nbspSlackware,&amp;nbspSuSE 仍然使用。

33.&amp;nbspinnd：Usenet新闻服务器守护进程。

34.&amp;nbspiiim：中文输入法服务器守护进程。

35.&amp;nbspiptables：iptables防火墙守护进程。

36.&amp;nbspirda：红外端口守护进程。

37.&amp;nbspisdn：isdn启动和中止服务守护进程。

38.&amp;nbspkrb5－telnet:使用kerberos&amp;nbsp5认证的telnet守护进程。

39.&amp;nbspklogin：远程登陆守护进程。

40.&amp;nbspkeytable： 该进程的功能是转载在/etc/sysconfig/keyboards里定义的键盘映射表，该表可以通过kbdconfig工具进行选择。您应该使该程序处于激活状态。

41.&amp;nbspirqbalance：对多个系统处理器环境下的系统中断请求进行负载平衡的守护程序。如果你只安装了一个CPU，就不需要加载这个守护程序。

42.&amp;nbspkshell ：kshell守护进程。

43.
kudzu：硬件自动检测程序，会自动检测硬件是否发生变动，并相应进行硬件的添加、删除工作。当系统启动时，kudzu会对当前的硬件进行检测，并且和
存储在
/etc/sysconfig/hwconf中的硬件信息进行对照，如果某个硬件从系统中被添加或者删除时，那么kudzu就会察觉到，并且通知用户是
否进行相关配置，然后修改etc/sysconfig/hwconf，使硬件资料与系统保持同步。如果/etc/sysconfig/hwconf这个文
件不存在，那么kudzu将会从/etc/modprobe.conf，/etc/sysconfig/network-scripts/和
etc/X11/XF86Config中探测已经存在的硬件。如果你不打算增加新硬件，那么就可以关闭这个启动服务，以加快系统启动时间。

44.&amp;nbspldap：ldap（Lightweight&amp;nbspDirectory&amp;nbspAccess&amp;nbspProtocol）目录访问协议服务器守护进程。

45.&amp;nbsplm_seroems：检测主板工作情况守护进程。

46.&amp;nbsplpd ：lpd是老式打印守护程序，负责将lpr等程序提交给打印 作业。

47.&amp;nbspmdmonitor：RAID相关设备的守护程序。

48.&amp;nbspmessagebus：D-BUS是一个库，为两个或两个以上的应用程序提供一对一的通讯。
dbus-daemon-1是一个应用程序，它使用这个库来实现messagebus守护程序。多个应用程序通过连接messagebus守护程序可以实
现与其他程序交换信息。

49.&amp;nbspmicrocode_ctl：可编码以及发送新的微代码到内核以更新Intel&amp;nbspIA32系列处理器守护进程。

50.&amp;nbspmysqld： 一个快速高效可靠的轻型SQL数据库引擎守护进程。

51.&amp;nbspnamed：DNS（BIND）服务器守护进程。

52.&amp;nbspnetplugd：netplugd（network&amp;nbspcable&amp;nbsphotplug&amp;nbspmanagement&amp;nbspdaemon）守护程序，用于监控一个或多个网络接口的状态，当某些事件触发时运行一个外部脚本程序。

53.&amp;nbspnetdump：远程网络备份服务器守护进程。

54.&amp;nbspnetfs：Network&amp;nbspFilesystem&amp;nbspMounter，该进程安装和卸载NFS、SAMBA和NCP网络文件系统。

55.&amp;nbspnfs：网络文件系统守护进程。

56.&amp;nbspnfslock：NFS是一个流行的通过TCP/IP网络共享文件的协议，此守护进程提供了NFS文件锁定功能。

57.&amp;nbspntpd：Network&amp;nbsptime&amp;nbspProtocol&amp;nbspdaemon（网络时间校正协议）。ntpd是用来使系统和一个精确的时间源保持时间同步的协议守护进程。

58.&amp;nbspnetwork：激活/关闭启动时的各个网络接口守护进程。

59.&amp;nbsppsacct：该守护进程包括几个工具用来监控进程活动的工具，包括ac,lastcomm,&amp;nbspaccton 和sa。

60.&amp;nbsppcmcia：主要用于支持笔记本电脑接口守护进程。

61.&amp;nbspportmap：该守护进程用来支持RPC连接，RPC被用于NFS以及NIS 等服务。

62.&amp;nbsppostgresql:&amp;nbspPostgreSQL 关系数据库引擎。

63.&amp;nbspproftpd:&amp;nbspproftpd 是Unix下的一个配置灵活的ftp服务器的守护程序。

64.&amp;nbsppppoe：ADSL连接守护进程。

65.&amp;nbsprandom ：保存和恢复系统的高质量随机数生成器，这些随机数是系 统一些随机行为提供的。

66.&amp;nbsprawdevices：在使用集群文件系统时用于加载raw设备的守护进程。

67.&amp;nbspreadahead、readahead_early：readahead和readahead_early是在Fedora
core
2中最新推出的两个后台运行的守护程序。其作用是在启动系统期间，将启动系统所要用到的文件首先读取到内存中，然后在内存中进行执行，以加快系统的启动速
度。

68.&amp;nbsprhnsd：Red&amp;nbspHat 网络服务守护进程。通知官方的安全信息以及为系统打补丁。

69.&amp;nbsprouted ：该守护程序支持RIP协议的自动IP路由表维护。RIP主要 使用在小型网络上，大一点的网络就需要复杂一点的协议。

70.&amp;nbsprsync：remote&amp;nbspsync远程数据备份守护进程。

71.&amp;nbsprsh ：远程主机上启动一个shell，并执行用户命令。

72.&amp;nbsprwhod： 允许远程用户获得运行rwho守护程序的机器上所有已登录用户的列表。

73.&amp;nbsprstatd：一个为LAN上的其它机器收集和提供系统信息的守候进程。

74.&amp;nbspruserd：远程用户定位服务，这是一个基于RPC的服务，它提供关于当前记录到LAN上一个机器日志中的用户信息

75.&amp;nbsprwalld：激活rpc.rwall服务进程，这是一项基于RPC的服务，允许用户给每个注册到LAN机器上的其他终端写消息 。

76.&amp;nbsprwhod：激活rwhod服务进程，它支持LAN的rwho和ruptime服务。

77.&amp;nbspsaslauthd： 使用SASL的认证守护进程。

78.&amp;nbspsendmail：邮件服务器sendmail守护进程。

79.&amp;nbspsmb：Samba文件共享/打印服务守护进程。

80.&amp;nbspsnmpd：本地简单网络管理守护进程。

81.&amp;nbspsquid：代理服务器squid守护进程。

82.&amp;nbspsshd：OpenSSH服务器守护进程。Secure&amp;nbspShell&amp;nbspProtocol可以实现安全地远程管理主机。

83.&amp;nbspsmartd：Self&amp;nbspMonitor&amp;nbspAnalysis&amp;nbspand&amp;nbspReporting&amp;nbspTechnology&amp;nbspSystem，监控你的硬盘是否出现故障。

84.&amp;nbspsyslog：一个让系统引导时起动syslog和klogd系统日志守候进程的脚本。

85.&amp;nbsptime ：该守护进程从远程主机获取时间和日期，采用TCP协议。

86.&amp;nbsptime-udp： 该守护进程从远程主机获取时间和日期，采用UDP协议。

87.&amp;nbsptux：在Linux内核中运行apache服务器的守护进程。

88.&amp;nbspvsftpd：vsftpd服务器的守护进程。

89.&amp;nbspvncserver：&amp;nbspVNC （Virtual&amp;nbspNetwork&amp;nbspComputing，虚拟网络计算），它提供了一种在本地系统上显示远程计算机整个”桌面”的轻量型协议。

90.&amp;nbspxfs：X&amp;nbspWindow字型服务器守护进程，为本地和远程X服务器提供字型集。

91.&amp;nbspxinetd：支持多种网络服务的核心守护进程。

92.&amp;nbspypbind：为NIS（网络信息系统）客户机激活ypbind服务进程 。

93.&amp;nbspyppasswdd：NIS口令服务器守护进程。

94.&amp;nbspypserv：NIS主服务器守护进程。

95.&amp;nbspyum：RPM操作系统自动升级和软件包管理守护进程。</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/06/30/fedora-10-%e9%85%8d%e7%bd%ae%e6%9c%8d%e5%8a%a1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux gateway configuration (Fedora 10)</title>
		<link>http://liuchangjun.com/2009/06/30/linux-gateway-configuration-fedora-10/</link>
		<comments>http://liuchangjun.com/2009/06/30/linux-gateway-configuration-fedora-10/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:42:20 +0000</pubDate>
		<dc:creator>Liu Changjun</dc:creator>
				<category><![CDATA[Tech Script]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=115</guid>
		<description><![CDATA[<p>Transfered from my journal.</p> <p>http://www.laxjyj.com/www/web/4718544.html</p> <p>http://bbs.linuxpk.com/thread-4016-2-1.html</p> <p>/etc/sysconfig/network -&#62; /etc/sysconfig/networking/devices/ifcfg-eth0 -&#62; /etc/sysconfig/networking/devices/ifcfg-eth1 -&#62; /etc/sysconfig/network-scripts/ifcfg-eth0 -&#62; /etc/sysconfig/network-scripts/ifcfg-eth1</p> <p>cat network NETWORKING=yes HOSTNAME=frontend GATEWAY=10.4.3.1</p> <p>cat /etc/rc.d/rc.local route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.100.254 eth1 route add default gw 10.4.3.1 eth0</p> <p>#&#62;ip r #&#62;route -n</p> ]]></description>
			<content:encoded><![CDATA[<p>Transfered from my journal.</p>
<p>http://www.laxjyj.com/www/web/4718544.html</p>
<p>http://bbs.linuxpk.com/thread-4016-2-1.html</p>
<p>/etc/sysconfig/network -&gt;<br />
/etc/sysconfig/networking/devices/ifcfg-eth0 -&gt;<br />
/etc/sysconfig/networking/devices/ifcfg-eth1 -&gt;<br />
/etc/sysconfig/network-scripts/ifcfg-eth0 -&gt;<br />
/etc/sysconfig/network-scripts/ifcfg-eth1</p>
<p>cat network<br />
NETWORKING=yes<br />
HOSTNAME=frontend<br />
GATEWAY=10.4.3.1</p>
<p>cat /etc/rc.d/rc.local<br />
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.100.254 eth1<br />
route add default gw 10.4.3.1 eth0</p>
<p>#&gt;ip r<br />
#&gt;route -n</p>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/06/30/linux-gateway-configuration-fedora-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

