http://pkgs.repoforge.org/apt/
-----------------------------------------------------------
安装APT工具:
# wgethttp://redhat.uni-klu.ac.at/el3/apt.i386.rpm
# rpm -Uvh apt.i386.rpm
其它的主要就 是设置sources.list的问题了。进入/etc/apt/sources.list.d/目录下设置一些源就OK了。
网上找的一些源如下:
#dag.list
rpmhttp://afs.caspur.it/ afs/italia/project/linux/cern/slc302/i386/apt os updates extras
rpmhttp://redhat.uni-klu.ac.at redhat/dag/el3/i386 dag
rpm-srchttp://redhat.uni-klu.ac.at redhat/dag/el3/i386 dag
rpmhttp://apt.sw.be redhat/el3/en/i386 dag
rpm-srchttp://apt.sw.be redhat/el3/en/i386 dag
如果是KDE的一些软件,下面的源比较有用:
#kde.list
rpmhttp://apt.kde-redhat.org apt/fedora/3.0 stable
rpmhttp://apt.kde-redhat.org apt/fedora/all stable
rpmhttp://apt.kde-redhat.org apt/kde-redhat/3.0 stable unstable
rpmhttp://apt.kde-redhat.org apt/kde-redhat/all stable unstable
如果需要更多Java相关软件,则:
#vi /etc/apt/sources.list.d/jpackage.list
rpmhttp://redhat.uni-klu.ac.at redhat/jpackage/redhat-es-3/i386 free devel
rpm-srchttp://redhat.uni-klu.ac.at redhat/jpackage/redhat-es-3/i386 free devel
rpmhttp://redhat.uni-klu.ac.at redhat/jpackage/redhat-es-3/generic free devel
rpm-srchttp://redhat.uni-klu.ac.at redhat/jpackage/redhat-es-3/generic free devel
比较好用的是CERN的linux站点,如下:
rpmhttp://linuxsoft.cern.ch cern/slc30X/i386/apt os updates extras
rpm-srchttp://linuxsoft.cern.ch cern/slc30X/i386/apt os updates extras
rpmhttp://ftp.kddilabs.jp Linux/packages/scientificlinux/30x/i386/apt-rpm os updates
rpm-srchttp://ftp.kddilabs.jp Linux/packages/scientificlinux/30x/i386/apt-rpm os updates
rpmhttp://ftp.ne.jp Linux/distributions/scientificlinux/30x/i386/apt-rpm os updates
rpm-srchttp://ftp.ne.jp Linux/distributions/scientificlinux/30x/i386/apt-rpm os updates
rpmhttp://mirror.switch.ch ftp/mirror/scientificlinux/30x/i386/apt-rpm os updates
rpm-srchttp://mirror.switch.ch ftp/mirror/scientificlinux/30x/i386/apt-rpm os updates
rpm ftp://linux.fnal.gov /linux/scientific/30x/i386/apt-rpm os updates
rpm-src ftp://linux.fnal.gov /linux/scientific/30x/i386/apt-rpm os updates
保存退出后
#apt-get update
#apt-get upgrade
#apt-get check //检查依赖性
#apt-get -f install // 解决依赖性问题
然后apt-get install XXX 就可以安装需要的软件包啦。
如果要安装某工具,比如说iftop,可以这样:
#apt-cache search iftop
#apt-get install iftop
apt自动解决依赖性问题,方便得很。
----------------------------------------------------------------------------------------------------
apt-rpm的套件可以在这找你OS和Arch的版本
http://packages.sw.be/apt/
以CentOS 5,i386的版本为例
wget http://packages.sw.be/apt/apt-0.5.15lorg3.94a-4.el5.rf.i386.rpm
安装套件
rpm -Uvh apt-0.5.15lorg3.94a-4.el5.rf.i386.rpm
然后去改一下 sources.list
cp /etc/apt/sources.list.d/os.list /etc/apt/sources.list
vi /etc/apt/sources.list
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/os/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/updates/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/extras/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/addons/$(ARCH)
repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/centosplus/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/os/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/updates/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/extras/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/addons/$(ARCH)
repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/centosplus/$(ARCH)
安装一下 GPG keys
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* ---安装证书
apt-get update
apt-get upgrade
第一次跑可能需要先这样一下
apt-get –fix-broken install
完成!
apt是Debian系列的Linux发行版所采用的软件包管理工具,可能因为我接触的第一个管理器就是apt-get,所以我对他一直情有独钟,就算后来把系统换成了Fedora也一直想用apt来替代系统自带的yum。在RHEL和Fedora6下我曾经尝试过这样作,但是结果并不理想。现在好了,Fedora 8的官方源里面已经加入了apt,现在可以随心所欲的使用这个强大的工具了。
1.apt的安装
apt的安装需要以下软件包:
apt-devel-0.5.15lorg3.93-2.fc8
apt-0.5.15lorg3.93-2.fc8
fedora-package-config-apt-8-1
但是在实际安装的时候,如果已经设置好了yum的源,可以直接输入:
yum install apt
这样就可以了,很简单。
2.apt的使用
很喜欢使用apt-get时候系统的那句提示:This APT has Super Cow Powers(本apt具有超级牛力!),很有意思。
主要命令如下:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.rpm)
remove - Remove packages
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
目录[隐藏]
|
到 Fedora Extras 下载 APT 的 RPM 套件包。
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/apt-0.5.15lorg3.94-4.fc10.i386.rpm wget http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/fedora-package-config-smart-9.89-14.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/Packages/apt-0.5.15lorg3.94-3.fc9.i386.rpm wget http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/Packages/fedora-package-config-apt-8.92-1.noarch.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Everything/i386/os/Packages/apt-0.5.15lorg3.93-2.fc8.i386.rpm wget http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Everything/i386/os/Packages/fedora-package-config-apt-7.89-8.noarch.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/Fedora/apt-0.5.15lorg3.2-9.fc7.i386.rpm wget http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/Fedora/fedora-package-config-apt-6.89-6.noarch.rpm
wget http://fedoraproject.org/extras/6/i386/apt-0.5.15lorg3.2-9.fc6.i386.rpm wget http://fedoraproject.org/extras/6/i386/fedora-package-config-apt-6-5.noarch.rpm
wget http://fedoraproject.org/extras/5/i386/apt-0.5.15lorg3.2-9.fc5.i386.rpm
wget http://fedoraproject.org/extras/4/i386/apt-0.5.15lorg3.2-9.fc4.i386.rpm
wget http://fedoraproject.org/extras/3/i386/apt-0.5.15cnc7-1.i386.rpm
安装下载了的apt rpm套件包:
su -c 'rpm -Uvh apt-X.X.XX-X.i386.rpm'
使用「apt-get mirror-select
」转换下载服务器:
# apt-get mirror-select Fetching list of repositories/mirrors... Choose the repositories you want to use from the list below: 1 Fedora Core 2 Fedora Extras 3 Macromedia When finished choose 'c' to continue or choose 'q' to quit repository selector without changing anything. Enter your selection(s) in a comma-separated list: 1 <--输入 '1','2' 或 '3' 选择上述的分类。 Choose the repositories you want to use from the list below: 1 (x) Fedora Core 2 Fedora Extras 3 Macromedia When finished choose 'c' to continue or choose 'q' to quit repository selector without changing anything. Enter your selection(s) in a comma-separated list: c <--输入 'c' 进入下一选项。 Choose the geographically nearest mirror(s)for use with: Fedora Core 1 University of Southern California, USA 2 Kernel.org, San Francisco California, USA 3 University Aachen, Germany 4 Technical University Chemnitz, Germany 5 University of Applied Sciences Esslingen, Germany 6 Multikabel N.V. Alkmaar, The Netherlands 7 SdV Plurim蒙dia, Strasbourg, France 8 SunSite RedIRIS, Madrid, Spain 9 University of Hawaii Honolulu, Hawaii, USA When finished choose 'c' to continue or choose 'q' to quit repository selector without changing anything. Enter your selection(s) in a comma-separated list: 2 <--输入 '1' 至 '9' 选择上述的分类。 Choose the geographically nearest mirror(s)for use with: Fedora Core 1 University of Southern California, USA 2 (x) Kernel.org, San Francisco California, USA 3 University Aachen, Germany 4 Technical University Chemnitz, Germany 5 University of Applied Sciences Esslingen, Germany 6 Multikabel N.V. Alkmaar, The Netherlands 7 SdV Plurim dia, Strasbourg, France 8 SunSite RedIRIS, Madrid, Spain 9 University of Hawaii Honolulu, Hawaii, USA When finished choose 'c' to continue or choose 'q' to quit repository selector without changing anything. Enter your selection(s) in a comma-separated list: c <--输入 'c' 进入下一选项。 Writing source list entries... Done.
下载服务器资料会纪录在 /etc/apt/sources.list.d/mirror-select.list 如下
# DO NOT EDIT ME! Use "apt-get mirror-select" instead. # Fedora Core (Kernel.org, San Francisco California, USA) rpm http://mirrors.kernel.org/fedora.us/fedora fedora/6/i386 os updates
您亦可以直接修改档案 /etc/apt/sources.list 改变下载服务器。
File :add-apt-repository