 |
教程: Linux教程-系统管理-为redhat增加apt软件包管理工具 |
 |
|
|
| 教程: Linux教程-系统管理-为redhat增加apt软件包管理工具 |
|
|
|
|
一、 简介
redhat采用了RPM软件包管理系统,RPM软件包管理系统具有强大的编译安装功能,但是由于历史原因,RPM软件包管理系统对软件之间的依存关系没有内部定义,造成安装RPM软件时经常出现令人无法理解的软件依赖问题。
debian系统则基于apt(Advanced Packaging Tool)工具进行软件包管理,可以自动解决并安装倚赖软件包,因此debian linux被认为是最容易管理和升级的系统,apt工具也被认为是目前最好的软件包管理工具之一。为了解决redhat包管理系统的致命问题,Conectiva Linux将apt系统移植到了使用rpm软件包管理系统的Linux系统下,使得基于RPM软件包的系统可以利用apt工具提供的自动解决倚赖关系的能力。目前已经有很多为redhat linux提供apt方式升级管理软件包的站点,如http://freshrpms.net , http://apt.unl.edu等等,使得redhat也成为可以利用apt工具的发行版之一,本文介绍如何在redhat linux系统安装和使用apt软件包管理工具。
为了对apt工具的特性有一个大致的了解,下面先介绍几个使用apt with rpm管理系统的实例:
(1)删除一个软件包时自动删除相关软件包:
[root@linux root]# apt-get remove nessus-common
Processing File Dependencies... Done
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
nessus-client nessus-common nessus-server
0 packages upgraded, 0 newly installed, 3 to remove(replace) and 0 not upgraded.Need to get 0B of archives. After unpacking 4863kB will be freed.
Do you want to continue? [Y/n]
Executing RPM (-e)...
warning: /etc/nessus/nessusd.conf saved as /etc/nessus/nessusd.conf.rpmsave
[root@linux root]#
(2)自动下载安装依赖包:
[root@linux root]# apt-get install nessus-server
Processing File Dependencies... Done
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
nessus-common nmap
The following NEW packages will be installed:
nessus-common nessus-server nmap
0 packages upgraded, 3 newly installed, 0 to remove(replace) and 0 not upgraded.Need to get 1239kB of archives. After unpacking 4889kB will be used.
Do you want to continue? [Y/n]
Get:1 http://apt.freshrpms.net freshrpms/7.2/freshrpms nessus-common 1:1.1.12-fr1 [101kB]
Get:2 http://apt.freshrpms.net freshrpms/7.2/freshrpms nessus-server 1:1.1.12-fr1 [895kB]
Get:3 http://apt.freshrpms.net redhat/i386/7.2/os nmap 2.54BETA22-3 [243kB]
Fetched 1239kB in 54s (22.8kB/s)
Executing RPM (-U)...
Preparing... ########################################### [100%]
1:nessus-common ########################################### [ 33%]
2:nmap ########################################### [ 66%]
3:nessus-server ########################################### [100%]
[root@linux root]#
(3)维护系统软件,自动更新系统 :
[root@linux root]# apt-get upgrade
Processing File Dependencies... Done
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded
at libxml2 libxml2-devel openldap openldap-clients openldap-devel rsync
7 packages upgraded, 0 newly installed, 0 to remove(replace) and 0 not upgraded.Need to get 2132kB of archives. After unpacking 560kB will be freed.
Do you want to continue? [Y/n]
Get:1 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os at 3.1.8-23 [42.6kB]
Get:2 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os libxml2 2.4.10-0.7x.2 [360kB]
Get:3 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os libxml2-devel 2.4.10-0.7x.2 [617kB]
Get:4 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os openldap 2.0.21-1 [424kB]
Get:5 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os openldap-clients 2.0.21-1 [114kB]
Get:6 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os openldap-devel 2.0.21-1 [462kB]
Get:7 http://apt-rpm.tuxfamily.org redhat-updates-7.2/redhat/os rsync 2.4.6-8 [112kB]
Fetched 2132kB in 3m8s (11.3kB/s)
Executing RPM (-U)...
Preparing... ########################################### [100%]
1:libxml2 ########################################### [ 14%]
2:rsync ########################################### [ 28%]
3:openldap ########################################### [ 42%]
4:openldap-clients ########################################### [ 57%]
5:openldap-devel ########################################### [ 71%]
6:at ########################################### [ 85%]
7:libxml2-devel ########################################### [100%]
[root@linux root]#
二、安装apt with rpm及其图形界面前端Synaptic
下面简单介绍一下如何下载和安装apt with rpm
apt with rpm可以直接到 [url]http://freshrpms.net[/url] 下载安装,目前该站点提供了redhat 6.2, 7.x和8.0的软件升级服务,下面是
[1] [2] [3] 下一页
|
|
| 教程录入:admin 责任编辑:admin |
|
|
上一篇教程: 教程: Linux教程-系统管理-为Linux系统设置备份
下一篇教程: 教程: Linux教程-系统管理-xinetd 使用指南 |
|
|
|
|
|
|
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
|
|
|
|