Linux系统软件源的设置
作者:小虎 | 来源:互联网 | 2017-11-11 01:06
Linux系统软件源的设置--Linux通用技术-Linux技术与应用信息,下面是详情阅读。
这四个Linux版本都可以通过设置软件源而在线安装或升级软件。Debian和Ubuntu使用apt,Fedora使用yum而Mandriva使用urpm来执行这些操作。首先得选择合适的软件源。
对于Debian,建议使用ustc的源,修改/etc/apt/source.list文件如下:
deb http://debian.ustc.edu.cn/debian/ testing main non-free contrib
deb http://debian.ustc.edu.cn/debian-security/ testing/updates main non-free contrib
deb http://debian.ustc.edu.cn/debian-uo/ sid marillat ustc java misc
#deb http://ftp3.tsinghua.edu.cn/mirror/debian/debian testing main non-free contrib
#deb http://ftp3.tsinghua.edu.cn/mirror/debian/debian-security testing/updates main non-free contrib
#deb http://ftp3.tsinghua.edu.cn/mirror/debian/debian-unofficial sid marillat ustc java misc
Debian的安装程序开始只安装了基本的软件包,要安装基本的Gnome系统,可以在命令行下输入:
apt-get install x-window-system-core gnome-core gdm xscreensaver
对于Ubuntu,建议使用Ubuntu中文站的源,修改/etc/apt/source.list文件如下:
deb http://archive.ubuntu.org.cn/ubuntu dapper main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-updates main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu dapper-backports main universe multiverse restricted
deb http://archive.ubuntu.org.cn/ubuntu-cn dapper main universe multiverse restricted
deb http://archive.ubuntu.org.cn/ubuntu-cn breezy main universe multiverse restricted
对于Fedora,首先修改yum的软件源,使用速度比较快的国内镜像。按照以下修改/etc/yum.repos.d目录的下面fedora-core.repo,fedora-extras.repo和fedora-updates.repo这几个文件:
#/etc/yum.repos.d/fedora-core.repo
[core]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#baseurl=http://mirrors.geekbone.org/fedora/core/$releasever/$basearch/os/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
#/etc/yum.repos.d/fedora-extras.repo
[extras]
name=Fedora Extras $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#baseurl=http://mirrors.geekbone.org/fedora/extras/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$releasever
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
#/etc/yum.repos.d/fedora-updates.repo
[updates]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch
#baseurl=http://mirrors.geekbone.org/fedora/core/updates/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
然后建议加上freshrpms这个软件源(这个源包括了mp3插件,Mplayer,BmpX,aMule,unrar等等)。 首先以root用户运行如下命令导入密钥:
rpm --import http://freshrpms.net/RPM-GPG-KEY-freshrpms
然后在/etc/yum.repos.d目录里新建一个freshrpms.repo文件,内容如下:
[freshrpms]
name=Fedora Core $releasever - $basearch - Freshrpms
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/ayo.freshrpms.net/pub/freshrpms/ayo/fedora/linux/$releasever/$basearch/freshrpms/
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
#mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
最后建议加上livna这个软件源(这个源包括了MP3插件,Mplayer,Totem-xine,NTFS插件等等)。首先以root用户运行如下命令导入密钥:
rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
然后在/etc/yum.repos.d目录里新建一个livna.repo文件,内容如下:
[livna]
name=Livna for Fedora Core $releasever - $basearch - Base
baseurl=
ftp://ftp3.tsinghua.edu.cn/mirror/livna/fedora/$releasever/$basearch/
http://rpm.livna.org/fedora/$releasever/$basearch/
http://livna.cat.pdx.edu/fedora/$releasever/$basearch/
http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/$releasever/$basearch/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/$releasever/$basearch/
failovermethod=priority
#mirrorlist=http://rpm.livna.org/mirrorlist-5
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-LIVNA-GPG-KEY
对于Mandriva,建议使用Mandriva国内镜像的源,在控制台中输入如下命令行:
> /etc/urpmi/urpmi.cfg
rm -rf /var/lib/urpmi/*
urpmi.addmedia --distrib ftp://202.38.75.11/FreeOS/MandrivaLinux/official/2006.0/i586/
urpmi.addmedia updates ftp://202.38.75.11/FreeOS/MandrivaLinux/official/updates/2006.0/main_updates/
urpmi.addmedia plf-free ftp://cooker@mirror.mandrakelinux.cn/plf/free/2006.0/
urpmi.addmedia plf-non-free ftp://cooker@mirror.mandrakelinux.cn/plf/non-free/2006.0/
推荐阅读
在Docker中,将主机目录挂载到容器中作为volume使用时,常常会遇到文件权限问题。这是因为容器内外的UID不同所导致的。本文介绍了解决这个问题的方法,包括使用gosu和suexec工具以及在Dockerfile中配置volume的权限。通过这些方法,可以避免在使用Docker时出现无写权限的情况。 ...
[详细]
蜡笔小新 2023-12-14 18:48:02
nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ...
[详细]
蜡笔小新 2023-12-13 13:30:30
本文详细介绍了在imx6ull开发板上驱动MT7601U无线网卡的方法和步骤。首先介绍了开发环境和硬件平台,然后说明了MT7601U驱动已经集成在linux内核的linux-4.x.x/drivers/net/wireless/mediatek/mt7601u文件中。接着介绍了移植mt7601u驱动的过程,包括编译内核和配置设备驱动。最后,列举了关键词和相关信息供读者参考。 ...
[详细]
蜡笔小新 2023-12-13 12:34:44
本文介绍了在Ubuntu系统中清理残余配置文件和无用内容的方法,包括清理残余配置文件、清理下载缓存包、清理不再需要的包、清理无用的语言文件和清理无用的翻译内容。通过这些清理操作可以节省硬盘空间,提高系统的运行效率。 ...
[详细]
蜡笔小新 2023-12-09 10:04:56
systemd-nspawn可以创建最轻量级的容器(ns的意思就是namespace),本文的实验平台是Ubuntu16.04,x86_64机器。本文的目的是:在Ubuntu中用syst ...
[详细]
蜡笔小新 2023-10-17 14:49:15
CentOS Stream是一个持续交付的Linux发行版,它在RHEL之前处于领先地位。它将具有滚动发布,即不断进行更改。CentOS将成为一个上游版本,它将具有测试补丁和更新。 ...
[详细]
蜡笔小新 2023-10-17 14:13:56
一般来说获取系统root权限是很困难的,尤其是加密系统中,但西班牙安全研究员hectormarco、ismaelripoll发现,linux系统下只需按住回车键70秒钟,就能轻 ...
[详细]
蜡笔小新 2023-10-17 11:41:36
系统安装Debian系统的安装方式和Ubuntu系统的安装方式几乎是一样的,毕竟Ubuntu系统是基于Debian的,就如同CentOS基于Redhat ...
[详细]
蜡笔小新 2023-10-16 17:32:55
腾讯云服务器系统版本怎么看?想要知道自己的腾讯云服务器系统版本是哪个,可以登录云服务器后台管理系统查看,或者使用命令行查询,如果不会操作& ...
[详细]
蜡笔小新 2023-10-16 13:44:39
主流操作系统简介子墨居士操作系统理论定义为管理计算机硬件资源,控制其他程序运行并为用户提供交互操作界面的系统软件的集合。操作系统是计算机系统的关键组成部分 ...
[详细]
蜡笔小新 2023-10-14 13:01:23
下载地址http:www.kbengine.org这货不错安装在Linux上安装(CentosDebianUbuntuetc.)服务端,请在终端输入:pythonkbenginek ...
[详细]
蜡笔小新 2023-10-14 08:28:43
不久之前我看到了RedMonk的StephenOGrady发了一个关于开源协议的有趣的推特,那个推特里面有这张图。RedmonkBlackDuckLicensing ...
[详细]
蜡笔小新 2023-10-13 12:47:26
本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ...
[详细]
蜡笔小新 2023-12-12 10:10:14
RT之前做了一次灵越7590黑苹果炒作业的文章,希望能够分享给更多不想折腾的人。kawauso:教你如何给灵越7590黑苹果抄作业zhuanlan.z ...
[详细]
蜡笔小新 2023-12-10 19:11:07
Linux服务器我们天天打交道,特别是Linux工程师更是如此。为了保证服务器的安全与性能,我们经常需要监控服务器的一些状态,以保证工作能顺利开展。本文介绍的几个命令,不仅仅适用于 ...
[详细]
蜡笔小新 2023-10-15 13:46:12
小虎
每一天,不管用什么方式,我都要变得越来越好!