In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Foreword:
Principal axis of storage
Local Stora
Disk management partition formatting automatic mount
LVM logical volumes (spanned volumes)
Raid disk array (stripe, mirror, raid5,raid6, raid1+0)
-
NFS network file system
MFS distributed storage file system
GFS massive distributed storage file system
Learn to deploy YUM warehouse services
Build a YUM software repository using YUM tools to manage software packages NFS shared storage services using NFS publish shared resources to access NFS shared NFS client mount mount 1: YUM Overview 1.1 YUM,Yellow dog Updater Modified Software update mechanism built on the RPM package can automatically resolve dependencies all software packages are provided by a centralized YUM software repository
2. Prepare to install Source 2.1Software Repository. FTP Service: ftp://.HTTP Service: http://. Local directory: source of file://......2.2 RPM package Centos released RPM package collection third party organization released RPM collection user-defined RPM package collection 2.3 build Centos 7 software repository RPM package from Centos 7 DVD CD, or image file is provided to client [root@localhost ~] # mount / dev/sr0 / optmount: / dev/sr0 write protection via FTP, HTTP or local directory file [root@localhost ~] # rpm-ivh / opt/Packages/sftpd-3.0.2-22.el7.x86_64.rpm [root@localhost ~] # cd / var/ftp [root@localhost ftp] # mkdir centos7 [root@localhost ftp] # cp-r / opt/* / var/ftp/centos7/ 'will be mounted read-only & you can run' [root@localhost ftp] # systemctl start vsftpd [root@localhost ftp] # systemctl enable vsftpdCreated symlink from / in the background Etc/systemd/system/multi-user.target.wants/vsftpd.service to / usr/lib/systemd/system/vsftpd.service.2.4 adds an unofficial RPM package group to the software repository, including all installation packages that have dependencies, as well as using createrepo tools to build warehouse data files [root@localhost ftp] # mkdir / var/ftp/other [root@localhost ftp] # cd / var/ftp/other/ [root@localhost repodata] # createrepo-g / opt/repodata/repomd.xml. / Directory / opt/repodata/./ must be writable.2.5 specifies the YUM warehouse location configuration file for the client: / etc/yum/repos.d/*.repo [root@localhost other] # cd / etc/yum.repos.d/ [root@localhost yum.repos.d] # ifconfigens33: flags=4163 mtu 1500 inet 192.168.139.132 netmask 255.255.255.0 broadcast 192.168.139.255 [root@localhost yum. Repos.d] # ls / opt/centos7CentOS_BuildTag GPL LiveOS RPM-GPG-KEY-CentOS-7EFI images Packages RPM-GPG-KEY-CentOS-Testing-7EULA isolinux repodata TRANS.TBL [root@localhost yum.repos.d] # vim centos7.repo [base] name=centos7baseurl= ftp://192.168.139.132/centos7enabled=1gpgcheck=1gpgkey=ftp:///opt/RPM-GPG-KEY-CentOS-7[other]name=Other RPM Packagesbaseurl= ftp://192.168.139.132 / otherenabled=1gpgcheck=0~ 2.6 directly use the centos7 CD to sit in the local software warehouse and put the centos7 CD in the designated warehouse location of the CD drive The baseurl address is file:///opt/ [root@localhost yum.repos.d] # vim centos7.repo [local] name=centos7baseurl= file:///optenabked=1gpgcheck=02.7 tool Overview about YUM 2.7.1 about the YUM command by the package yum-3.4.3-150.el7.centos. Noarch provides access to YUM repository, query, download, install and uninstall software package yum list [Software name] View inventory list yum info [Software name] to view software information Followed by the software name, you can only view the specified information yum search query the configuration file of the package group 2.7.2 YUM according to the keyword query basic settings: / etc/yum.conf warehouse settings: / etc/yum.repos.d/*.repo log file: / var/log/yum.log2.7.3 YUM cache directory to store the downloaded software package, Warehouse information and other data is located in / var/cache/yum/$basearch/$releasever$basearch hardware architecture $releaserver OS version [root@localhost yum.repos.d] # yum clean all 'clear cached data' has been loaded plug-in: fastestmirror LangpacksRepository base is listed more than once in the configuration is cleaning up the software source: base extras local other updatesCleaning up everythingMaybe you want: rm-rf / var/cache/yum To also free up space taken by orphaned data from disabled or removed reposCleaning uplist of fastest mirrorsyum grouplist [package Group name] yum groupinfo [root@localhost ~] # yum grouplist [root@localhost yum.repos.d] # yum grouplist gnome-desktop [root@localhost yum.repos.d] # yum groupinfo gnome-desktop2.7.4 installation Software yum install [Software name] yum groupinstall 2.7.5 upgrade Software yum update with kernel upgrade yum upgrade only update package Do not update kernel yum groupupdate2.7.6 uninstall software yum remove yum groupremove 2: NFS shared storage service 2.1Network File System, network file system depends on RPC (remote procedure call) need to install nfs-utils, rpcbind software package system service: nfs, rpcbind shared configuration file: / etc/exports
RPC, remote procedure call, or rpcbind package
Third, use NFS to publish shared resources 3.1 install nfs-utls, rpcbind package [root@localhost ~] # yum install nfs-utils rpcbind-y [root@localhost ~] # systemctl enable nfs [root@localhost ~] # systemctl enable rpcbind3.2 set up the shared directory [root@localhost ~] # mkdir / opt/wwwroot [root@localhost ~] # vi / etc/exports/opt/wwwroot 192.168.7.0On24 (rw,sync No_root_squash) / var/ftp/pub 192.168.4.11 (ro) 192.168.4.110 (rw)
Shared directory users (rw read and write, sync synchronization, no_root_squash does not downgrade root)
Ro can only read
3.3 start the NFS service program [root@localhost ~] # systemctl start rpcbind [root@localhost ~] # systemctl start nfs [root@localhost ~] # systemctl stop firewalld.service [root@localhost ~] # setenforce 0 [root@localhost ~] # netstat-anpt | grep rpcbind [root@localhost ~] # netstat-anpu | grep rpcbindudp 00 0.0.0.0 systemctl start rpcbind 681 0.0.0.0 systemctl start nfs * 5594 / rpcbind udp 0 0 0 5594/rpcbind udp6 111 0 0 0 * 5594/rpcbind udp6 0 0: 681:: * 5594/rpcbind udp6 0 0: 111 : * 5594/rpcbind 3.4 showmount-e verify [root@localhost ~] # showmount-e 192.168.139.132Export list for 192.168.139.132:/opt/wwwroot 192.168.7.0/24/var/ftp/pub 192.168.4.110192.168.4.113.5 Mount the NFS shared directory (operate on the guest machine)
_ netdev network device
When the target server is down and all operations cannot be performed, it is necessary to force the mount.
Summarize the methods provided by YUM software repository and deploy YUM software repository (server, client) YUM tool functions (query, installation, upgrade, uninstall) to build NFS shared storage service:
Server operation, server ip address is 192.168.139.141
Root@localhost ~] # rpm-Q rpcbind rpcbind-0.2.0-42.el7.x86_64 [root@localhost ~] # rpm-Q nfs-utils nfs-utils-1.3.0-0.48.el7.x86_64 [root@localhost ~] # vim / etc/exports/opt 192.168.139.0 rw,sync No_root_squash) [root@localhost ~] # systemctl stop firewalld.service [root@localhost ~] # setenforce 0 [root@localhost ~] # systemctl start nfs [root@localhost ~] # systemctl start rpcbind [root@localhost network-scripts] # ifconfigens33: flags=4163 mtu 1500 inet 192.168.139.141 netmask 255.255.255.0 broadcast 192.168.139.255 inet6 fe80::e2c1:c26d:afa1:a4ad prefixlen 64 scopeid 0x20
Client operation
[root@localhost ~] # showmount-e 192.168.139.141Export list for 192.168.139.141:/opt 192.168.139.0 take 24 [root@localhost ~] # [root@localhost ~] # mount 192.168.139.141:/opt / mnt [root@localhost ~] # cd / mnt [root@localhost mnt] # lsrh [root@localhost mnt] # mkdir 192.168.139.132 [root@localhost mnt] # ls192.168.139.132 rh [root@localhost mnt] # [root@localhost mnt] # df-hT file system type capacity available available mount point 192.168.139.141:/opt nfs4 20G 4.6G 16G 23% / mnt
The server checks whether to create or not
[root@localhost network-scripts] # ls / opt192.168.139.132 rh [root@localhost network-scripts] #
Site
Summary
The way the software repository is provided
File://
Ftp://
Http://
Configuration file / etc/yum.repos.d/*.repo
[base] name=centos 7.3 baseurl = ftp://192.168.88.88/centos7 'path to the software repository' enabled=1 'enable' gpgcheck=0'do not enable authentication
Other Profil
Basic Settings / etc/yum/conf
Log file / var/log/yum.log
Yum update is upgraded with the kernel.
Yum upgrade updates only the software package, not the kernel
NFS network storage
Dependent on RPC remote procedure call
Nfs-utils and rpcbind packages need to be installed
The shared configuration file / etc/exports writes to the shared directory and available account / var/ftp/pub 192.168.10.0x24 (rw,sync,no_root_squash)
The user can be a network segment or an ip address
Ro can only read rw read and write sync synchronous no_root_squash does not downgrade root users
You can also configure the permissions of the file directly
Starting the NFS service requires starting two
They are rpcbind and nfs.
Nfs network storage
Rpcbind remote call
View configuration
Showmount-e shared server ip address
Share path available users
Mounting
Check manual mount / etc/mtab
Automatic mount
Vim / etc/fstab
Server ip address: shared directory path client path nfs defaults,_netdev 0 0
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.