In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Centos7 configure yum software repository
Private network yum repository: local yum repository (that is, CD-ROM image comes with its own software as yum software repository)
Local area network yum warehouse (ftp service implementation)
Public network yum warehouse (implemented through http)
-use the yum repository to install the service
Yum clean all clears all warehouse caches
Yum makecache rebuilding Warehouse
Yum repolist all lists all warehouses
Yum provides searches for software packages based on specific criteria
Yum whatprovides * / filename to see which package the file belongs to
Yum list lists all software packages in the warehouse
Yum info View package Information
If yum install is installed with-y, there is no need to manually confirm the installation.
Yum reinstall reinstall the package
Yum remove uninstall
Yum update updates (networking required)
Yum check-update checks for updatable software packages (requires networking)
Yum grouplist View Group Service
Yum groupinstall installation Group Service
-- Local yum warehouse--
Cd / etc/yum.repos.d/ go to the configuration directory of the yum repository
Mkdir bak creates a directory to place the default yum settings for centos7.4
Mv C * bak/ moves all files that start with C to the bak directory.
Vi local.repo / / must be followed by .repo, because yum only recognizes files that end in .repo.
[local] / / unique identification of the warehouse to avoid conflicts with other warehouses
Name=local / / description of the current warehouse name
Baseurl= file:///mnt / / the path to the warehouse, that is, the url access path, which can point to multiple backup
Enabled=1 / / 1, indicates that the warehouse is used; 0, indicates that the warehouse is not used
Gpgcheck=0 / / 0, do not validate the package. 1, verify
: wq-Save exit
Df-hT to see if the CD is mounted
-check to see if the CD is connected. If no connection is returned, the CD cannot be found.
Temporary mount
Mount / dev/cdrom / mnt manually mount the CD temporarily, but it will be gone after shutdown and reboot.
Vi / etc/fstab
Permanent mount
/ dev/cdrom / mnt iso9660 defaults 0 0
Mount-a-check the grammar
Test:
1. Install a httpd service using local yum, as shown in the following picture
Above is the local yum warehouse.
-build Aliyun yum warehouse-only if you can access the Internet.
Tip: first of all, your virtual machine has to be able to access the Internet, which is a necessary condition.
Cd / etc/yum.repos.d/ go to the configuration directory of the yum repository
Vi local.repo-modify the corresponding content
1. Aliyun yum warehouse
[Ali]
Name=CentOS-$releasever-Base
Baseurl= http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
Gpgcheck=1
Gpgkey= http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
2. China University of Science and Technology
[mariadb]
Name = MariaDB
Baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.3/centos74-amd64/
Gpgcheck=1
Gpgkey= https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
Local and Aliyun yum repositories, giving priority to the latest services
Test:
Install a ftp to see where its software package comes from
The above is the network yum warehouse.
-- LAN yum Warehouse (ftp service implementation)
I.
Local area network yum warehouse is based on local yum warehouse.
(192.168.80.100) Operation: df-hT-- check to see if the CD is mounted because we are now using the ftp service, so when we mount the CD, mount it to / var/ftp/pubmount / dev/cdrom / var/ftp/pub/-- temporarily mount
Vi / etc/fstab
/ dev/cdrom / mnt iso9660 defaults 0 0-permanent mount
(192.168.80.101) Operation
Vi / etc/yum.repos.d/aa.repo
[aa]
Name=aa
Baseurl= ftp://192.168.80.100/pub
Enabled=1
Gpgcheck=0
: wq-- Save exit
Yum install httpd-y
The above is the LAN yum warehouse.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.