部分示图 示图:安装Linuxqq,用yum安装依赖的软件,解决Linuxqq的依赖性 示图:软件生成文件
示图:检测软件包是否被篡改
示图:检测软件在安装或卸载过程中执行的动作
2. yum yum 上层软件管理工具,最重要的功能是可以解决软件的倚赖关系 yum能够投入使用的前提是必须要有yum源,以及配置源的指向文件 三、server源端[示图版本为7.2] 1.从网络上下本机系统版本匹配的iso镜像文件 rhel-server-7.1-x86_64-dvd.iso
示图:镜像文件iso
2.把rhel-server-7.1-x86_64-dvd.iso挂在到/mnt以便访问镜像中的文件 mount /home/kiosk/Desktop/rhel-server-7.1-x86_64-dvd.iso /mnt
示图:挂载镜像文件到mnt
3.配置本机yum源指向 rm -fr /etc/yum.repos.d/* vim /etc/yum.repos.d/yum.repo [Server] name=rhel7.1 baseurl=file:///mnt ##//为指定位置,第三个/是代表根目录 gpgcheck=0 ##是否检查外来软件安装来源,0为不检查,1检查
示图:配置本机yum源指向
示图:本机yum源指向配置文件
4.安装资源共享服务 yum install httpd -y systemctl stop firewlsh-plugin-11.2.202.451-release.x86_64.rpmld systemctl disable firewalld systemctl start httpd systemctl enable httpd
示图:下载httpd
示图:启用资源共享服务 5.建立共享目录,并挂在镜像文件到共享目录上 mkdir /var/www/html/rhel7.1 umount /mnt mount /home/kiosk/Desktop/rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
示图:挂载镜像文件到 /var/www/html/rhel7.2下
6.测试 在浏览器中输入:http://本机ip/rhel7.1
可以看到镜像中的内容
示图:测试
7.修改本机yum源指向 [server] name=rhel7.1 baseurl=file:///var/www/html/rhel7.1 gpgcheck=0
示图:yum源配置文件修改操作
示图:yum源配置文件修改内容 8.开机自动挂在iso,为了更好保管iso文件,在根目录下新建目录iso用来存放镜像文件 vim /etc/rc.d/rc.local mount /iso/rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1 :wq chmod +x /etc/rc.d/rc.local
示图:开机自动挂在iso配置文件修改
示图:开机自动挂在iso操作
9.第三方软件仓库的搭建 把所有的rpm软件包放到一个目录中,这个目录中只能存在rpm文件 createrepo -v /rpm存放目录 vim /etc/yum.repos.d/xxx.repo [Software] name=software baseurl=file:///rpm存放目录 gpgcheck=0 示图:software仓库搭建配置文件 四、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.1 baseurl=ftp://172.25.0.254/pub/rhel7.1 gpgcheck=0 :wq yum clean all ##清空yum缓存识别新配置 测试:【yum search gcc ##查找gcc这个软件】
示图:客户端 yum search gcc
示图:服务端 yum search gcc
五、yum命令 yum -y【强制安装,不询问】install softwarename ##安装 repolist ##列出设定yum源信息 -y【强制安装,不询问】remove softwarename ##卸载 list softwarename ##查看软件源中是否有此软件 list all ##列出所有软件名称 list installd ##列出已经安装的软件名称 list available ##列出可以用yum安装的软件名称 clean all ##清空yum缓存 search softwareinfo ##根据软件信息搜索软件名字 whatprovides filename ##在yum源中查找包含filename文件的软件包 update ##更新软件 history ##查看系统软件改变历史 reinstall softwarename ##重新安装 info softwarename ##查看软件信息 groups list ##查看软件组信息 groups info softwaregroup ##查看软件组内包含的软件 groups install softwaregroup ##安装组件 groups remove softwaregroup ##卸载组件
示图:install安装软件lftp
示图:repolist列出设定yum源信息
示图:clean all和search软件信息
示图:remove卸载
示图:list列出此软件
示图:list all列出所有软件名称
示图:list installd列出已经安装的软件
示图:list available列出可以用yum安装的软件
示图:whatprovides在源文件中查找安装包
示图:history查看系统软件
示图:reinstall重新安装
示图:groups list列出软件组信息
示图:groups info查看软件组内包含的软件
