unit13
软件安装
1.软件名称识别
[abrt-addon-ccpp]-[2.1.11-19].[el7].[x86_64].rpm ##rpm结尾的适用与redhat操作系统
|| || || ||
软件名称 软件版本 软件适用系统 64位
2.如何安装软件
1.rpm
rpm -ivh name.rpm ##安装 ,-v显示过程,-h指定加密方式为hash
-e name ##卸载
-ql name ##查询软件生成文件
-qlp name.rpm ##查询软件安装后会生成什么文件
-qa ##查询系统中安装的所有软件名称
-qa |grep name ##查询软件是否安装
-q name ##。。。。
-qp name.rpm ##查询软件安装包安装后的名字
-qf filename ##查看filename属于那个安装包
-ivh name.rpm --force ##强制安装
-qi name ##查看软件信息
-Kv name.rpm ##检测软件包是否被篡改
-qp name.rpm --scripts ##检测软件在安装或卸载过程中执行的动作
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
3.配置本机yum源指向
rm -fr /etc/yum.repos.d/*
vim /etc/yum.repos.d/yum.repo
[Server]
name=rhel7.1
baseurl=file:///mnt
gpgcheck=0
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
5.建立共享目录,并挂在镜像文件到共享目录上
mkdir /var/www/html/rhel7.1
umount /mnt
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
6.测试
在浏览器中输入:http://本机ip/rhel7.1
可以看到镜像中的内容
7.修改本机yum源指向
[server]
name=rhel7.1
baseurl=file:///var/www/html/rhel7.1
gpgcheck=0
8.开机自动挂在iso
vim /etc/rc.d/rc.local
mount rhel-server-7.1-x86_64-dvd.iso /var/www/html/rhel7.1
:wq
chmod +x /etc/rc.d/rc.local0daybank
文章评论