Chinaunix首页 | 论坛 | 博客
  • 博客访问: 516077
  • 博文数量: 184
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 2490
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-09 11:34
文章分类

全部博文(184)

文章存档

2011年(1)

2010年(2)

2009年(12)

2008年(169)

我的朋友

分类: LINUX

2008-06-09 12:24:26

操作系统:rhas4
软件版本:apt-0.5.15lorg3.1-4.el4.rf.i386.rpm rpmforge-release-0.3.4-1.el4.rf.i386.rpm
安装配置APT
 
 [root@localhost ~]#rpm -ivh apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
 [root@localhost ~]#rpm -Uvh rpmforge-release-0.3.4-1.el4.rf.i386.rpm
                      #安装上相应的APT包,U为升级.
 
[root@localhost ~]#apt-get update
                      #从apt源中取回软件包的列表
 
[root@localhost ~]#apt-get install XX.rpm
                      #安装软件包,当有依赖关系时会提示你是否安装,Y既可
至此,安装rpm就可以不用手动查找依赖关系,直接装既可
 
详细设置:
.安装、升级、移除软件包的用法

  a)软件包的安装;

  [root@localhost beinan]# apt-get install 软件包名称

  注:不要加版本号,软件名就好;

  比如我们想安装或者升级firefox ,就可以直接用 apt-get install firefox ;

  b)移除软件包;

  [root@localhost beinan]# apt-get remove 软件包名

  举例:

  [root@localhost beinan]# apt-get remove firefox

  c)对系统全面升级;

  [root@localhost beinan]# apt-get upgrade

  [root@localhost beinan]# apt-get dist-upgrade

  这两个功能差不多;

  d)常用的参数选项;

  [root@localhost beinan]# apt-get install -y 软件包名

  比如:

  [root@localhost beinan]# apt-get install -y gaim

  注:如果意外中断的包下载和安装,可以用-y参数来继续下载安装,如上面gaim我下载到10%,可以用上面的命令接着来下载安装或者升级;

  [root@localhost beinan]# apt-get install -d 软件包名

  比如:

  [root@localhost beinan]# apt-get install -d

  注:只是下载软件包,不解包,也不安装,下载到本地机的目录为 /var/cache/apt/archives

  3]清理apt-get 后下载下来的包和未完成的包;

  [root@localhost beinan]# apt-get clean

  通过apt-get下载下来的包存放在 /var/cache/apt/archives目录中;有时我们中断一些正在apt-get 的包,这样的包没有完全下载下来;我们也可以清理掉;也可以用继续接着下载安装,也可以清理掉;

  这样apt-get clean 就会删除 已经下载完成的位于/var/cache/apt/archives目录的所有包;也会清理掉下载未完成的包位于/var/cache/apt/archives/partial/

  这个功能还是比较有用的,因为apt-get 下载和安装量极大,要定期清理。

 
 
[root@localhost ~]#/etc/apt/sources.list.d/rpmforge.list 此文件为服务器地址列表,可手动更改.
阅读(801) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~