﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-OCM Dream-文章分类-09 Linux</title><link>http://www.blogjava.net/nobody_am/category/2082.html</link><description>&lt;br&gt;
Toooooo many Thing</description><language>zh-cn</language><lastBuildDate>Wed, 18 Apr 2007 15:26:06 GMT</lastBuildDate><pubDate>Wed, 18 Apr 2007 15:26:06 GMT</pubDate><ttl>60</ttl><item><title>Cygwin控制台中文化</title><link>http://www.blogjava.net/nobody_am/articles/111771.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Wed, 18 Apr 2007 15:09:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/111771.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/111771.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/111771.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/111771.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/111771.html</trackback:ping><description><![CDATA[编辑3个文件：.bashrc，.inputrc，.vimrc<br>内容分别如下：<br>1, .bashrc<br>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;base-files&nbsp;version&nbsp;3.7-1</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;To&nbsp;pick&nbsp;up&nbsp;the&nbsp;latest&nbsp;recommended&nbsp;.bashrc&nbsp;content,</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;look&nbsp;in&nbsp;/etc/defaults/etc/skel/.bashrc</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Modifying&nbsp;/etc/skel/.bashrc&nbsp;directly&nbsp;will&nbsp;prevent</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;setup&nbsp;from&nbsp;updating&nbsp;it.</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;The&nbsp;copy&nbsp;in&nbsp;your&nbsp;home&nbsp;directory&nbsp;(~/.bashrc)&nbsp;is&nbsp;yours,&nbsp;please</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;feel&nbsp;free&nbsp;to&nbsp;customise&nbsp;it&nbsp;to&nbsp;create&nbsp;a&nbsp;shell</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;environment&nbsp;to&nbsp;your&nbsp;liking.&nbsp;&nbsp;If&nbsp;you&nbsp;feel&nbsp;a&nbsp;change</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;would&nbsp;be&nbsp;benificial&nbsp;to&nbsp;all,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;send</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;a&nbsp;patch&nbsp;to&nbsp;the&nbsp;cygwin&nbsp;mailing&nbsp;list.</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;User&nbsp;dependent&nbsp;.bashrc&nbsp;file</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Shell&nbsp;Options</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;#############</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;See&nbsp;man&nbsp;bash&nbsp;for&nbsp;more&nbsp;options<img src="http://www.blogjava.net/Images/dot.gif"></span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Don't&nbsp;wait&nbsp;for&nbsp;job&nbsp;termination&nbsp;notification</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;set&nbsp;-o&nbsp;notify</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Don't&nbsp;use&nbsp;^D&nbsp;to&nbsp;exit</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;set&nbsp;-o&nbsp;ignoreeof</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Use&nbsp;case-insensitive&nbsp;filename&nbsp;globbing</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;shopt&nbsp;-s&nbsp;nocaseglob</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Make&nbsp;bash&nbsp;append&nbsp;rather&nbsp;than&nbsp;overwrite&nbsp;the&nbsp;history&nbsp;on&nbsp;disk</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;shopt&nbsp;-s&nbsp;histappend</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;When&nbsp;changing&nbsp;directory&nbsp;small&nbsp;typos&nbsp;can&nbsp;be&nbsp;ignored&nbsp;by&nbsp;bash</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;for&nbsp;example,&nbsp;cd&nbsp;/vr/lgo/apaache&nbsp;would&nbsp;find&nbsp;/var/log/apache</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;shopt&nbsp;-s&nbsp;cdspell</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Completion&nbsp;options</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;##################</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;These&nbsp;completion&nbsp;tuning&nbsp;parameters&nbsp;change&nbsp;the&nbsp;default&nbsp;behavior&nbsp;of&nbsp;bash_completion:</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Define&nbsp;to&nbsp;access&nbsp;remotely&nbsp;checked-out&nbsp;files&nbsp;over&nbsp;passwordless&nbsp;ssh&nbsp;for&nbsp;CVS</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;COMP_CVS_REMOTE=1</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Define&nbsp;to&nbsp;avoid&nbsp;stripping&nbsp;description&nbsp;in&nbsp;--option=description&nbsp;of&nbsp;'./configure&nbsp;--help'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;COMP_CONFIGURE_HINTS=1</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Define&nbsp;to&nbsp;avoid&nbsp;flattening&nbsp;internal&nbsp;contents&nbsp;of&nbsp;tar&nbsp;files</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;COMP_TAR_INTERNAL_PATHS=1</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;If&nbsp;this&nbsp;shell&nbsp;is&nbsp;interactive,&nbsp;turn&nbsp;on&nbsp;programmable&nbsp;completion&nbsp;enhancements.</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;Any&nbsp;completions&nbsp;you&nbsp;add&nbsp;in&nbsp;~/.bash_completion&nbsp;are&nbsp;sourced&nbsp;last.</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;case&nbsp;$-&nbsp;in</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;&nbsp;&nbsp;*i*)&nbsp;[[&nbsp;-f&nbsp;/etc/bash_completion&nbsp;]]&nbsp;&amp;&amp;&nbsp;.&nbsp;/etc/bash_completion&nbsp;;;</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;esac</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;History&nbsp;Options</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;###############</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Don't&nbsp;put&nbsp;duplicate&nbsp;lines&nbsp;in&nbsp;the&nbsp;history.</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;export&nbsp;HISTCONTROL="ignoredups"</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Ignore&nbsp;some&nbsp;controlling&nbsp;instructions</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;export&nbsp;HISTIGNORE="[&nbsp;&nbsp;&nbsp;]*:&amp;:bg:fg:exit"</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Whenever&nbsp;displaying&nbsp;the&nbsp;prompt,&nbsp;write&nbsp;the&nbsp;previous&nbsp;line&nbsp;to&nbsp;disk</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;export&nbsp;PROMPT_COMMAND="history&nbsp;-a"</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Aliases</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;#######</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Some&nbsp;example&nbsp;alias&nbsp;instructions</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;If&nbsp;these&nbsp;are&nbsp;enabled&nbsp;they&nbsp;will&nbsp;be&nbsp;used&nbsp;instead&nbsp;of&nbsp;any&nbsp;instructions</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;they&nbsp;may&nbsp;mask.&nbsp;&nbsp;For&nbsp;example,&nbsp;alias&nbsp;rm='rm&nbsp;-i'&nbsp;will&nbsp;mask&nbsp;the&nbsp;rm</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;application.&nbsp;&nbsp;To&nbsp;override&nbsp;the&nbsp;alias&nbsp;instruction&nbsp;use&nbsp;a&nbsp;\&nbsp;before,&nbsp;ie</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;\rm&nbsp;will&nbsp;call&nbsp;the&nbsp;real&nbsp;rm&nbsp;not&nbsp;the&nbsp;alias.</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Interactive&nbsp;operation<img src="http://www.blogjava.net/Images/dot.gif"></span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;rm='rm&nbsp;-i'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;cp='cp&nbsp;-i'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;mv='mv&nbsp;-i'</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Default&nbsp;to&nbsp;human&nbsp;readable&nbsp;figures</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;df='df&nbsp;-h'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;du='du&nbsp;-h'</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Misc&nbsp;:)</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;less='less&nbsp;-r'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;raw&nbsp;control&nbsp;characters</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;whence='type&nbsp;-a'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;where,&nbsp;of&nbsp;a&nbsp;sort</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;grep='grep&nbsp;--color'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;show&nbsp;differences&nbsp;in&nbsp;colour</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Some&nbsp;shortcuts&nbsp;for&nbsp;different&nbsp;directory&nbsp;listings</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;ls='ls&nbsp;-hF&nbsp;--color=tty'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;classify&nbsp;files&nbsp;in&nbsp;colour</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;dir='ls&nbsp;--color=auto&nbsp;--format=vertical'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;vdir='ls&nbsp;--color=auto&nbsp;--format=long'</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;ll='ls&nbsp;-l'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;long&nbsp;list</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;la='ls&nbsp;-A'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;all&nbsp;but&nbsp;.&nbsp;and&nbsp;..</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;alias&nbsp;l='ls&nbsp;-CF'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Functions</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;#########</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Some&nbsp;example&nbsp;functions</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;function&nbsp;settitle()&nbsp;{&nbsp;echo&nbsp;-ne&nbsp;"\e]2;$@\a\e]1;$@\a";&nbsp;}</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">#####################&nbsp;以下为添加部分&nbsp;################################</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;cygwin中取\usr\share\locale\zh_CN\LC_MESSAGES中*.mo文件，如果提示信息中</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;的字符集为utf8则会显示有误（不知何解？，magiclinux无类似情况），为gb2312</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;则正常，大概与gettext这个模块有关，这个模块的作用是使linux程序提示信息</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;区域话，即不同地区用不同语言，即常说的i18n；像我们设置的zh_CN.GBK，&#8220;.&#8221;</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;之前部分&#8220;zh_CN&#8221;表示地区即&#8220;中国大陆&#8221;，后面部分&#8220;GBK&#8221;表示字符集编码，</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;像我们下面的设置，当程序调用时会到\usr\share\locale\目录中查找，发现地</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;区为&#8220;zh_CN&#8221;则到该目录中查找程序对应的*.mo文件，*.mo文件的名称是在调用</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;的程序中设置了的。然后取该语种的对应提示，然后按编码（在mo文件中指明了）</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;处理该文字。</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;当然这些不是自动处理的，要在程序中调用像setlocale、textdomian、gettext</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;这样的函数处理。</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;在cygwin中有些程序，做了下面的设置，因为对应的mo文件中编码为utf8而无法</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;显示，我是直接将它删除，之后程序会因为找不到mo文件而用默认的英文来显示</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;的。（下面的编码设置并没有错，应该是cygwin程序中的BUG，只是设置了LC_ALL</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;就没必要设LANG了，有的文档上面这样写的:)）</span><span style="color: #008000;"><br></span><span style="color: #000000;">export&nbsp;set&nbsp;LC_ALL</span><span style="color: #000000;">=</span><span style="color: #000000;">zh_CN.GBK<br>export&nbsp;set&nbsp;LANG</span><span style="color: #000000;">=</span><span style="color: #000000;">zh_CN.GBK<br></span><span style="color: #008000;">#</span><span style="color: #008000;">export&nbsp;set&nbsp;LC_CTYPE=zh_CN.UTF-8</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">export&nbsp;set&nbsp;CHARSET=UTF-8</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;解决ls中文显示问题</span><span style="color: #008000;"><br></span><span style="color: #000000;">alias&nbsp;ls</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">ls&nbsp;--show-control-chars&nbsp;-hF&nbsp;--color=tty</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>alias&nbsp;dir</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">ls&nbsp;--show-control-chars</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>alias&nbsp;less</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">less&nbsp;--raw-control-chars</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>alias&nbsp;ll</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">ls&nbsp;-l</span><span style="color: #800000;">'</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;long&nbsp;list</span><span style="color: #008000;"><br></span><span style="color: #000000;">alias&nbsp;la</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">ls&nbsp;-A</span><span style="color: #800000;">'</span><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;all&nbsp;but&nbsp;.&nbsp;and&nbsp;..</span><span style="color: #008000;"><br></span><span style="color: #000000;">alias&nbsp;l</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">ls&nbsp;-CF</span><span style="color: #800000;">'</span><span style="color: #000000;">&nbsp;<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;添加清屏处理</span><span style="color: #008000;"><br></span><span style="color: #000000;">alias&nbsp;clear</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">clearn</span><span style="color: #800000;">'</span><span style="color: #000000;"><br>alias&nbsp;clr</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">clearn</span><span style="color: #800000;">'</span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;添加whereis的别名</span><span style="color: #008000;"><br></span><span style="color: #000000;">alias&nbsp;whereis</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">which</span><span style="color: #800000;">'</span><span style="color: #000000;"><br></span></div>
2,.inputrc<br>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;base-files&nbsp;version&nbsp;3.7-1</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;To&nbsp;pick&nbsp;up&nbsp;the&nbsp;latest&nbsp;recommended&nbsp;.inputrc&nbsp;content,</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;look&nbsp;in&nbsp;/etc/defaults/etc/skel/.inputrc</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Modifying&nbsp;/etc/skel/.inputrc&nbsp;directly&nbsp;will&nbsp;prevent</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;setup&nbsp;from&nbsp;updating&nbsp;it.</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;The&nbsp;copy&nbsp;in&nbsp;your&nbsp;home&nbsp;directory&nbsp;(~/.inputrc)&nbsp;is&nbsp;yours,&nbsp;please</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;feel&nbsp;free&nbsp;to&nbsp;customise&nbsp;it&nbsp;to&nbsp;create&nbsp;a&nbsp;shell</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;environment&nbsp;to&nbsp;your&nbsp;liking.&nbsp;&nbsp;If&nbsp;you&nbsp;feel&nbsp;a&nbsp;change</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;would&nbsp;be&nbsp;benifitial&nbsp;to&nbsp;all,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;send</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;a&nbsp;patch&nbsp;to&nbsp;the&nbsp;cygwin&nbsp;mailing&nbsp;list.</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;the&nbsp;following&nbsp;line&nbsp;is&nbsp;actually</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;equivalent&nbsp;to&nbsp;"\C-?":&nbsp;delete-char</span><span style="color: #008000;"><br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[3~</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;delete</span><span style="color: #000000;">-</span><span style="color: #000000;">char<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;VT</span><span style="color: #008000;"><br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[1~</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;beginning</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[4~</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;end</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;kvt</span><span style="color: #008000;"><br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[H</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;beginning</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[F</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;end</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;rxvt&nbsp;and&nbsp;konsole&nbsp;(i.e.&nbsp;the&nbsp;KDE-app<img src="http://www.blogjava.net/Images/dot.gif">)</span><span style="color: #008000;"><br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[7~</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;beginning</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br></span><span style="color: #800000;">"</span><span style="color: #800000;">\e[8~</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;end</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;VT220</span><span style="color: #008000;"><br></span><span style="color: #800000;">"</span><span style="color: #800000;">\eOH</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;beginning</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br></span><span style="color: #800000;">"</span><span style="color: #800000;">\eOF</span><span style="color: #800000;">"</span><span style="color: #000000;">:&nbsp;end</span><span style="color: #000000;">-</span><span style="color: #000000;">of</span><span style="color: #000000;">-</span><span style="color: #000000;">line<br><br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Allow&nbsp;8-bit&nbsp;input/output</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">set&nbsp;meta-flag&nbsp;on</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">set&nbsp;convert-meta&nbsp;off</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">set&nbsp;input-meta&nbsp;on</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">set&nbsp;output-meta&nbsp;on</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">$if&nbsp;Bash</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Don't&nbsp;ring&nbsp;bell&nbsp;on&nbsp;completion</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;bell-style&nbsp;none</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;or,&nbsp;don't&nbsp;beep&nbsp;at&nbsp;me&nbsp;-&nbsp;show&nbsp;me</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;bell-style&nbsp;visible</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Filename&nbsp;completion/expansion</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;completion-ignore-case&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;show-all-if-ambiguous&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Expand&nbsp;homedir&nbsp;name</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;expand-tilde&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Append&nbsp;"/"&nbsp;to&nbsp;all&nbsp;dirnames</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;mark-directories&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;mark-symlinked-directories&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Match&nbsp;all&nbsp;files</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">set&nbsp;match-hidden-files&nbsp;on</span><span style="color: #008000;"><br></span><span style="color: #000000;"><br>&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;'Magic&nbsp;Space'</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;Insert&nbsp;a&nbsp;space&nbsp;character&nbsp;then&nbsp;performs</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;a&nbsp;history&nbsp;expansion&nbsp;in&nbsp;the&nbsp;line</span><span style="color: #008000;"><br></span><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #008000;">#</span><span style="color: #008000;">Space:&nbsp;magic-space</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">$endif</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">#####################&nbsp;以下为添加部分&nbsp;################################</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;关闭bash命令行8字节字符转义符的转换</span><span style="color: #008000;"><br></span><span style="color: #000000;">set&nbsp;convert</span><span style="color: #000000;">-</span><span style="color: #000000;">meta&nbsp;off<br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;使bash命令行支持8字节字符输入</span><span style="color: #008000;"><br></span><span style="color: #000000;">set&nbsp;input</span><span style="color: #000000;">-</span><span style="color: #000000;">meta&nbsp;on<br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;使bash命令行支持8字节字符输出</span><span style="color: #008000;"><br></span><span style="color: #000000;">set&nbsp;output</span><span style="color: #000000;">-</span><span style="color: #000000;">meta&nbsp;on<br></span><span style="color: #008000;">#</span><span style="color: #008000;">&nbsp;让bash的命令行已vi模式执行，屏蔽掉下面一行，BASH的命令行操作</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;就像vi中编辑文本一样，默认为INSERT模式，可以在BASH启动后直接</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;输入：set&nbsp;-o&nbsp;vi，来启动该开关，set&nbsp;+o&nbsp;vi关闭该模式，但在cygwin</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">&nbsp;中调用set&nbsp;+o&nbsp;vi关闭时会出现一些乱码，估计也是一个BUG</span><span style="color: #008000;"><br>#</span><span style="color: #008000;">set&nbsp;editing-mode&nbsp;vi</span></div>
3,.vimrc<br>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #800000;">"</span><span style="color: #800000;">&nbsp;显示语法高亮度</span><span style="color: #800000;"><br></span><span style="color: #000000;">:syntax&nbsp;on<br></span><span style="color: #800000;">"</span><span style="color: #800000;">&nbsp;设置字符编码，可使显示中文光标移动和字符删除操作变为双字节</span><span style="color: #800000;"><br>"</span><span style="color: #800000;">:set&nbsp;encoding=cp936</span><span style="color: #800000;"><br>"</span><span style="color: #800000;">&nbsp;设置vim中TAB缩进为4个空格</span><span style="color: #800000;"><br>"</span><span style="color: #800000;">:set&nbsp;ts=4</span></div>
<br><br><img src ="http://www.blogjava.net/nobody_am/aggbug/111771.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2007-04-18 23:09 <a href="http://www.blogjava.net/nobody_am/articles/111771.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转载]Windows下通过xmanager远程桌面控制Linux</title><link>http://www.blogjava.net/nobody_am/articles/106643.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Tue, 27 Mar 2007 05:11:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/106643.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/106643.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/106643.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/106643.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/106643.html</trackback:ping><description><![CDATA[
		<font face="Verdana"> 随着互联网的高速发展以及</font>
		<a href="http://wiki.ccw.com.cn/Linux" target="_blank">
				<font face="Verdana" color="#0000cc">
						<b>Linux</b>
				</font>
		</a>
		<font face="Verdana">企业应用的成熟，Linux被广泛应用于服务器领域，如何实现Linux的远程管理成为网络管理员的首要任务。我们经常见到的几种最为常用的</font>
		<a href="http://wiki.ccw.com.cn/index.php/Windows" target="_blank">
				<font color="#0000cc">
						<!-- server 正文页网画中画广告  -->
						<font face="Verdana">
						</font>
						<table style="MARGIN: 10px 7px 3px 4px" cellspacing="0" cellpadding="0" align="left" border="0">
								<tbody>
										<tr>
												<td>
														<div id="ad_position_roller_30" twffan="done">
																<font face="Verdana">
																</font>
														</div>
												</td>
										</tr>
								</tbody>
						</table>
						<b>windows</b>
				</font>
		</a>下远程管理Linux服务器的方法，基本上都是利用SecureCRT,F-Secure SSH 抑或是PUTTY等客户端工具通过ssh服务来实现Windows下管理Linux服务器的，这些客户端工具几乎不需要什么配置，使用简单，但是它们都无法启动窗口服务的程序或进程，也无法达到远程桌面控制。本文将介绍通过xmanager远程桌面控制Linux的方法和技巧。本文中所指的Linux系统，如无特别说明都以RedHat 9.0为例。
<p><font face="Verdana">  有两种方法可以实现远程管理Linux桌面窗口，其中一个就是是我们所选择的X显示管理器（X display manager）或者说xdm，另一个流行的解决方案是vnc。我选择xdm而不是vnc出于两点原因。第一，vnc要有个服务端的守护进程，为每个共享的桌面运行。第二，我已经有X服务器的软件安装在所有的工作站上，不想再添加额外的客户端软件了。</font></p><p><font face="Verdana">我们先来了解一些X系统方面的知识，X是用在大多数<a href="http://wiki.ccw.com.cn/UNIX" target="_blank"><font color="#0000cc"><b>UNIX</b></font></a>系统中的图形支持系统。如果你在你的Linux机器上使用GNOME或者KDE的话，你就正在使用X系统。它由X联盟(www.X.org)定义并维护。大多数的Linux用户使用的都是由XFree86 项目 (www.xfree86.org)提供的X Window系统的实现。xdm 是一个显示管理器，提供了灵活的任务管理功能。然而xdm通常被认为是“GUI的登陆屏幕，可以自动启动我的X任务”，我们会看到实际上它要更为强大。</font></p><p><font face="Verdana">  xdm 使用X联盟的X显示管理控制协议，即XDMCP，来和X服务器通信。它允许X服务器从运行xdm服务的服务器上获得会话服务。</font></p><p><font face="Verdana">  当使用xdm管理这些X任务的时候在设置上有些复杂。但设置xdm 可以得到本地的和其他服务器上的桌面了。我们下面将介绍服务器上配置xdm的方法和步骤，这里描述的配置允许任何的 XDMCP 客户访问 Linux 服务器桌面环境（当然了影响了X的安全）。</font></p><p><font face="Verdana">  第一步，我们在Linux系统下，修改/etc/X11/xdm/Xaccess文件，找到下面的语句：# * #any  host  <a href="http://topic.ccw.com.cn/corpCenter/249.html" target="_blank"><font color="#0000cc"><b>ca</b></font></a>n  get  a  login  window<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906100711736.jpg" border="0" twffan="done" /><br /> <br />去掉最前面的#号，成为<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906100804950.jpg" border="0" twffan="done" /></font><font face="Verdana"><br />   <br />第二步，我们修改/etc/X11/gdm/gdm.conf文件，找到下面的语句：<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906100910861.jpg" border="0" twffan="done" /><br /> <br />  将其中的Enable＝false 改为Enable＝true 或 Enable＝1。<br />  同时我们要确保存在下面的语句，因为177端口是我们要配置的xdmcp服务的监听端口，我们在后面配置xmanager将看到。<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101013930.jpg" border="0" twffan="done" /><br /> <br />   第三步，我们要修改/etc/inittab文件，将下面的语句<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101126696.jpg" border="0" twffan="done" /><br /> <br />  改为如下，如果原来就是id:5:initdefault:就不用更改。<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101214364.jpg" border="0" twffan="done" /><br /> <br />  同时，找到如下图文字所在的地方，<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101255302.jpg" border="0" twffan="done" /><br /> <br />  将它修改为x:5:respawn:/usr/bin/gdm，即如下图所示，<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101342628.jpg" border="0" twffan="done" /><br /> <br />   第四步，我们修改/etc/X11/xdm/xdm-config的最后一行，在displayManager.requestPort:0前面加上一个！号，结果如下<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101453118.jpg" border="0" twffan="done" /><br /> <br />  第五步，我们修改确保/etc/X11/xdm/Xservers的属性为444，/etc/X11/xdm/Xsetup_0的属性为755，在RedHat 9.0中，我们可以看到这两个文件默认的属性就是444和775，因此不用修改。<br /> <img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101647407.jpg" border="0" twffan="done" /></font></p><p><font face="Verdana">   最后，如果我们的Linux机器配置有防火墙，为防止防火墙将通过177端口（即xdmcp服务）的数据过虑，我们必须加上如下的规则：<br />   iptables  -A  INPUT  -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT<br />  <br />至此为止，我们在Linux下的配置xdm已经基本完成。但上面这些配置还只是x服务器端的配置，我们要想实现在Windows远程桌面控制Linux，还必须要<br />有Windows下的客户端工具，xmanager正是这样的一个工具，它是一个简单易用的高性能的运行在Windows平台上的 X Server 软件。我们现在来介绍xmanager的在Windows下的安装和配置技巧，这里我使用的机器是windows <a href="http://wiki.ccw.com.cn/Athlon+XP" target="_blank"><font color="#0000cc"><b>xp</b></font></a>。</font></p><p><font face="Verdana">我们先下载xmanager的安装文件，我下载的是xmanager1.3.9，安装后，在安装目录下，我们点击xconfig，选择xdm，如下图，选择”XDM Indirect”,在 host：后面填上我们已经配置好的Linux系统的ip，注意下面的XDMCP Port:177, 这就是我们在配置Linux服务器时必须保证 port＝177的原因。<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101822661.jpg" border="0" twffan="done" /><br /> <br />然后我们双击xmanager安装目录里的xmanager,出现下面的画面，<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906101958797.jpg" border="0" twffan="done" /><br /> <br />选择图中的linux机器，然后点击“连接”即可以连接到我们的redhat登陆桌面了。<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906102012270.jpg" border="0" twffan="done" /><br /> <br />输入用户名，确定后系统会提示让你输入密码，验证成功后就可以使用我们的redhat桌面了，效果如下：<br /><img src="http://imgs.ccw.com.cn/resources/server/200509/20050906102116399.jpg" border="0" twffan="done" /><br /> <br />本文介绍了windows下通过xmanager来远程桌面控制Linux的方法，并具体介绍了xdm和xmanager的配置和使用方法，希望给大家带来一定的帮助。</font></p><p><font face="Verdana">参考文献：<br />1：《配置XDM--一种Linux的图形登录界面》  http://www.hackhome.com/2005/7-14/00414266097.shtml<br />2：《XManager 系统配置简介》 http://www.7622.com/list/47086.htm<br />3，如果没有安装XDM，可以直接到第三张安装盘那里找出xdm的rpm包安装。</font></p><img src ="http://www.blogjava.net/nobody_am/aggbug/106643.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2007-03-27 13:11 <a href="http://www.blogjava.net/nobody_am/articles/106643.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速掌握grub和lilo</title><link>http://www.blogjava.net/nobody_am/articles/14054.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 01:08:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14054.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14054.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14054.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14054.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14054.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用实验快速掌握grub和lilo&nbsp;[实验目的]1.灵活应用grub和lilo引导系统。2.当系统出现无法引导时，会快速修复。&nbsp;[实验要求]1.RH8.0系统。2.能够熟练应用rescue模式，应急实验中无法预料的错误。&nbsp;[实验步骤]1.安装grub。&nbsp;&nbsp;&nbsp; 情景：假设你现在用grub引导系统...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14054.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14054.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 09:08 <a href="http://www.blogjava.net/nobody_am/articles/14054.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iptables 入门</title><link>http://www.blogjava.net/nobody_am/articles/14052.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 01:07:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14052.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14052.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14052.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14052.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14052.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: iptables 入门这一节开始说明 iptables 的观念及用法iptables 中的指令，均需区分大小写。ipchains 和 iptables 在语法上的主要的差异，注意如下∶&nbsp;&nbsp; 1. 在 ipchains 中，诸如 input 链，是使用小写的 chains 名，在 iptables 中，要改用大写 INPUT。&nbsp;&nbsp; 2. 在 iptab...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14052.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 09:07 <a href="http://www.blogjava.net/nobody_am/articles/14052.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用squid+nat作透明代理</title><link>http://www.blogjava.net/nobody_am/articles/14053.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 01:07:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14053.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14053.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14053.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14053.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14053.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><B><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 20pt; mso-bidi-font-size: 12.0pt">squid+nat</SPAN></B><B><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作透明代理</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 20pt; mso-bidi-font-size: 12.0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一，要点：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>1.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包，并启动</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务</SPAN><SPAN lang=EN-US>(service squid start)</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>2.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">编辑</SPAN><SPAN lang=EN-US>squid.conf</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>3.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</SPAN><SPAN lang=EN-US>iptables</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US>nat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>4.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重启</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二，重点描述：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>1.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分析</SPAN><SPAN lang=EN-US>squid.conf</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">因为</SPAN><SPAN lang=EN-US>suid.conf</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件比较复杂，自己写起来麻烦，所以最好直接在原文件上修改，以达到你的</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目的，但在修改之前，最好做个备份。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本文会提到一些要修改的地方，然后，提示怎么修改</SPAN><SPAN lang=EN-US>,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最好在注释的后面添加，不要修改原文。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>=====&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">找到</SPAN><SPAN lang=EN-US>httpd_accel_host</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改为：</SPAN><SPAN lang=EN-US>httpd_accel_host<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>virtual</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>=====&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">找到</SPAN><SPAN lang=EN-US># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面有一些提示：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>#acl our_networks src 192.168.1.0/24 192.168.2.0/24</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>#http_access allow our_networks</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">根据你的内部网地址，修改为：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>acl our_networks src 192.168.1.0/24 192.168.2.0/24</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>http_access allow our_networks</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>======&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">找到</SPAN><SPAN lang=EN-US>cache_peer</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这是实现多重代理，后有一大堆的说明。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">假设你有一个</SPAN><SPAN lang=EN-US>http</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代理，在这里设定之后，客户端就不用手动设了。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里假设你有</SPAN><SPAN lang=EN-US>http</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代理：</SPAN><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:chsdate w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899"><SPAN lang=EN-US>1.2.3</SPAN></st1:chsdate><SPAN lang=EN-US>.4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN><SPAN lang=EN-US>3128</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在注释的后面添加：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>cache_peer<st1:chsdate w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899">1.2.3</st1:chsdate>.4 parent 3128 3130 no-query no-netdb-exchange proxy-only</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">照这样，你可以多设几条，加快访问速度嘛。至于后面的选项，配置文件里有说明。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>======&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果你想限制某些站点不让客户端登陆</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">找到</SPAN><SPAN lang=EN-US># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就象上面所说的那样，可以多定义几个</SPAN><SPAN lang=EN-US>acl:</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>acl our_networks src 192.168.1.0/24 192.168.2.0/24</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>acl deny_networks src 192.168.1.0/24 192.168.2.0/24</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>http_access deny deny_networks</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>http_access allow our_networks</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">需要注意的是：</SPAN><SPAN lang=EN-US>acl</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后面的名称要惟一，且</SPAN><SPAN lang=EN-US>deny</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则放在</SPAN><SPAN lang=EN-US>allow</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则前面。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>======&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果你想加速</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代理</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重新编译内核和</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是方法一。方法二是修改</SPAN><SPAN lang=EN-US>squid.conf</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置参数，到底要修改什么，</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">请仔细阅读注释掉的说明文字。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>2.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设定</SPAN><SPAN lang=EN-US>iptables</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US>nat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为试验，你最好在</SPAN><SPAN lang=EN-US>iptables</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里只保留下面两条规则。注意：</SPAN><SPAN lang=EN-US>iptables</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只能在网关上设定。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">假设你的</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务开启在</SPAN><SPAN lang=EN-US>192.168.1.1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，当然</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务可以开启在任何地方。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则一，伪装内网</SPAN><SPAN lang=EN-US>IP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规则二，实现透明代理：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># iptables -t nat -A PREROUTING<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-s 192.168.1.0/24 -i eth0 -p tcp --dport </SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>80<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-j DNAT --to-distination<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>192.168.1.1:3128</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果你不明白，</SPAN><SPAN lang=EN-US>192.168.2.0/24</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">怎么办，你想想网关和客户机的关系。然后仿照上面的规则</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">写到相应网关机器的</SPAN><SPAN lang=EN-US>iptables</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>3.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重启服务：</SPAN><SPAN lang=EN-US>service squid restart,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果失败的话，用</SPAN><SPAN lang=EN-US> ps -A<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>| grep<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>squid </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">找到</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的进程号，然后</SPAN><SPAN lang=EN-US> kill -9 squid-ID</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。然后，</SPAN><SPAN lang=EN-US>service squid start.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三，总结：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为什么用</SPAN><SPAN lang=EN-US>squid</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">？有两大有点：</SPAN><SPAN lang=EN-US>1)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为简单的网站过滤。</SPAN><SPAN lang=EN-US>2)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为网页的缓冲</SPAN><SPAN lang=EN-US>, </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提高客户机访</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">问速度。</SPAN></P><img src ="http://www.blogjava.net/nobody_am/aggbug/14053.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 09:07 <a href="http://www.blogjava.net/nobody_am/articles/14053.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速学习sendmail</title><link>http://www.blogjava.net/nobody_am/articles/14050.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:59:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14050.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14050.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14050.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14050.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14050.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用实验快速学习sendmail&nbsp;前言：mail配置比较复杂，本文用实验的方法尽量以最通俗的方式，让读者学习sendmail配置。&nbsp;[实验目的]1.安装sendmail。2.在sendmail中使用假名。3.用m4改变中转行为。4.安装和配置POP服务器和客户端。&nbsp;[实验要求]1.两台RH8.0机器互连。2.机器1已配...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14050.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14050.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:59 <a href="http://www.blogjava.net/nobody_am/articles/14050.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速认识NIS</title><link>http://www.blogjava.net/nobody_am/articles/14049.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:57:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14049.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14049.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14049.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14049.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14049.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><FONT face="宋体, MS Song"><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 'HG Mincho Light J'; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">用实验快速认识</SPAN><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt">NIS<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt"><o:p><FONT face="宋体, MS Song">&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">前言：</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">是我们比较不常用的东西，但是在某些集中管理方面，有一定用途。本文以实验快速认识</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">[<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">实验目的</SPAN>]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">配置</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务端。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">配置</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">[<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">实验要求</SPAN>]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">两台互通的</SPAN>RH8.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">的</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">：</SPAN>192.168.0.1</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">的</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">：</SPAN>192.168.0.2</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">[<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">实验步骤</SPAN>]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">一</SPAN>.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">配置</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务端。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">将作为服务端，检查机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">是否装有下列软件？</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>ypserv</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>ypbind</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>yp-tools</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>make</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">缺什么包，安装什么包。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">编辑</SPAN>/etc/sysconfig/network,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">追加下列一行：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>NISDOMAIN=REDHAT</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">为立刻使上述设置生效，运行：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># domainname<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>REDHAT</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">4.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">编辑</SPAN>/var/yp/Makefile,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">找到</SPAN>all: passwd group ......<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">这一行，修改如下：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>all:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>passwd group</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">5.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">起动</SPAN>portmap,ypserv<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service portmap start</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service ypserv start</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">6.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">初始化</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">数据库，运行：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># /usr/lib/yp/ypinit -m</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">注意：</SPAN>1) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">若以上配置有问题，会显示出错。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>2) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">提示增加</SPAN>hosts<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">，按</SPAN>[CTRL-D]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">7.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">若上部没有错误，重新起动</SPAN>ypserv</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service ypserv restart</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">8.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">启动密码进程：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service yppasswdd start</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">9.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">检查进程是否真的运行，运行：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># ps<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>auxf | grep yp</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">10.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">检查日志确定，</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务真的正常，运行：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># tail<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>/var/log/messages</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><o:p><FONT face="宋体, MS Song">&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">二</SPAN>.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">配置</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">作为</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端，检查机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">是否安装了下列包：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>portmap</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>ypbine</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>yp-tools</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>authconfig</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">缺什么包，安装什么包。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">确认服务端打开</SPAN>portmap<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务：</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># rpcinfo -p 192.168.0.1</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">用</SPAN>authconfig<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">工具，配置客户端访问服务器。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Use NIS <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">前选中，</SPAN>Domain: REDHAT ,Server: 192.168.0.1</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">4.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2authconfig<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">结束时，</SPAN>ypbind<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">会自动启动。观察</SPAN> /var/log/messages <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">末尾有无报错。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">5.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">运行</SPAN># ypcat<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>passwd<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">看服务器提供了哪些用户。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">6.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">上新增账户：</SPAN>nisuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># useradd -u 1200 nisuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># passwd nisuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">7.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">上新增账户：</SPAN> localuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># useradd -u 1300 localuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># passwd<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>localuser</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">8.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">在</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务器用</SPAN>nisuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">登录，在</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端用</SPAN>localuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">登录，会成功。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">试着在客户端用</SPAN>nisuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">登录，会成功吗？</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">9.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">在机器</SPAN>1,/var/yp/<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">目录下运行：</SPAN>make<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">，然后再在</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端用</SPAN>nisuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">登录，成功吗？</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">在</SPAN>$<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">的提示符前有</SPAN>nisuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">的目录提示吗？</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">10.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">当</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务器端，</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端有一个相同的账户</SPAN>usernis,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">且</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务端</SPAN>/var/yp/<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">下，</SPAN>make</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">过。在</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端用</SPAN>usernis<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">登录，这个账户是服务端还是客户端提供的？</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><o:p><FONT face="宋体, MS Song">&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">[<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">实验恢复</SPAN>]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">1.NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端的</SPAN>authconfig <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">里，关掉</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">在</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">服务器端，</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">客户端关掉相应打开的服务。</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><o:p><FONT face="宋体, MS Song">&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song">[<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">实验总结</SPAN>]</FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">的集中式管理，不止</SPAN>passwd<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">，</SPAN>group<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">，在编辑</SPAN>/etc/yp/Makefile<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">时，</SPAN>all<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">：的后面</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><FONT face="宋体, MS Song"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">有很多。至于怎么用，在实践中，还需自己摸索。我们在这里，明白</SPAN>NIS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030">是怎么回事就可</SPAN></FONT></P>
<P class=MsoNormal style="TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: ZYSong18030; mso-hansi-font-family: ZYSong18030"><FONT face="宋体, MS Song">以了。毕竟，用它的机会不多。</FONT></SPAN></P><img src ="http://www.blogjava.net/nobody_am/aggbug/14049.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:57 <a href="http://www.blogjava.net/nobody_am/articles/14049.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速配置Vsftp</title><link>http://www.blogjava.net/nobody_am/articles/14047.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:55:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14047.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14047.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14047.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14047.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14047.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><FONT face=宋体><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 'HG Mincho Light J'; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用实验快速配置</SPAN><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt">Vsftp<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">前言，</SPAN>Vsftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">是一种相当安全的</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务器，而且</SPAN>vsftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">成为</SPAN>RH8.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">与</SPAN>9.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的标准</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务器。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">本文用实验的方法快速配置</SPAN>Vsftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验目的</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置一个允许</SPAN>anonymous<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用户下载的</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置一个允许</SPAN>anonymous<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用户上传的</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: maroon"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验要求</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">一台</SPAN>RH8.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机</SPAN>,IP:192.168.0.1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。如果</SPAN>9.0,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置文件在</SPAN>/etc/vsftpd/vsftpd.conf,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">且</SPAN>vsftpd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">包集成</SPAN>anonftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">包，配置方式一样。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: maroon"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验步骤</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置一个允许</SPAN>anonymous<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用户下载的</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>1) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">关闭</SPAN>iptables<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># service iptables stop</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># chkconfig iptables off</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>2) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">安装软件包。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">查看下列软件包装了没有？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>xinetd<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>vsftpd </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>anonftp</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">缺什么，装什么。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 14.15pt"><FONT face=宋体>3) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">启动</SPAN>vsftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># chkconfig vsftpd<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>on</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># service xinetd restart</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">若是</SPAN>RH9.0,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用</SPAN>service vsftpd start.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>4) touch<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>/var/ftp/pub/iAmVsftpServer</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>5) ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">客户端登陆，如：用</SPAN>lftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">匿名登陆</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN># lftp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>192.168.0.1 </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">能下载</SPAN>/pub/iAmVsftpServer<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">吗？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置一个允许</SPAN>anonymous<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用户上传的</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>1) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">在</SPAN>/var/ftp/<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">创建一个上传目录，并修改权限。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN># mkdir /var/ftp/incoming</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>#chown root.ftp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>/var/ftp/incoming</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>#chmod<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>730 /var/ftp/incoming</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>2) <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">编辑</SPAN>/var/vsftpd.conf.(<SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN>rh9.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">为</SPAN>/var/vsftpd/vsftpd.conf)<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">找到</SPAN># anon_upload_enable=YES<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">下面，增加下列四行：</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="mso-spacerun: yes"><FONT face=宋体>&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>anon_upload_enable=YES</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>chown_uploads=YES</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>chown_username=daemon</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>anon_umask=077</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">且确保</SPAN> anonymous_enabled=YES<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">有效。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>3)<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用</SPAN>ftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">客户端软件登陆</SPAN>192.168.0.1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">能上传到</SPAN>incoming<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">目录吗？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>4)<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">观察</SPAN>/var/log/vsftpd.log<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的内容。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验总结</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">本文没有解释配置文件里内容的意思，并且大部分都用默认的配置，如果想了解各项</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置的意义，参考各项上面</SPAN>#<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">号后的注释。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: maroon"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">题外话</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">由于</SPAN>vsftp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的访问目录在</SPAN>/var/ftp/<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，难道把所有提供下载的东西全</SPAN>cp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">到</SPAN>/var/ftp/pub</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">下吗？不需要</SPAN>! <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">假设，你在</SPAN>/data<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">下有个目录叫</SPAN> /movie <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，现在我们把此目录的东西供出</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">下载。第一步，</SPAN># mkdir /var/ftp/pub/movie<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>. <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">第二步，挂载，</SPAN># mount<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-o ro<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>--bind</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>/data/movie<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>/var/ftp/pub/movie.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">现在是不是轻松提供下载呢？注意：提供下载的目录</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">权限设置。</SPAN> </FONT></P><img src ="http://www.blogjava.net/nobody_am/aggbug/14047.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:55 <a href="http://www.blogjava.net/nobody_am/articles/14047.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速配置Nfs</title><link>http://www.blogjava.net/nobody_am/articles/14048.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:55:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14048.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14048.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14048.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14048.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14048.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><FONT face=宋体><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 'HG Mincho Light J'; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用实验快速配置</SPAN><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt">Nfs<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">前言：</SPAN>nfs<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">是</SPAN>linux<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，</SPAN>unix<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">系统之间高速共享的一种方式，本文用实验的方式快速配置</SPAN>nfs<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验目的</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实现</SPAN>nfs<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">共享。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验要求</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">两台</SPAN>RH9.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的机器。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">：</SPAN>192.168.0.1</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>2, IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">：</SPAN>192.168.0.2</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验步骤</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">关掉两台机的</SPAN>iptables</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service iptables stop</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># chkconfig<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>iptables off</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，安装下列包</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>nfs-utils</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>portmap</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">缺什么，装什么。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">两台机上，创建一个用户共享他的</SPAN>home<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">目录。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># useradd<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-u<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>1500<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nfsuser</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># passwd<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nfsuser </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">设密码：</SPAN>nfsuser</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN>nfsuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>UID<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">相同，当然不一定用</SPAN>1500</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>4.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">编辑</SPAN>/etc/exports</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="mso-spacerun: yes"><FONT face=宋体>&nbsp; </FONT></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>/home/nfsuser<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>192.168.0.2(rw)</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="mso-spacerun: yes"><FONT face=宋体>&nbsp; </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">和</SPAN>()<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">选项之间，不可以有空格。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>5.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，启动服务</SPAN>.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service portmap <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>restart </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service nfs<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>restart</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service nfslock<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>restart</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># rpcinfo -p</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">程序</SPAN> <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">版本</SPAN> <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">协议</SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">端口</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100000<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>111<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>portmapper</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100000<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>111<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>portmapper</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100024<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32768<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>status</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100024<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32768<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>status</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN>391002<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32769<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>sgi_fam</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100011<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>668<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>rquotad</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100011<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>668<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>rquotad</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100011<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>671<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>rquotad</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100011<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>671<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>rquotad</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100003<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>2049<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nfs</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100003<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>3<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>2049<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nfs</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100021<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32793<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nlockmgr</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100021<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>3<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32793<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nlockmgr</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100021<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32793<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>nlockmgr</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32794<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32979<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32794<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32979<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>3<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>udp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32794<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>100005<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>3<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>tcp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>32979<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>mountd</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>6.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">初试化共享目录</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># exportfs<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-v</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># exportfs<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-r</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># showmount<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>-e<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>192.168.0.1 </FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>7.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">如果显示出正确的共享列表的话，在机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上挂载机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>/home/nfsuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># mount -t nfs -o rw 192.168.0.1:/home/nfsuser /mnt/cdrom</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>8.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">在机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，分别用</SPAN>root<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，</SPAN>nfsuser<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">帐户对</SPAN>/mnt/cdrom<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">进行读写操作。出现什么情况？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">你有什么结论？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验总结</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">本文对于</SPAN>exportfs <SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">中的选项只用了</SPAN>rw<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，比较简单。其他选项，可以参考</SPAN>man exports.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">它</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun"><FONT face=宋体>还会提供更多的例子，及其分析。如果想深入了解，必须对它进行研究。</FONT></SPAN></P><img src ="http://www.blogjava.net/nobody_am/aggbug/14048.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:55 <a href="http://www.blogjava.net/nobody_am/articles/14048.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速配置DHCP</title><link>http://www.blogjava.net/nobody_am/articles/14046.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:54:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14046.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14046.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14046.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14046.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14046.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><FONT face=宋体><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN><SPAN style="FONT-SIZE: 20pt; FONT-FAMILY: 'HG Mincho Light J'; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用实验快速配置</SPAN><SPAN style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt">DHCP<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">前言：</SPAN> DHCP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，</SPAN>Dynamic Host Configuration Protocal,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">它方便了计算机网络管理。本文用</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验的方式快速学会配置</SPAN>DHCP</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验目的</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">配置一个</SPAN>DHCP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务器。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">用客户端检验</SPAN>DHCP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务器。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验要求</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">两台</SPAN>RH9.0<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的机器。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">：</SPAN>192.168.0.1</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">是</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">个</SPAN>DNS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务器，网络名：</SPAN>example.com,192.168.0.1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>host<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">叫</SPAN>server1,</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>192.168.0.2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>host<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">叫</SPAN>station2.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验步骤</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>1.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上</SPAN>,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">检查并安装</SPAN>dhcp<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">包。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>2.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上</SPAN>,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">到</SPAN>dhcpd<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的文档复制一分配置例子。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>cp<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>/usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>/etc/dhcpd.conf</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>3.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上</SPAN>,<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">编辑</SPAN>/etc/dhcpd.conf<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">内容如下：</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="mso-spacerun: yes"><FONT face=宋体>&nbsp; </FONT></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>ddns-update-style interim;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>ignore client-updates;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>subnet 192.168.0.0 netmask 255.255.255.0 {</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体># --- default gateway</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option routers<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>192.168.0.1;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option subnet-mask<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>255.255.255.0;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>#<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option nis-domain<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>"domain.org";</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option domain-name<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>"example.com";</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option domain-name-servers<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>192.168.0.1;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option time-offset<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>-18000; # Eastern Standard Time</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>#<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option ntp-servers<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>192.168.1.1;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>#<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option netbios-name-servers<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>192.168.1.1;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体># --- Selects point-to-point node (default is hybrid). Don't change this unless</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体># -- you understand Netbios very well</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>#<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>option netbios-node-type 2;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>range 192.168.0.1 192.168.0.2;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>default-lease-time 21600;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>max-lease-time 43200;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN># we want the nameserver to appear at a fixed address</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>host station2 {</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>hardware ethernet 00:E0:4E:E8:9B:BC;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>fixed-address 192.168.0.2;</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</FONT></P>
<P class=MsoNormal style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt"><FONT face=宋体>}</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">这里假设机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的网卡</SPAN>Mac<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">地址为：</SPAN> 00:E0:4E:E8:9B:BC<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">，你可以用</SPAN>ifconfig<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">查看机</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>Mac<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">地址，作相应修改。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>4.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，用</SPAN>ifconfig<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">观察结果，是否子网卡的广播地址设置正确：如：</SPAN>192.168.0.255<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">若不正确，请修改网络配置。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>5.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>1<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，启动</SPAN>dhcpd<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">服务。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># service dhcpd restart</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="BACKGROUND: red; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">注意：</SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">若不能启动，观察</SPAN>/var/log/message.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>6.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，修改</SPAN>/etc/sysconfig/network-scripts/ifcfg-eth0</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>DEVICE=eth0</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>BOOTPROTO=dhcp</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>ONBOOT=yes</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>7.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，删除</SPAN>/etc/resolv.conf<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的所有内容。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>8.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，初试化网卡。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># ifdown eth0</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># ifup eth1</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>9.<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">上，用</SPAN>ifconfig<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">观察结果，机器</SPAN>2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的</SPAN>ip<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">地址为</SPAN>192.168.0.2<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">吗？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>10.DNS<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">能够解析吗？</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># host <SPAN class=MsoHyperlink><SPAN style="COLOR: navy"><A href="http://server1.example.com/"><FONT color=#000080>server1.example.com</FONT></A></SPAN></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp; </SPAN># host <SPAN class=MsoHyperlink><SPAN style="COLOR: navy"><A href="http://station2.example.com/"><FONT color=#000080>station2.example.com</FONT></A></SPAN></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=宋体>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="COLOR: maroon">[</SPAN><SPAN style="COLOR: maroon; FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">实验结论</SPAN><SPAN style="COLOR: maroon">]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">本文只是简单快速的实现了</SPAN>DHCP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">设置，如果想了解更多内容，请参考</SPAN>DHCP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">的文档</SPAN>/usr/</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=宋体>share/doc/dhcp-*<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">目录。本文的</SPAN>IP<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">地址是根据</SPAN>Mac<SPAN style="FONT-FAMILY: 'HG Mincho Light J'; mso-ascii-font-family: Simsun; mso-hansi-font-family: Simsun">地址定制的。</SPAN></FONT></P><img src ="http://www.blogjava.net/nobody_am/aggbug/14046.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:54 <a href="http://www.blogjava.net/nobody_am/articles/14046.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速学习Samba</title><link>http://www.blogjava.net/nobody_am/articles/14045.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:53:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14045.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14045.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14045.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14045.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14045.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用实验快速学习Samba&nbsp;前言：在windows和linux的混合网络中，samba还是有很大用处的，本文用实验的方法快速学习Samba。[实验项目]①在linux上建立Samba服务器，用类似FTP的客户端smbclient访问。②在linux上建立security=user的Samba服务器，用win2000的客户端访问。③在linux上建立securit...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14045.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14045.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:53 <a href="http://www.blogjava.net/nobody_am/articles/14045.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速掌握DNS配置</title><link>http://www.blogjava.net/nobody_am/articles/14043.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:45:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14043.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14043.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14043.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14043.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14043.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用实验快速掌握DNS配置&nbsp;&nbsp;&nbsp;&nbsp; 由于配置DNS很重要，本文主要以做实验来快速掌握DNS配置.&nbsp;&nbsp;&nbsp; [实验目的]&nbsp;&nbsp;&nbsp; 1.配置一个只可转发请求的DNS.&nbsp;&nbsp;&nbsp; 2.配置一个masterDNS.&nbsp;&nbsp;&nbsp; 3.配置一个...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14043.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14043.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:45 <a href="http://www.blogjava.net/nobody_am/articles/14043.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用实验快速掌握Apache</title><link>http://www.blogjava.net/nobody_am/articles/14042.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Mon, 26 Sep 2005 00:39:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/14042.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/14042.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/14042.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/14042.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/14042.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用实验快速掌握Apache&nbsp;前言：Apache是大多数linux版本的标准web 服务器，掌握他的意义就非常大。本文以实验的方式，让读者快速掌握Apache的基本配置。&nbsp;[实验目的]1.Apache的基本安装和配置。2.Apache中应用CGI。3.基本代理配置。[实验要求]1.两台互通的RH8.0机。2.这两台机已配置过DNS。...&nbsp;&nbsp;<a href='http://www.blogjava.net/nobody_am/articles/14042.html'>阅读全文</a><img src ="http://www.blogjava.net/nobody_am/aggbug/14042.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-09-26 08:39 <a href="http://www.blogjava.net/nobody_am/articles/14042.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我的RHCE证书</title><link>http://www.blogjava.net/nobody_am/articles/7880.html</link><dc:creator>MingIsMe</dc:creator><author>MingIsMe</author><pubDate>Sun, 17 Jul 2005 09:30:00 GMT</pubDate><guid>http://www.blogjava.net/nobody_am/articles/7880.html</guid><wfw:comment>http://www.blogjava.net/nobody_am/comments/7880.html</wfw:comment><comments>http://www.blogjava.net/nobody_am/articles/7880.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/nobody_am/comments/commentRss/7880.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/nobody_am/services/trackbacks/7880.html</trackback:ping><description><![CDATA[<IMG height=745 alt=mingrhce.gif src="http://www.blogjava.net/images/blogjava_net/nobody_am/tmp/mingrhce.gif" width=961 border=0><img src ="http://www.blogjava.net/nobody_am/aggbug/7880.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/nobody_am/" target="_blank">MingIsMe</a> 2005-07-17 17:30 <a href="http://www.blogjava.net/nobody_am/articles/7880.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>