创建配置格式文件的格式 C语言源代码安装三步骤 yum

创建配置文件的格式:

[base]

name= centos cdrom

mirrorlist=file:///root/baselist

gpgkey=file:///mnt/cdrom/rpm-gpg-key-centos-7

 

 

[epel]

name=epel

baseurl=https://mirrors aliyun.com/epel/7/×86_641

gpgcheck=0

enabled=0

 

C语言源代码安装三步骤

1、./configure

2、make

3、make install

 

 

 

yum
CentOS: yum, dnf
YUM: Yellowdog Update Modifier,rpm的前端程序,可解决软件包相关依赖性,可在多个库之间定位软件包,up2date的替代工具
yum repository: yum repo,存储了众多rpm包,以及包的相关的元数据文件(放置于特定目录repodata下)
文件服务器:
http://
https://
ftp://
file://
yum配置文件
yum客户端配置文件:
/etc/yum.conf:为所有仓库提供公共配置
/etc/yum.repos.d/*.repo:为仓库的指向提供配置
仓库指向的定义:
[repositoryID]
name=Some name for this repository
baseurl=url://path/to/repository/
enabled={1|0}
gpgcheck={1|0}
gpgkey=URL
enablegroups={1|0}
failovermethod={roundrobin|priority}
roundrobin:意为随机挑选,默认值
priority:按顺序访问
cost= 默认为1000
yum仓库
yum的repo配置文件中可用的变量:
$releasever: 当前OS的发行版的主版本号
$arch: 平台,i386,i486,i586,x86_64等
$basearch:基础平台;i386, x86_64
$YUM0-$YUM9:自定义变量
 实例:
http://server/centos/$releasever/$basearch/
yum源
 阿里云repo文件:
CentOS系统的yum源
 阿里云:https://mirrors.aliyun.com/centos/$releasever/os/x86_64/
 教学环境: http://172.20.0.1/cobbler/ks_mirror/$releasever/
EPEL的yum源:
 阿里云: https://mirrors.aliyun.com/epel/$releasever/x86_64
 教学环境: http://172.20.0.1/fedora-epel/$releasever/x86_64/
 生成172.16.0.1_cobbler_ks_mirror_CentOS-X-x86_64_.repo
yum-config-manager –add-repo= http://172.16.0.1/cobbler/ks_mirror/7/
yum-config-manager –disable “仓库名” 禁用仓库
yum-config-manager –enable “仓库名” 启用仓库
yum命令
yum命令的用法:
yum [options] [command] [package …]
 显示仓库列表:
yum repolist [all|enabled|disabled]
 显示程序包:
yum list
yum list [all | glob_exp1] [glob_exp2] […]
yum list {available|installed|updates} [glob_exp1] […]
 安装程序包:
yum install package1 [package2] […]
yum reinstall package1 [package2] […] (重新安装

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/96789

赞 (1)
你的命字你的命字
上一篇 2018-04-22 15:55
下一篇 2018-04-22 15:58

相关推荐

  • 文件查找和压缩

    locate查询系统上预建的文件索引数据库索引数据库:/var/lib/mlocate/mlocate.db工作特点:查找速度快模糊查找非实时查找搜索的式文件的全路径,不仅仅是文件名可能只搜索用户具备读取和执行权限的目录参数:-i:不区分大小写-n:只列举前n行-r:使用正则表达式find:实时查找工具工作特点:查找速度慢,非常消耗资源精确查找实时查找可能只…

    2018-04-16
  • mysql练习题

    导入hellodb.sql生成数据库(1) 在students表中,查询年龄大于25岁,且为男性的同学的名字和年龄MariaDB [hellodb]> select Name,Age from students where Age>25 and Gender=’M’;(2) 以ClassID为分组依据,显示每组的平均…

    Linux笔记 2018-06-09
  • linux第二周

    总结

    Linux笔记 2018-04-08
  • 学习笔记(1)

    学习笔记

    Linux笔记 2018-04-01
  • if,case,for 脚本练习

    shell脚本练习

    2018-05-06
  • N31Linux第三周

    1、列出当前系统上所有已经登录的用户的用户名,注意:同一个用户登录多次,则只显示一次即可。 [root@localhost ~]#who |cut -d ‘ ‘ -f1 |sort -u 2、列出最后登录到当前用户系统的用户相关信息。 [root@localhost ~]#w |cut -d ‘ ‘ -f1 |…

    2018-07-16