<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>简单生活@NET &#187; apt</title>
	<atom:link href="http://lee.kometo.com/archives/tag/apt/feed" rel="self" type="application/rss+xml" />
	<link>http://lee.kometo.com</link>
	<description>正确的判断来自经验，但经验往往来自错误的判断</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:26:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Linux入门-软件管理篇(APT)</title>
		<link>http://lee.kometo.com/archives/195</link>
		<comments>http://lee.kometo.com/archives/195#comments</comments>
		<pubDate>Wed, 29 Oct 2008 17:41:20 +0000</pubDate>
		<dc:creator>Emeric lee</dc:creator>
				<category><![CDATA[IT前沿]]></category>
		<category><![CDATA[WEB应用开发]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sources]]></category>
		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://lee.kometo.com/?p=195</guid>
		<description><![CDATA[APT 软件安装管理系统,Debian下的系统软件安装管理工作 除非你确实知道你在什么，请一直保持使用APT相关工具来管理软件，而不要使用其它工具或方式。 准备工作 使用APT安装更新系统前，首先 确保网络或其它来源（光盘等）可用 如果使用网络镜像，请手动或自动选择最快的网络镜像来源 #自动方式 #参见下面的apt-spy &#160; #手动方式 vim /etc/apt/sources.list 基本命令 apt-get 安装，获取一个软件包 apt-get install xxxx #安装XXX &#160; apt-get update #更新软件列表 apt-get upgrade #安装所有可用更新 #上面这两步可以经常做，来保持系统的最新版本 apt-spy 一个测试工具，用来自动查找速度最快的更新服务器，它会自动改写/etc/apt/sources.list 默认系统一般没安装，先用 apt-get install apt-spy 安装上 apt-get install apt-spy #安装apt-spy mv /etc/apt/sources.list /etc/apt/sources.list.bak #备份来源列表文件 apt-spy update #更新镜像目录 apt-spy -d stable -a Asia -t 10 #测试目录，并生成sources.list aptitude [...]]]></description>
			<content:encoded><![CDATA[<p><strong>APT 软件安装管理系统,Debian下的系统软件安装管理工作</strong></p>
<p>除非你确实知道你在什么，请一直保持使用APT相关工具来管理软件，而不要使用其它工具或方式。</p>
<p><strong>准备工作</strong></p>
<p>使用APT安装更新系统前，首先</p>
<ul>
<li>确保网络或其它来源（光盘等）可用</li>
<li>如果使用网络镜像，请手动或自动选择最快的网络镜像来源

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#自动方式</span>
<span style="color: #666666; font-style: italic;">#参见下面的apt-spy</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#手动方式</span>
<span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></div></div>

</li>
</ul>
<ul>
</ul>
<p><span id="more-195"></span></p>
<p><strong>基本命令</strong></p>
<ul>
<li>apt-get <br />
 安装，获取一个软件包</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xxxx   <span style="color: #666666; font-style: italic;">#安装XXX</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> update         <span style="color: #666666; font-style: italic;">#更新软件列表</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade        <span style="color: #666666; font-style: italic;">#安装所有可用更新</span>
<span style="color: #666666; font-style: italic;">#上面这两步可以经常做，来保持系统的最新版本</span></pre></div></div>

<p><strong><br />
</strong> </li>
<li>apt-spy<br />
 一个测试工具，用来自动查找速度最快的更新服务器，它会自动改写<strong>/etc/apt/sources.list </strong><br />
 默认系统一般没安装，先用<strong> apt-get install apt-spy </strong>安装上</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apt-spy <span style="color: #666666; font-style: italic;">#安装apt-spy</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list.bak <span style="color: #666666; font-style: italic;">#备份来源列表文件</span>
apt-spy update <span style="color: #666666; font-style: italic;">#更新镜像目录</span>
apt-spy <span style="color: #660033;">-d</span> stable <span style="color: #660033;">-a</span> Asia <span style="color: #660033;">-t</span> <span style="color: #000000;">10</span> <span style="color: #666666; font-style: italic;">#测试目录，并生成sources.list</span></pre></div></div>

</li>
<li>aptitude<br />
 一个半图像化的APT工具，可以代替apt-get</li>
</ul>
<p><br class="spacer_" /></p>
<p><strong>sources.list </strong></p>
<p>/etc/sources.list 这个文件保存着安装镜像的来源信息，下面是一个示例</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># sources.list generated by apt-spy v3.1</span>
deb http:<span style="color: #000000; font-weight: bold;">//</span>www.anheng.com.cn<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> etch main contrib non-free
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>www.anheng.com.cn<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span> etch main
<span style="color: #000000; font-weight: bold;">&lt;</span>em<span style="color: #000000; font-weight: bold;">&gt;&lt;</span>em<span style="color: #000000; font-weight: bold;">&gt;</span>deb http:<span style="color: #000000; font-weight: bold;">//</span>security.debian.org<span style="color: #000000; font-weight: bold;">/</span> etch<span style="color: #000000; font-weight: bold;">/</span>updates main contrib non-free<span style="color: #000000; font-weight: bold;">&lt;/</span>em<span style="color: #000000; font-weight: bold;">&gt;&lt;/</span>em<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lee.kometo.com/archives/195/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

