一、配置本地yum源

  1、挂载:

[root@localhost ~]# mount /dev/cdrom /mnt

mount: block device /dev/cdrom is write-protected, mounting read-only

[root@localhost ~]# cd /etc/yum.repos.d/

[root@localhost yum.repos.d]# vi rhel-debuginfo.repo     --添加下面内容

[localyum]

name=localyum

baseurl=file:///mnt

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

:wq  --退出并保存

  2、使用yum命令自动安装软件

    1)、yum clean all   #清除yum缓存 

    2)、  yum makecache  #缓存本地yum源中的软件包信息

  3、测试

 yum install httpd

安装成功

 

二、最小化安装的Centos7系统并没有nano、vim、wget、curl、ifconfig、lsof、zip、unzip命令

  这里首先安装一下,即可使用:  

    yum -y install nano vim wget curl net-tools lsof Yum -y install zip

 

相关文章:

  • 2022-02-08
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-10-09
  • 2019-06-27
  • 2021-08-20
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案