Deploy yum warehouse and NFS sharing service

1. Deploy YUM warehouse

1. Overview of YUM
The software update mechanism based on RPM package construction
can automatically resolve dependencies.
All packages are provided by the centralized yum software warehouse. The
professional term for make compilation is called build.
Insert picture description here

2. YUM tool
1.2.1, about YUM command
Provided by package yum-3.4.3-150.el7.centos.noarch It is
used to access YUM warehouse, query, download and install, uninstall package
1.2.2, YUM configuration File
Basic configuration: /etc/yum.conf
Warehouse setting: /etc/yum.repos.d/*.repo
Log file: /var/log/yum.log
Note:
1. If the yum warehouse fails, you can check the log File
2. Yum suddenly reported an error when installing the software, you can use yum clean all (empty cache data) to clear it and then use yum list to reload

3. The YUM cache directory
stores the downloaded software packages, warehouse information and other data
in /var/cache/yum/ basearch/basearch/b a s e a r c h / releasever
clear cache command: yum clean all

4.
Two commands commonly used by yum for yum warehouse update:
yum -y update not only updates the software package, but also updates the system kernel (long update time)
yum -y upgrade only updates the software package
yum install <package> Install the software package
yum remove <package> Uninstall software package
yum clean all clear cache
yum list View/load software list
yum info <package> View package details
yum whatprovides <file/directory> View file/directory belongs to which package is installed
yum grouplist [Package group name] View package group software list
yum groupinfo <package group name> View package group details
yum groupinstall gnome-desktop package group installation graphical interface
yum groupremove gnome-desktop package group uninstall graphical interface

5. Prepare the installation source
5.1. How to provide software warehouse
FTP service: ftp://
HTTP service: http://
local directory: file://

5.2 Source
of RPM packages RPM package collection released by Centos RPM package collection
released by third-party organization
User-defined RPM package collection

2. NFS sharing service

1. NFS (Network File System) network file system
depends on rpcbind (remote procedure call),
nfs-utils and rpcbind software packages need to be installed.
System service: nfs, rpcbind
shared configuration file: /etc/exports

2. NFS function:
Different machines and different operating systems can share files with each other through the network.
The NFS server allows the PC to mount the directory shared by the NFS server on the network to the local file system. From the local system, the remote host's directory is like a disk partition of its own, which is very convenient to use .

3. The working process of NFS:
3.1. First, the server starts the RPC service and opens port 111.
3.2. The server starts the NFS service and registers port information with RPC.
3.3. The client starts the RPC service and requests the server’s RPC service from the server. NFS port
3.4, the server's RPC service feeds back the NFS port information to the client
3.5, the client establishes an NFS connection with the server through the obtained NFS port and performs data transmission

4. Use Nfs network sharing to provide a homepage for web1 server and another homepage for web2 server.
1. Turn off the firewall and core protection
Insert picture description here

2. Install related software packages
Insert picture description here

3. chkconfig tool manages nfs service and rpcbind service
Insert picture description here

4. Create a web page
Insert picture description here

5. Give the client permission
Insert picture description here
Insert picture description here

6. Turn on the service
Insert picture description here

7. Check the port number
Insert picture description here

8. View the shared directory published by the nfs server

Insert picture description here

Client 1
1. Turn off the firewall and core protection
Insert picture description here

2. Install apache service
Insert picture description here

3. Mount
Insert picture description here

4. Start the service
Insert picture description here

5. View the shared directory published by the nfs server
Insert picture description here

6. Verification
Insert picture description here

Client 2
1. Turn off the firewall and core protection
Insert picture description here

2. Install apache service
Insert picture description here

3. Mount
Insert picture description here

4. Start the service
Insert picture description here

5. View the shared directory published by the nfs server
Insert picture description here

6. Verification

Insert picture description here

Guess you like

Origin blog.csdn.net/yuiLan0/article/details/109155189
Recommended