LINUX REDHAT第十三单元文档

简介:

1.软件名称识别####

[abrt-addon-ccpp]-[2.1.11-19].[el7].[x86_64].rpm##rpm结尾的适用与redhat操作系统

       ||     ||         ||       ||

    软件名称   软件版本 软件适用系统 64

 

 

####2.如何安装软件####

1.rpm

rpm-ivhname.rpm##安装 ,-v显示过程,-h指定加密方式为hash

-ename##卸载

-qlname##查询软件生成文件

-qlpname.rpm##查询软件安装后会生成什么文件

-qa##查询系统中安装的所有软件名称

-qa |grep name##查询软件是否安装

-qp name.rpm##查询软件安装包安装后的名字

-qf filename##查看filename属于那个安装包

-ivh name.rpm --force##强制安装

-qi name##查看软件信息

-Kv name.rpm##检测软件包是否被篡改

-qp name.rpm --scripts##检测软件在安装或卸载过程中执行的动作

 

 

wKioL1juHh_jWes9AAUqLgkbyHo558.png-wh_50

wKiom1juHijRqAX-AA6bTWazi2E177.png-wh_50

wKioL1juHjCDtBJyAA2GqcDTqzE818.png-wh_50

wKiom1juHjjy3EMJAA2OM7NZ12s842.png-wh_50

wKioL1juHkHCrFlEAA29hc5Qzng817.png-wh_50

wKiom1juHkrTJLalAA6ieljpN-U197.png-wh_50


2.yum

yum

上层软件管理工具,最重要的功能是可以解决软件的倚赖关系

yum能够投入使用的前提是必须要有yum源,以及配置源的指向文件

 

###server源端####

1.从网络上下本机系统版本匹配的iso镜像文件

rhel-server-7.1-x86_64-dvd.iso

 

2.rhel-server-7.1-x86_64-dvd.iso挂在到/mnt以便访问镜像中的文件

mount rhel-server-7.1-x86_64-dvd.iso /mnt

wKioL1juHl6QBBZLAA3nyne250U993.png-wh_50 

3.配置本机yum源指向

rm -fr /etc/yum.repos.d/*

vim /etc/yum.repos.d/yum.repo

[Server]

name=rhel7.1

baseurl=file:///mnt

gpgcheck=0

wKiom1juHm6y2K_wAA3l2X4sZKw075.png-wh_50 

4.安装资源共享服务

yum install httpd -y

systemctl stop firewalld

systemctl disable firewalld

systemctl start httpd

systemctl enable httpd

 

wKiom1juHqHBb_PFAA84_VzNrQk360.png-wh_50

wKiom1juHqrT8x3XAA7O7nibHK4555.png-wh_50


5.建立共享目录,并挂在镜像文件到共享目录上

mkdir /var/www/html/rhel7.2

umount /mnt

mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.2

wKioL1juHryTi2F1AA6c9-mLLXI923.png-wh_50 

6.测试

在浏览器中输入:http://本机ip/rhel7.2

可以看到镜像中的内容

wKioL1juHsehG1SSAAHg2FlGGTI437.png-wh_50

wKiom1juHsfCwUzXAAGzJqg43Hs189.png-wh_50

 

7.修改本机yum源指向

[server]

name=rhel7.2

baseurl=file:///var/www/html/rhel7.2

gpgcheck=0

 wKioL1juHvrACyleAA8DGhsdA-8022.png-wh_50

8.开机自动挂在iso

vim /etc/rc.d/rc.local

mount rhel-server-7.2-x86_64-dvd.iso /var/www/html/rhel7.2

:wq

 

chmod +x /etc/rc.d/rc.local

wKiom1juHw2D-XnLAA9j6asxJYE157.png-wh_50 

9.第三方软件仓库的搭建

把所有的rpm软件包放到一个目录中,这个目录中只能存在rpm文件

createrepo -v /rpm存放目录

vim /etc/yum.repos.d/xxx.repo

[Software]

name=software

baseurl=file:///rpm存放目录

gpgcheck=0

 

wKioL1j0U-TDzv4_AAwCSELp-1c974.png-wh_50

wKiom1j0U-rAgO2ZAAtgjY8ZtQ0438.png-wh_50


####client指向端####

vim /etc/yum.repos.d/xxxx.repo##仓库指向文件位置

[xxxx]##自定义软件仓库名称

name=xxxx##自定义软件仓库描述

baseurl=ftp://|http://|file://##仓库位置

gpgcheck=0##不检测gpgkey

##gpgkey表示软件的出品logo

 

例子:

vim /etc/yum.repos.d/yum.repo

[Server]

name=rhel7.2

baseurl=ftp://x.x.x.x/pub/rhel7.2

gpgcheck=0

:wq

 

yum clean all##清空yum缓存识别新配置

 

wKioL1juHyiw2-rMAA7QHAEVAN0624.png-wh_50 

####yum命令####

yuminstallsoftwarename##安装

repolist##列出设定yum源信息

removesoftwarename##卸载

listsoftwarename##查看软件源中是否有次软件

list all##列出所有软件名称

list installd##列出已经安装的软件名称

list available##列出可以用yum安装的软件名称

clean all##清空yum缓存

searchsoftwareinfo##根据软件信息搜索软件名字

whatprovidesfilename##yum源中查找包含filename文件的软件包

update##更新软件

history##查看系统软件改变历史

reinstallsoftwarename##重新安装

infosoftwarename##查看软件信息

groups list##查看软件组信息

groups infosoftwaregroup##查看软件组内包含的软件

groups installsoftwaregroup##安装组件

groups removesoftwaregroup##卸载组件



本文转自Super_MONKEY 51CTO博客,原文链接:http://blog.51cto.com/supermk/1915367


相关文章
|
2月前
|
存储 算法 Shell
【Shell 命令集合 文档编辑】Linux 格式化输出 ispell命令使用指南
【Shell 命令集合 文档编辑】Linux 格式化输出 ispell命令使用指南
37 3
|
2月前
|
存储 Shell Linux
【Shell 命令集合 文档编辑】Linux 格式化输出 Shell fold命令使用指南
【Shell 命令集合 文档编辑】Linux 格式化输出 Shell fold命令使用指南
36 2
|
2月前
|
算法 Shell Linux
【Shell 命令集合 文档编辑】Linux 格式化文本文件fmt命令使用教程
【Shell 命令集合 文档编辑】Linux 格式化文本文件fmt命令使用教程
38 2
|
2月前
|
数据采集 Shell Linux
【Shell 命令集合 文档编辑】Linux 字符转换或删除 tr 命令使用指南
【Shell 命令集合 文档编辑】Linux 字符转换或删除 tr 命令使用指南
37 0
|
2月前
|
存储 Shell Linux
【Shell 命令集合 文档编辑】Linux 文本统计 wc命令使用指南
【Shell 命令集合 文档编辑】Linux 文本统计 wc命令使用指南
50 0
|
2月前
|
Shell Linux C语言
【Shell 命令集合 文档编辑 】Linux 递归搜索指定字符串 rgrep命令使用指南
【Shell 命令集合 文档编辑 】Linux 递归搜索指定字符串 rgrep命令使用指南
20 0
|
2月前
|
算法 Shell Linux
【Shell 命令集合 文档编辑】Linux 检查文本文件中的拼写错误 spell 命令使用指南
【Shell 命令集合 文档编辑】Linux 检查文本文件中的拼写错误 spell 命令使用指南
35 0
|
2月前
|
Shell Linux C语言
【Shell 命令集合 文档编辑】Linux 在文件中查找指定的字符串 fgrep命令使用指南
【Shell 命令集合 文档编辑】Linux 在文件中查找指定的字符串 fgrep命令使用指南
46 2
|
1月前
|
Linux 网络安全
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
34 1
|
2天前
|
存储 Linux
Redhat Enterprise Linux磁带机简单操作
Redhat Enterprise Linux磁带机简单操作