重识yum(updating)
2015-10-29 15:07
204 查看
定义
Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。operations
yum can perform operations such as:installing packages
deleting packages
updating existing installed packages
listing available packages
listing installed packages
与rpm之前关系(主要看rpm的定义)
RPM Package Manager (RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system.[5] The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for Linux distributions;Features of RPM include:
RPM packages can be cryptographically verified with GPG and MD5 Original source archive(s) (e.g. .tar.gz, .tar.bz2) are included in SRPMs, making verification easierPatchRPMs and DeltaRPMs, the RPM equivalent of a patch file, can incrementally update RPM-installed software
Automatic build-time dependency evaluation.
Repositories
RPMs are often collected centrally in one or more repositories on the internet. A site often has its own RPM repositories which may either act as local mirrors of such internet repositories or be locally maintained collections of useful RPMs.RPM默认安装路径
path | function |
---|---|
/etc | 一些设置文件放置的目录如/etc/crontab |
/usr/bin | 一些可执行文件 |
/usr/lib ¦ /usr/lib64 | 一些程序使用的动态函数库 |
/usr/share/doc | 一些基本的软件使用手册与帮助文档 |
/usr/share/man | 一些man ¦ page文件 |
Common Operations
rpm -ql jdk #查看安装jdk的所有路径
rpm -qc jdk #查看安装jdk的配置文件路径
创建本地yum源
检查本机是否有web服务器,如没有则安装(yum install httpd)安装yum自带工具:yum install yum-utils createrepo
在/var/www/html/下,执行reposync -r cloudera-cdh5,进行同步下载到本地
cloudera-cdh5为/etc/yum.repos/xx的一个yum源id
通过http://ip:port/项目名 来访问本地yum源
在其它服务器上修改/etc/yum.repos.d/xxx.repo文件中的baseurl换成本地地址
createrepo cloudera-cdh5
cloudera-cdh5是reposync同步后在/var/www/html下生成的文件夹
yum源
中科大的yum源地址:http://centos.ustc.edu.cn/这里下载的.repo文件中要把$releasever和$basearch 自己手动替换成相应的版本
网易的yum源地址:http://mirrors.163.com/
搜狐的yum源地址:http://mirrors.sohu.com/
http://mirror.centos.org/centos/
注意事项
yum install 错误:Package *.rpm is not signed解决方案是:更改 /etc/yum.conf 下的 gpgcheck=1 为 gpgcheck=0
关于 yum.conf 的详细可参考 man yum.conf。其中对 gpgcheck 的描述是:
gpgcheck Either ‘1’ or ‘0’. This tells yum whether or not it should perform a GPG signature check on pack- ages. When this is set in the [main] section it sets the default for all repositories. This option also determines whether or not an install of a package from a local RPM file will be GPG signature checked. The default is ‘0’.
相关文章推荐
- Linux socket 初步
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝
- vivi下重新调整分区