Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 configure local yum source

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

RHEL7 configuration yum source

1, Mount DVD disc to/mnt Because there cannot be spaces in the pathname when configuring, otherwise it cannot recognize [root@ mnt]# mount /dev/cdrom /mnt

2. Create a file named.repo in the directory/etc/yum.repos.d/

3. Configure local yum source

cd /etc/yum.repos.d/ #Enter yum configuration directory

touch rhel7.repo #Create yum profile

vim rhel7.repo #Edit the configuration file and add the following

[rhel-yum]

name=rhel7 #custom name

baseurl=file:///mnt#local CD mount path

enabled=1 #Enable yum source, 0 is not enabled, 1 is enabled

gpgcheck=0 #Check GPG-KEY, 0 means do not check, 1 means check

:wq! #Save Exit

RHEL7 Native yum Source Configuration

4, Test automatic installation software using yum command

yum clean all #Clear yum cache

yum makecache #Cache package information from local yum sources

yum install httpd #Install apache

rpm -ql httpd #Query all directories and files where httpd is installed

systemctl start httpd.service #Start apache

systemctl stop httpd.service #Stop apache

systemctl restart httpd.service #Restart apache

systemctl enable httpd.service #Set boot

RHEL 7.0 uses firewall as firewall by default, which is changed to iptables firewall.

5, through yum installation GUI graphical interface # yum -y groupinstall "Server with GUI" can execute startx to see the effect.

Uninstall Software by yum yum-y remove httpd(Remove httpd Software)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report