您的位置:首页 > 运维架构 > Linux

centos 安装 apt-get

2015-11-13 11:23 441 查看
1,http://packages.sw.be/apt/   这里找到系统对应的rpm

2,wget 到系统,rpm -ivh apt-0.5.15lorg3.94a-5.el5.rf.x86_64.rpm

3,修改 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)

4,安装证书

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*  

5,更新源信息

apt-get update

apt-get upgrade

6,apt-get –fix-broken install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos linux apt-get rpm