⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5.htm

📁 debian参考手册,pdf格式的版本。
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0064)http://qref.sourceforge.net/Debian/reference/ch-woody.zh-cn.html -->
<HTML><HEAD><TITLE>Debian 参考手册 - 发行版升级</TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.118" name=GENERATOR></HEAD>
<BODY><A name=ch-woody></A>
<HR>
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tutorial.zh-cn.html">上一页</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/reference.zh-cn.html#contents">目录</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-preface.zh-cn.html">1</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-system.zh-cn.html">2</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-install.zh-cn.html">3</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tutorial.zh-cn.html">4</A> 
] [ 5 ] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html">6</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-kernel.zh-cn.html">7</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tips.zh-cn.html">8</A> ] [ 
<A href="http://qref.sourceforge.net/Debian/reference/ch-tune.zh-cn.html">9</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-gateway.zh-cn.html">10</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-edit.zh-cn.html">11</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-vcs.zh-cn.html">12</A> ] [ 
<A 
href="http://qref.sourceforge.net/Debian/reference/ch-program.zh-cn.html">13</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-gnupg.zh-cn.html">14</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-support.zh-cn.html">15</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ap-appendix.zh-cn.html">A</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html">下一页</A> 
] 
<HR>

<H1>Debian 参考手册 <BR>第 5 章 - 发行版升级 </H1>
<HR>

<P>升级的官方发布通知位于 <CODE><A 
href="http://www.debian.org/releases/stable/releasenotes">http://www.debian.org/releases/stable/releasenotes</A></CODE> 
和 <CODE><A 
href="http://www.debian.org/releases/testing/releasenotes">http://www.debian.org/releases/testing/releasenotes</A></CODE>(不断更新中)。 

<P>将系统升级到<SAMP>testing/unstable</SAMP>的过程如下: 
<UL>
  <LI>如果使用的系统是Potato请将APT版本升级到Woody,因为Potato版中的APT不具备Woody版中<CODE>apt_preferences(5)</CODE>所描述的某些特性。 
  </LI></UL>
<UL>
  <LI>修改<CODE>/etc/apt/sources.list</CODE>和<CODE>/etc/apt/preferences</CODE>文件,加入所使用的安装服务器上与“testing”相关下载目录,如果有兴趣,亦可加入“unstable”相关下载目录。 
  </LI></UL>
<UL>
  <LI>更新软件包列表,安装可以升级的软件包。 </LI></UL>
<HR>
<A name=s-woody-transition></A>
<H2>5.1 将APT升级到Woody版本</H2>
<P>如果运行的是Potato,可在<CODE>/etc/apt/sources.list</CODE>中加入<SAMP>stable</SAMP>镜像源,然后使用下列步骤将APT系统以及一些核心包在线升级到Woody版本。 
<PRE>     # apt-get update
     # apt-get install libc6 perl libdb2 debconf
     # apt-get install apt apt-utils dselect dpkg
</PRE>
<HR>
<A name=s-testing-transition></A>
<H2>5.2 迁移准备工作(从“stable”到“testing”)</H2>
<P>请注意,升级到<SAMP>testing</SAMP>有一个负面影响,安全补丁更新将会非常缓慢。 
<P>下面的操作可实现通过网络升级到“testing”(亦可执行样例目录中的<CODE><A 
href="http://qref.sourceforge.net/Debian/reference/examples/">go-woody</A></CODE>脚本): 

<P>清空现存的<CODE>sources.list</CODE>文件 <PRE>     # cd /etc/apt
     # cp -f sources.list sources.old 
     # :&gt;sources.list
</PRE>
<P>为“stable”系统生成一张干净的下载目录列表 <PRE>     # cd /
     # apt-setup noprobe 
         ... 通过http或ftp,选择下载目录
</PRE>
<P>在这张新列表文件中添加“testing”版本下载目录,将<SAMP>deb-src</SAMP>行注释掉。 <PRE>     # cd /etc/apt
     # grep -e "^deb " sources.list  &gt;sources.deb
     # grep -e "^deb-" sources.list  &gt;sources.src
     # sed -e "s/stable/testing/"  sources.deb \
          &gt;&gt;sources.list
     # sed -e "s/stable/testing/" sources.src | \
          sed -e "s/^deb-/#deb-/"  &gt;&gt;sources.list
     
     # apt-get update
     # apt-get install apt apt-utils
     # cat &gt;preferences &lt;&lt;EOF
      Package: *
      Pin: release a=testing
      Pin-Priority: 600
      
      Package: *
      Pin: release a=unstable
      Pin-Priority: 50
     
      EOF
</PRE>
<P>或者,添加“unstable”版本下载目录。 <PRE>     # sed -e "s/stable/unstable/" sources.deb \
          &gt;&gt;sources.list
     # sed -e "s/stable/unstable/" sources.src | \
          sed -e "s/^deb-/#deb-/"  &gt;&gt;sources.list
</PRE>
<P>See <A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html#s-apt-install">Debian软件包管理基础, 
第 6.2 节</A> for the art of tuning <CODE>/etc/apt/sources.list</CODE> and 
<CODE>/etc/apt/preferences</CODE>. 
<P>现在就可以下一节所讲的任意一种方法更新和升级系统了。 
<HR>
<A name=s-upgrade-system></A>
<H2>5.3 升级Debian系统</H2>
<P>正确的设置好<CODE>/etc/apt/sources.list</CODE>和<CODE>/etc/apt/preferences</CODE>文件后,系统即可升级到<SAMP>testing</SAMP>了。基础知识可参阅<A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html">Debian软件包管理, 
第 6 章</A>,如果遇到问题可参阅<A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html#s-apt-trouble">APT升级错误及解决方法, 
第 6.3.2 节</A>。 
<HR>
<A name=s5.3.1></A>
<H3>5.3.1 最好使用<CODE>dselect</CODE>升级</H3>
<P>如果系统在许多软件包都包含了<SAMP>-dev</SAMP>等软件包,推荐使用下面的<CODE>dselect</CODE>操作方法进行软件包细操作(fine-grained 
package control)。 <PRE>     # dselect update  # 升级前请先完成这步
     # dselect select  # 选择附加软件包
</PRE>
<P>运行<CODE>dselect</CODE>时当前所有软件包均被选中,<CODE>dselect</CODE>会提示你基于<SAMP>depends</SAMP>,<SAMP>suggests</SAMP>和<SAMP>recommends</SAMP>的附加软件包,如果不想添加任何软件包,只需输入<SAMP>Q</SAMP>退出<CODE>dselect</CODE>。 
<PRE>     # dselect install
</PRE>
<P>在安装过程中,必须回答一些有关软件包配置的问题,准备好你的笔记本花点时间处理它们。参阅<A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html#s-dselect"><CODE>dselect</CODE>, 
第 6.2.3 节</A>。 
<P>使用<CODE>dselect</CODE>。<STRONG>它能干得不赖 :)</STRONG> 
<HR>
<A name=s5.3.2></A>
<H3>5.3.2 最好别用<CODE>apt-get</CODE>升级</H3>
<P><STRONG>下面描述了<CODE>apt-get</CODE>下面描述了apt-get非常广泛的用途,但建议<EM>不要</EM>用它来进行系统升级。</STRONG> 
如果你不想用<CODE>dselect</CODE>对Woody进行升级,请考虑<CODE>aptitude</CODE>或其它工具。 
<P>如果系统中的软件包不多,或Debian包文件没有进行重大修改,下述操作就能胜任(有时是这样)。 <PRE>     # apt-get update # 升级前请先完成这步
      ... 升级系统包括“depends”类软件包: 
     # apt-get upgrade                     # 升级前请先完成这步
      ... 升级整个系统包括“depends”类软件包:
     # apt-get -u dist-upgrade
      ... 或按当前dselect的设置进行升级(new, better):
     # apt-get -u dselect-upgrade         # 使用dselect进行后期处理
</PRE>
<P>使用<CODE>apt-get</CODE>方式升级将无法对<EM>recommends</EM>和<EM>suggests</EM>类软件包进行操控。参阅<A 
href="http://qref.sourceforge.net/Debian/reference/ch-system.zh-cn.html#s-depends">软件包关联性, 
第 2.2.8 节</A>。 
<HR>
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tutorial.zh-cn.html">上一页</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/reference.zh-cn.html#contents">目录</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-preface.zh-cn.html">1</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-system.zh-cn.html">2</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-install.zh-cn.html">3</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tutorial.zh-cn.html">4</A> 
] [ 5 ] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html">6</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-kernel.zh-cn.html">7</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-tips.zh-cn.html">8</A> ] [ 
<A href="http://qref.sourceforge.net/Debian/reference/ch-tune.zh-cn.html">9</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-gateway.zh-cn.html">10</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-edit.zh-cn.html">11</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-vcs.zh-cn.html">12</A> ] [ 
<A 
href="http://qref.sourceforge.net/Debian/reference/ch-program.zh-cn.html">13</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-gnupg.zh-cn.html">14</A> ] 
[ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-support.zh-cn.html">15</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ap-appendix.zh-cn.html">A</A> 
] [ <A 
href="http://qref.sourceforge.net/Debian/reference/ch-package.zh-cn.html">下一页</A> 
] 
<HR>

<P>Debian 参考手册 
<ADDRESS>CVS, 星期三 四月 28 19:36:38 UTC 2004<BR><BR>Osamu Aoki <CODE><A 
href="mailto:osamu@debian.org">osamu@debian.org</A></CODE><BR>Translator: Hao 
"Lyoo" Liu <CODE><A 
href="mailto:iamlyoo@163.net">iamlyoo@163.net</A></CODE><BR><A 
href="http://qref.sourceforge.net/Debian/reference/ap-appendix.zh-cn.html#s-authors">作者, 
第 A.1 节</A><BR><BR></ADDRESS>
<HR>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -