mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.2
**将镜像文件重新挂载在/var/www/html/rhel7.2下
6.测试 在浏览器中输入:http://本机ip/rhel7.2 可以看到镜像中的内容 7.修改本机yum源指向 [server] name=rhel7.2 baseurl=file:///var/www/html/rhel7.2 gpgcheck=0 8.开机自动挂在iso vim /etc/rc.d/rc.local **mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1 chmod +x /etc/rc.d/rc.local 9.第三方软件仓库的搭建 把所有的rpm软件包放到一个目录中,这个目录中只能存在rpm文件 createrepo -v /rpm存放位置 vim /etc/yum.repos.d/xxx.repo [Software] name=software baseurl=file:///rpm存放位置 gpgcheck=0 ####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 yum clean all ##清空yum缓存识别新配置 ####yum命令#### yum install softwarename ##安装 repolist ##列出设定yum源信息 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 ##卸载组件