📄 0220upgrade.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>
<html lang="zh-TW">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
<meta name="Author" content="VBird, 鸟哥" >
<meta name="Description" content="利用网路来直接进行线上的升级行为!" >
<title>鸟哥的 Linux 私房菜 -- Linux 的网路线上升级</title>
<style type="text/css">
body {
background-color: #D3D3D3;
color: #000000;
background-attachment:fixed ;
}
body,th,td,input,select,textarea,select,checkbox {
font-family: '新细明体', 'Times New Roman', serif;
font-size: 11pt ;
}
a:link {text-decoration: none; color: blue}
a:visited {text-decoration: none; color: blue}
a:active {text-decoration: none; color: blue}
a:hover {text-decoration: underline; color: #ff0000}
table.head1 {width:100%; background-color: #FFCCCC;
border-style:groove;border-width:5px;border-color: #FFCCCC; margin:0;
padding: 5px 5px}
td.head1 {font: 10pt "新细明体", serif; color: #000099; }
td.info1 {font: 11pt "新细明体", serif; color: #000066; text-align:center; width:14%}
td.info2 {font: 11pt "新细明体", serif; color: #000066; text-align:center; width:12%}
*.info21 {font: 11pt "新细明体", serif; color: #000066; }
*.info22 {font: 11pt "新细明体", serif; color: blue ; }
*.info23 {font: 11pt "新细明体", serif; color: green ; }
td.info3 {font: 11pt "新细明体", serif; color: #000066; text-align:justify}
*.text_head0 {font-size:18pt; font-family:'标楷体','Times New Roman','Times', serif; }
*.text_head_en {font-size:18pt; font-family:'Times New Roman','Times', serif; }
*.text_h1 {font: 15pt "新细明体", serif; color: #0000BB; font-weight: bold }
*.text_h2 {font: 13pt "新细明体", serif; color: #0000BB; font-weight: bold }
*.text_import1 {font: 11pt "新细明体", serif; color: #000088; font-weight: bold }
*.text_import2 {font: 11pt "新细明体", serif; color: #000088; font-weight: normal}
*.text_vbird {font: 11pt "新细明体", serif; color: #000088; font-weight: normal;
font-style: italic;}
*.text_history {font: 10pt "新细明体", serif; color: #000066; }
*.text_date {font: 10pt "新细明体", serif; color: #3333FF; }
*.block1 {padding: 10px 20px 10px 25px; text-align:left }
*.block2 {padding: 10px 0px 10px 25px; text-align:left }
table.term2 {width: 350px; background-color: #000000;
border-style:groove;border-width:3px;border-color: #FFCCCC; margin:10px 0px;}
table.term {width: 580px; background-color: #000000;
border-style:groove;border-width:3px;border-color: #FFCCCC; margin:10px 0px;}
td.term {font: 10pt "细明体", Fixedsys, serif; color: #FFFFFF; }
*.term_hd {font: 10pt "细明体", Fixedsys, serif; color: #BBBBBB; }
*.term_note {font: 10pt "细明体", Fixedsys, serif; color: #777777; font-weight: normal }
*.term_note_b {font: 10pt "细明体", Fixedsys, serif; color: #FF77FF; font-weight: bolder }
*.term_command {font: 10pt "细明体", Fixedsys, serif; color: yellow ; font-weight: bolder }
*.term_write {font: 10pt "细明体", Fixedsys, serif; color: yellow ; font-weight: normal }
*.term_say {font: 10pt "细明体", Fixedsys, serif; color: #FF6666; font-weight: normal }
</style>
<script language="JaveScript" type="text/javascript" src="/include/java.js"></script>
</head>
<body style="margin:0; padding:0">
<center>
<!-- 这里是关于页首按钮处的按钮程式 -->
<div style="text-align:center">
<span style="font-weight:bolder; color:#3333FF"><span class="text_head0">鸟哥的<span class="text_head_en">
Linux </span>私房菜</span></span><br />
<span style="color:#000080">为取得较佳浏览结果,请爱用 <a href="http://moztw.org" target="_blank">firefox</a>
浏览本网页</span><br />
<a href="http://linux.vbird.org/" target="_blank"
onmouseover="document.head_icon1.src='../images/icon_VBird_on.jpg'"
onfocus="document.head_icon1.src='../images/icon_VBird_on.jpg'"
onmouseout="document.head_icon1.src='../images/icon_VBird_off.jpg'">
<img alt="前往鸟哥的 Linux 私房菜馆首页" title="前往鸟哥的 Linux 私房菜馆首页" name="head_icon1"
src="../images/icon_VBird_off.jpg" border="0" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_basic"
onmouseover="document.head_icon2.src='../images/icon_basic_on.jpg'"
onfocus="document.head_icon2.src='../images/icon_basic_on.jpg'"
onmouseout="document.head_icon2.src='../images/icon_basic_off.jpg'">
<img src="../images/icon_basic_off.jpg" border="0"
alt="前往 Linux 基础文件,新手请从头学起"
title="前往 Linux 基础文件,新手请从头学起" name="head_icon2" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_server"
onmouseover="document.head_icon3.src='../images/icon_server_on.jpg'"
onfocus="document.head_icon3.src='../images/icon_server_on.jpg'"
onmouseout="document.head_icon3.src='../images/icon_server_off.jpg'">
<img src="../images/icon_server_off.jpg" border="0"
alt="前往 Linux 架站文件,网路基础那章节请务必参考!"
title="前往 Linux 架站文件,网路基础那章节请务必参考!" name="head_icon3" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_security"
onmouseover="document.head_icon4.src='../images/icon_security_on.jpg'"
onfocus="document.head_icon4.src='../images/icon_security_on.jpg'"
onmouseout="document.head_icon4.src='../images/icon_security_off.jpg'">
<img src="../images/icon_security_off.jpg" border="0"
alt="前往『网路安全』相关文件网页" title="前往『网路安全』相关文件网页" name="head_icon4" /></a>
<a href="http://phorum.vbird.org" target="_blank"
onmouseover="document.head_icon5.src='../images/icon_forum_on.jpg'"
onfocus="document.head_icon5.src='../images/icon_forum_on.jpg'"
onmouseout="document.head_icon5.src='../images/icon_forum_off.jpg'">
<img src="../images/icon_forum_off.jpg" border="0"
alt="前往 Linux 新手讨论区,发问前务必查阅发文规则"
title="前往 Linux 新手讨论区,发问前务必查阅发文规则" name="head_icon5" /></a>
<a target="_blank" href="http://linux.vbird.org/adsl"
onmouseover="document.head_icon6.src='../images/icon_adsl_on.jpg'"
onfocus="document.head_icon6.src='../images/icon_adsl_on.jpg'"
onmouseout="document.head_icon6.src='../images/icon_adsl_off.jpg'">
<img src="../images/icon_adsl_off.jpg" border="0"
alt="前往『ADSL连线分享』相关文件网页" title="前往『ADSL连线分享』相关文件网页" name="head_icon6" /></a>
<a href="http://www.study-area.org" target="_blank"
onmouseover="document.head_icon7.src='../images/icon_study-area.jpg'"
onfocus="document.head_icon7.src='../images/icon_study-area.jpg'"
onmouseout="document.head_icon7.src='../images/icon_study-area.jpg'">
<img src="../images/icon_study-area.jpg" border="0"
alt="前往 Study Area 网站" title="前往 Study Area 网站" name="head_icon7" /></a>
<br />
</div>
<table summary="本文内容的排版" style="width:750px;
background-image:url('../images/VBirdLinux.jpg');
background-attachment:fixed;" border="0" cellspacing="0" cellpadding="0">
<tr><td style="width:16px; height:16px; background-image:url('../images/border-top-left.jpg');
font-size:6px"> </td>
<td style="width:718px; height:16px; font-size:6px;
background-image:url('../images/border-top-center.jpg')"> </td>
<td style="width:16px; height:16px; background-image:url('../images/border-top-right.jpg');
font-size:6px"> </td></tr>
<tr><td style="width:16px; font-size:6px;
background-image:url('../images/border-middle-left.jpg')"> </td>
<td width="718">
<!-- 本文的档头部分 -->
<div style="text-align:center">
<a href="0220upgrade.php">
<span class="text_head0">主机基本安全之二∶<span class="text_head_en"> Linux </span>线上自动升级</span></a><br />
</div>
<div style="text-align:left">
<a href="0220upgrade.php?thisscreen=800x600"><!--切换解析度为 800x600--></a>
</div>
<div style="text-align:right">
<span class="text_history">最近更新日期∶2006/09/10</span>
</div>
<!-- 本文的档头部分 -->
<table class="head1" summary="排版∶文章档头的说明"><tr><td class="head1">
在现在的 Internet 上面,Cracker 实在是太多了!这些 Cracker 会利用已经存在的系统漏洞,来进行侦测、入侵您的主机,
因此,除了未来架设防火墙之外,<b>最重要的 Linux 日常管理工作,莫过于套件的升级了</b>!
不过,经由每日观察网路安全通报所告知的套件漏洞,以及等待各大
distribution 针对这些漏洞来提供 RPM 档案,以使 Client 来升级的过程中,实在是有点缓慢啊!因此,
目前就有很多线上直接更新的机制出现了!有了这些线上直接更新
RPM 的手段与方法,我们系统管理员在管理主机系统上面,可就轻松的多棉!赶紧来看看吧!
</td></tr></table><br />
<!-- 本文的连结区部分 -->
<div class=block1>
<span class="text_h1">
1. <a href="#why_update">为何需要进行软体升级</a><br />
<span class=text_h2>
1.1 <a href="#update_howto">如何进行软体升级</a><br />
1.2 <a href="#update_online">各种 distributions 的自动升级机制</a><br />
</span>
2. <a href="#yum">CentOS 的 yum 自动升级</a><br />
<span class=text_h2>
2.1 <a href="#yum_configure">yum 的设定档</a><br />
2.2 <a href="#yum_com">yum 的安装、升级、移除、查询等功能</a>与<a href="#yum_group">安装套件群组</a><br />
2.3 <a href="#yum_others">不同版本间的升级</a>∶
<a href="#yum_centos">CentOS 4.2 to 4.3</a>,
<a href="#yum_fc">FC1 to CentOS 4.3</a><br />
</span>
3. <a href="#apt">Debian 的 apt 自动升级∶以 B2D 为例</a><br />
<span class=text_h2>
3.1 <a href="#apt_config">APT 的设定档</a><br />
3.2 <a href="#apt_cmd">实际使用 APT</a>∶ <a href="#apt-get">apt-get</a>,
<a href="#apt-cache">apt-cache</a><br />
</span>
4. <a href="#important">重点回顾</a><br />
5. <a href="#FAQ">课后练习</a><br />
6. <a href="#reference">参考资料</a><br />
<span class=text_h2>
7. <a href="http://phorum.vbird.org/viewtopic.php?t=26298"
target="_blank">针对本文的建议∶http://phorum.vbird.org/viewtopic.php?t=26298</a><br />
</span>
</span>
</div>
<!-- 本文的正式部分 -->
<hr /><a NAME="why_update"></a><img src="images/penguin-m.gif" alt="大标题的图示" height="34" width="25" align="middle" /><span class="text_h1">为何需要进行软体升级</span><br />
<div class=block1>
很多朋友在网路上面常常会这样留言∶
『<span class=text_import2>大家好,我的 Linux 好像怪怪的,因为没有办法以 root 的身份登入了</span>』,
呵呵!几乎可以直接告诉这位朋友∶『你的系统被入侵了』!嗄~真假?早上才装好,下午被入侵?
没错啊~但~对方是如何办到的呢?<br /><br />
在前一章我们不是有提到『<span class=text_import2>网路连线的 port 其实是由软体所开启的</span>』,
所以,如果该软体本身就有问题的话,那么当然你的系统就容易被攻破了!
咦!那自由软体干嘛开发出有问题的程式啊?这是因为程式是人写出来的,
在设计之初有些奇怪的用法可能没有考虑到,或者是某些安全问题没有考虑到,
而造成程式的疏失。当这样的程式发布后,很多人会针对这些程式进行检验,如果发现问题就会回报给社群。
那么当回报后直到程式更新之前,总会有一段空窗期,这期间可能就会有些 cracker 开发出具有攻击码的程式,
如果这些攻击程式散布出来的话,那么随便一个小朋友拿到这样的程式,就能攻击你啦!<br /><br />
这个问题并非仅存在于某个单一作业系统,而是所有的作业系统都存在这样的问题,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -