Linux yum源详解
软件包安装方式
0.默认从官网下载包(国内,雅虎,网易,阿里云)
cat /etc/yum.repos.d/rhel-source.repo 【yum文件目录--redhat6版】
【搜狐】http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
【网易】http://mirrors.163.com/.help/CentOS6-Base-163.repo
【阿里】https://mirrors.aliyun.com/help/centos
1.yum : Linux包管理器 ,解决依赖问题,方便快捷
yum install XXX -y
yum groupinstall XXX 包组的列表 -y
yum grouplist 里面选择包组,然后yum groupinstall "包组" -y
yum search 包名
yum search all 查询所有
yum remove tree -y 删除命令(不建议用,因为yum可以解决依赖问题,删除会删除所有包的依赖)
yum update; 安装所有软件到最新版本
2. rpm安装:
rpm -ivh 包名 i==install h==human 人可读
rpm -ivh 包名 安装软件
rpm -qa 包名 查询包名
最大的问题:就是安装包的依赖问题(a->b->c->d)
3.源码安装:
/configure; make; make install 源代码安装方式
在线安装配置yum源
# 查看操作系统版本
cat /etc/redhat-release
# 查看操作系统32/64位
uname -m
# 进入yum文件目录
cd /etc/yum.repos.d
# 备份源文件
cp CentOS-Base.repo CentOS-Base.repo.bak
# 下载网易yum源
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 【网易】
#【可选】下载阿里yum源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 【阿里】
# 更改权限和属组
chmod 644 CentOS6-Base-163.repo
chown root.root CentOS6-Base-163.repo
附[可选]:如果还是用不了yum,可以替换文件内的版本信息为你当前操作系统的版本,一般没问题的
# 替换文件的版本信息
sed -i 's/$releasever/6/g' CentOS6-Base-163.repo
配置yum安装保存安装包
# 更改配置文件
sed -i 's#keepcache=0#keepcache=1#g' /etc/yum.conf
# 进入路径下查看安装包
cd /var/cache/yum/*/6/base/packages/
# 查看更改后的文件信息 grep 'keep' /etc/yum.conf
附网易yum源:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base - .com
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates - .com
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - .com
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - .com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=
enabled=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - .com
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=
enabled=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
附阿里配置文件
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=
enabled=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=
enabled=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
Linux yum源详解的更多相关文章
- 【转发】linux yum命令详解
linux yum命令详解 yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理, ...
- linux yum 命令 详解
linux yum命令详解 yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能 ...
- linux yum+wget详解
在做自动化测试的时候,有个test需要执行命令:wget http://www.aliyun.com,但是返回的结果是未找到命令wget,于是百度了相关资料,发现没有安装wget,于是利用yum in ...
- linux yum命令详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- Linux yum配置文件详解
说明:经过网上抄袭和自己的总结加实验,非常详细,可留作参考. yum的配置一般有两种方式: 一种是直接配置/etc目录下的yum.conf文件, 另外一种是在/etc/yum.repos.d目录下 ...
- linux yum命令详解-转
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- 【转】linux yum命令详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- Linux -Yum 命令详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- <ZZ>linux yum命令详解
http://www.cnblogs.com/chuncn/archive/2010/10/17/1853915.html yum(全称为 Yellow dog Updater, Modified)是 ...
随机推荐
- 关于使用$.ajax调用ashx文件和$.post调用ashx使用中遇到的问题
同样返回 int i = 1; string strJson = "{\"result\":" + i + "}"; context.Res ...
- new~mac os 给终端命令写alias(及其他常用命令)及软连接
配置执行顺序 优先级 配置 说明 1 /etc/profile 系统级别 —— 不推荐修改 2 /etc/paths 系统级别 —— 不推荐修改 3 ~/.profile 用户设置 4 ~/.bash ...
- 检测SQLServer复制订阅进度
--检测复制订阅进度 --SQLSERVER2012 --创建链接服务器ReadServer,WriteServer,它们分别链接发布服务器.订阅服务器 --修改数据库名称 --在分发服务器执行 US ...
- [android] 手机卫士输入框抖动和手机震动
查看apiDemos,找到View/Animation/shake找到对应的动画代码,直接拷贝过来 当导入一个项目的时候,报R文件不存在,很多情况是xml文件出错了 Animation shake = ...
- 36.Linux驱动调试-根据oops定位错误代码行
1.当驱动有误时,比如,访问的内存地址是非法的,便会打印一大串的oops出来 1.1以LED驱动为例 将open()函数里的ioremap()屏蔽掉,直接使用物理地址的GPIOF,如下图所示: 1.2 ...
- Java下载execl表格
Java用POI往execl表格中写数据,并下载下来有两种方式 1.用poil的API创建表格,并设计好表格格式,然后往里面写数据 /** * execl导出 创建表格式,并写入数据 * @param ...
- MySQL,Oracle,PostgreSQL,mongoDB,Hive, SAP HANA 数据库web维护客户端管理工具
TreeDMS数据库管理系统使用JAVA开发,采用稳定通用的springMVC +JDBC架构,实现基于WEB方式对 MySQL,Oracle,PostgreSQL,mongoDB ,Hive, SA ...
- Mysql实现级联操作(级联更新、级联删除)
一.首先创建两张表stu,sc create table stu( sid int UNSIGNED primary key auto_increment, name ) not null) TYPE ...
- 排序算法(9)--Distribution Sorting--分布排序[1]--Counting sort--计数器排序
1.基本思想 假设数序列中小于元素a的个数为n,则直接把a放到第n+1个位置上.当存在几个相同的元素时要做适当的调整,因为不能把所有的元素放到同一个位置上.计数排序假设输入的元素都是0到k之间的整数. ...
- python邮件发送
'''qq邮件与其他邮件有所不同,下以我的qq邮件为例(切勿转载):''' import osimport smtplibfrom email.mime.text import MIMEText # ...