标签:学习笔记
find ./ -maxdepth 1 -name ‘test‘ -ls 注意--maxdepth的位置,放在命令的尾部会有警告[epel]
name=epel
baseurl=htp://172.20.0.1/epel/7/x86_64/
file:///mnt/cdrom #容错
gpgcheck=1 校验完整性
gpgkey=file:///mnt/cdrom/RPM-GPG-... 指定key文件
enabled=0 禁用yum源
yum install httpd 中的d 是只下载的不安装
yum repolist 查看有本地多少仓库,及仓库中的rpm包
yum repolist all 显示所有包括禁用的仓库
yum repolist disabled 显示禁用的仓库
yum clean all 清空缓存 (/var/cache/yum)
yum list 查看所有的仓库中的rpm包 带@符号的均是安装完成的
@anaconda 安装系统时使用anacoda中安装
@base 使用base源安装的
@epel epel安装
sl -a 使用yum 安装 epel中
yum remove sl 卸载程序包
baseurl 可以写多个,可以容错,也可以将多个baseurl放到文件中mirrorlist,并使用mirrorlist=file://root/mirrolist
cost值越小优先级越高
yum install autofs 神奇文件夹
yum start autofs
yum enable autofs
yum-config-manager --add-repo=http://...
glob 通配符,pattern 正则
yum底层使用的依然是rpm,所以rpm如果使用不了,yum也不能使用。
卸载程序不卸载依赖包(默认)
yum history list num
yum history info num
yum history undo num
yum install *.rpm 可以解决依赖关系,而不需要创建yum源
yum grouplist 显示包组
yum -y -q 静默模式 要分开写不能合并,可以在脚本中使用做安装判断
createrepo /data 自定义yum仓库,/data指定包含有rpm包的仓库
搭建yum仓库服务器
支持http https ftp协议格式 yum仓库
httpd.service rpm -ql 中存在httpd.service 服务名就是httpd
添加光驱并扫描识别:
echo ‘- - -‘ >> /sys/class/scsi_host/host2/scan
echo ‘- - -‘ >> /sys/class/scsi_host/host0/scan
搭建yum http: centos6 centos7
yum仓库中可用的变量
$releasever (release version 发布版本)
$arch 平台,i386,i486,i586,x86_64等
$basearch 基础平台
标签:学习笔记
原文地址:http://blog.51cto.com/9980200/2105826