CentOS 6 NFS 客户端配置


[root@localhost tedu]# hostname nfsclient
[root@localhost tedu]# exit
exit
[tedu@localhost ~]$ su
Password:
[root@nfsclient tedu]# chkconfig --list |grep netfs
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
[root@nfsclient tedu]# cat /etc/redhat-release
CentOS release 6.10 (Final)
[root@nfsclient tedu]# uname -r
2.6.32-754.el6.x86_64
[root@nfsclient tedu]# uname -m
x86_64
[root@nfsclient tedu]# ps -ef|grep rpc
rpc       1522     1  0 12:07 ?        00:00:00 rpcbind
rpcuser   1624     1  0 12:07 ?        00:00:00 rpc.statd
root      2939  2860  0 12:44 pts/1    00:00:00 grep rpc
[root@nfsclient tedu]# netstat -lntup|grep rpc
tcp        0      0 0.0.0.0:52586               0.0.0.0:*                   LISTEN      1624/rpc.statd      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1522/rpcbind        
tcp        0      0 :::43563                    :::*                        LISTEN      1624/rpc.statd      
tcp        0      0 :::111                      :::*                        LISTEN      1522/rpcbind        
udp        0      0 0.0.0.0:36944               0.0.0.0:*                               1624/rpc.statd      
udp        0      0 0.0.0.0:849                 0.0.0.0:*                               1522/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1522/rpcbind        
udp        0      0 127.0.0.1:952               0.0.0.0:*                               1624/rpc.statd      
udp        0      0 :::849                      :::*                                    1522/rpcbind        
udp        0      0 :::38230                    :::*                                    1624/rpc.statd      
udp        0      0 :::111                      :::*                                    1522/rpcbind        
[root@nfsclient tedu]# rpcinfo -p localhost
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  36944  status
    100024    1   tcp  52586  status
[root@nfsclient tedu]# ps -ef|grep rpc        
rpc       1522     1  0 12:07 ?        00:00:00 rpcbind
rpcuser   1624     1  0 12:07 ?        00:00:00 rpc.statd
root      4901  2860  0 15:38 pts/1    00:00:00 grep rpc
[root@nfsclient tedu]# yum group list
Loaded plugins: fastestmirror, refresh-packagekit, security
No such command: group. Please use /usr/bin/yum --help
[root@nfsclient tedu]# yum grouplist
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: mirror.lzu.edu.cn
 * extras: mirrors.nwsuaf.edu.cn
 * updates: mirrors.163.com
Installed Groups:
   Additional Development
   Base
   Compatibility libraries
   Debugging Tools
   Desktop
   Desktop Debugging and Performance Tools
   Desktop Platform
   Dial-up Networking Support
   Directory Client
   E-mail server
   FCoE Storage Client
   Fonts
   General Purpose Desktop
   Graphical Administration Tools
   Graphics Creation Tools
   Hardware monitoring utilities
   Input Methods
   Internet Applications
   Internet Browser
   Java Platform
   KDE Desktop
   Legacy UNIX compatibility
   Legacy X Window System compatibility
   MySQL Database client
   MySQL Database server
   NFS file server
   Network Infrastructure Server
   Network file system client
   Networking Tools
   Office Suite and Productivity
   Performance Tools
   Perl Support
   Print Server
   Printing client
   Remote Desktop Clients
   Scientific support
   Security Tools
   Server Platform
   Storage Availability Tools
   System administration tools
   Web Server
   X Window System
   iSCSI Storage Client
Installed Language Groups:
   Arabic Support [ar]
   Armenian Support [hy]
   Assamese Support [as]
   Bengali Support [bn]
   Bhutanese Support [dz]
   Chinese Support [zh]
   Dutch Support [nl]
   English (UK) Support [en_GB]
   Ethiopic Support [am]
   French Support [fr]
   Georgian Support [ka]
   German Support [de]
   Gujarati Support [gu]
   Hebrew Support [he]
   Hindi Support [hi]
   Inuktitut Support [iu]
   Japanese Support [ja]
   Kannada Support [kn]
   Khmer Support [km]
   Konkani Support [kok]
   Korean Support [ko]
   Kurdish Support [ku]
   Lao Support [lo]
   Maithili Support [mai]
   Malayalam Support [ml]
   Marathi Support [mr]
   Myanmar (Burmese) Support [my]
   Oriya Support [or]
   Punjabi Support [pa]
   Sinhala Support [si]
   Tajik Support [tg]
   Tamil Support [ta]
   Telugu Support [te]
   Thai Support [th]
   Urdu Support [ur]
   Venda Support [ve]
Available Groups:
   Backup Client
   Backup Server
   CIFS file server
   Client management tools
   Console internet tools
   Desktop Platform Development
   Development tools
   Directory Server
   Eclipse
   Emacs
   FTP server
   Guest Agents
   High Availability
   High Availability Management
   Identity Management Server
   Infiniband Support
   Large Systems Performance
   Load Balancer
   Mainframe Access
   Messaging Client Support
   Network Storage Server
   PHP Support
   PostgreSQL Database client
   PostgreSQL Database server
   Resilient Storage
   Ruby Support
   SNMP Support
   Scalable Filesystems
   Server Platform Development
   Smart card support
   System Management
   TeX support
   Technical Writing
   TurboGears application framework
   Virtualization
   Virtualization Client
   Virtualization Platform
   Virtualization Tools
   Web Servlet Engine
   Web-Based Enterprise Management
Available Language Groups:
   Afrikaans Support [af]
   Albanian Support [sq]
   Amazigh Support [ber]
   Azerbaijani Support [az]
   Basque Support [eu]
   Belarusian Support [be]
   Brazilian Portuguese Support [pt_BR]
   Breton Support [br]
   Bulgarian Support [bg]
   Catalan Support [ca]
   Chhattisgarhi Support [hne]
   Chichewa Support [ny]
   Coptic Support [cop]
   Croatian Support [hr]
   Czech Support [cs]
   Danish Support [da]
   Esperanto Support [eo]
   Estonian Support [et]
   Faroese Support [fo]
   Fijian Support [fj]
   Filipino Support [fil]
   Finnish Support [fi]
   Frisian Support [fy]
   Friulian Support [fur]
   Gaelic Support [gd]
   Galician Support [gl]
   Greek Support [el]
   Hiligaynon Support [hil]
   Hungarian Support [hu]
   Icelandic Support [is]
   Indonesian Support [id]
   Interlingua Support [ia]
   Irish Support [ga]
   Italian Support [it]
   Kashmiri Support [ks]
   Kashubian Support [csb]
   Kazakh Support [kk]
   Kinyarwanda Support [rw]
   Latin Support [la]
   Latvian Support [lv]
   Lithuanian Support [lt]
   Low Saxon Support [nds]
   Luxembourgish Support [lb]
   Macedonian Support [mk]
   Malagasy Support [mg]
   Malay Support [ms]
   Maltese Support [mt]
   Manx Support [gv]
   Maori Support [mi]
   Mongolian Support [mn]
   Nepali Support [ne]
   Northern Sotho Support [nso]
   Norwegian Support [nb]
   Occitan Support [oc]
   Persian Support [fa]
   Polish Support [pl]
   Portuguese Support [pt]
   Romanian Support [ro]
   Russian Support [ru]
   Sanskrit Support [sa]
   Sardinian Support [sc]
   Serbian Support [sr]
   Sindhi Support [sd]
   Slovak Support [sk]
   Slovenian Support [sl]
   Somali Support [so]
   Southern Ndebele Support [nr]
   Southern Sotho Support [st]
   Spanish Support [es]
   Swahili Support [sw]
   Swati Support [ss]
   Swedish Support [sv]
   Tagalog Support [tl]
   Tetum Support [tet]
   Tibetan Support [bo]
   Tsonga Support [ts]
   Tswana Support [tn]
   Turkish Support [tr]
   Turkmen Support [tk]
   Ukrainian Support [uk]
   Upper Sorbian Support [hsb]
   Uzbek Support [uz]
   Vietnamese Support [vi]
   Walloon Support [wa]
   Welsh Support [cy]
   Xhosa Support [xh]
   Zulu Support [zu]
Done
[root@nfsclient tedu]# yum groupinstall "NFS file server" -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: mirror.lzu.edu.cn
 * extras: mirrors.nwsuaf.edu.cn
 * updates: mirrors.163.com
Package nfs4-acl-tools-0.3.3-8.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.2.3-78.el6 will be updated
---> Package nfs-utils.x86_64 1:1.2.3-78.el6_10.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch          Version                    Repository      Size
================================================================================
Updating:
 nfs-utils        x86_64        1:1.2.3-78.el6_10.1        updates        337 k

Transaction Summary
================================================================================
Upgrade       1 Package(s)

Total download size: 337 k
Downloading Packages:
nfs-utils-1.2.3-78.el6_10.1.x86_64.rpm                   | 337 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : 1:nfs-utils-1.2.3-78.el6_10.1.x86_64                         1/2
  Cleanup    : 1:nfs-utils-1.2.3-78.el6.x86_64                              2/2
  Verifying  : 1:nfs-utils-1.2.3-78.el6_10.1.x86_64                         1/2
  Verifying  : 1:nfs-utils-1.2.3-78.el6.x86_64                              2/2

Updated:
  nfs-utils.x86_64 1:1.2.3-78.el6_10.1                                          

Complete!
[root@nfsclient tedu]# rpm -aq nfs-utils rpcbind portmap
rpcbind-0.2.0-16.el6.x86_64
nfs-utils-1.2.3-78.el6_10.1.x86_64
[root@nfsclient tedu]# showmount -e 192.168.19.137
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
[root@nfsclient tedu]# showmount -e 192.168.19.137      
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
[root@nfsclient tedu]# showmount -e 192.168.19.137
Export list for 192.168.19.137:
/data 192.168.19.132/24

root@localhost tedu]# mount -t nfs 192.168.19.137:/data /mnt
[root@localhost tedu]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos6-lv_root
                       18G  5.4G   12G  32% /
tmpfs                 498M   84K  498M   1% /dev/shm
/dev/sda1             477M   35M  417M   8% /boot
/dev/sr0              2.0G  2.0G     0 100% /media/CentOS-6.10-x86_64-LiveDVD
192.168.19.137:/data   18G  5.4G   12G  32% /mnt
[root@localhost tedu]# cd /mnt
[root@localhost mnt]# ls
Downloads.rar                       网络安全渗透思路.rar
mbr.bin                             黑麒麟2018渗透培训系列教程-实战渗透篇.rar
渗透测试全套教程(从原理到实战).zip
[root@localhost mnt]# ls -l
total 23460
-rw-r--r--. 1 root root    18810 Feb 12 17:44 Downloads.rar
-rw-r--r--. 1 root root      512 Feb 12 16:08 mbr.bin
-rw-r--r--. 1 root root      233 Feb 12 17:45 渗透测试全套教程(从原理到实战).zip
-rw-r--r--. 1 root root 23988797 Feb 12 17:45 网络安全渗透思路.rar
-rw-r--r--. 1 root root      218 Feb 12 17:46 黑麒麟2018渗透培训系列教程-实战渗透篇.rar
[root@localhost mnt]# ls -l
total 23456
-rw-r--r--. 1 root root    18810 Feb 12 17:44 Downloads.rar
-rw-r--r--. 1 root root      233 Feb 12 17:45 渗透测试全套教程(从原理到实战).zip
-rw-r--r--. 1 root root 23988797 Feb 12 17:45 网络安全渗透思路.rar
-rw-r--r--. 1 root root      218 Feb 12 17:46 黑麒麟2018渗透培训系列教程-实战渗透篇.rar
[root@localhost mnt]# touch tedu.log
touch: cannot touch `tedu.log': Permission denied
[root@localhost mnt]#
[root@localhost mnt]# touch tedu.log
[root@localhost mnt]# ls -l
total 23456
-rw-r--r--. 1 root      root         18810 Feb 12 17:44 Downloads.rar
-rw-r--r--. 1 nfsnobody nfsnobody        0 Feb 12 19:49 tedu.log
-rw-r--r--. 1 root      root           233 Feb 12 17:45 渗透测试全套教程(从原理到实战).zip
-rw-r--r--. 1 root      root      23988797 Feb 12 17:45 网络安全渗透思路.rar
-rw-r--r--. 1 root      root           218 Feb 12 17:46 黑麒麟2018渗透培训系列教程-实战渗透篇.rar
[root@localhost mnt]# ls -l
total 23456
-rw-r--r--. 1 nfsnobody nfsnobody    18810 Feb 12 17:44 Downloads.rar
-rw-r--r--. 1 nfsnobody nfsnobody        0 Feb 12 19:49 tedu.log
-rw-r--r--. 1 nfsnobody nfsnobody      233 Feb 12 17:45 渗透测试全套教程(从原理到实战).zip
-rw-r--r--. 1 nfsnobody nfsnobody 23988797 Feb 12 17:45 网络安全渗透思路.rar
-rw-r--r--. 1 nfsnobody nfsnobody      218 Feb 12 17:46 黑麒麟2018渗透培训系列教程-实战渗透篇.rar
[root@localhost mnt]# rm -f Downloads.rar

[root@localhost mnt]# telnet 192.168.19.137 111
bash: telnet: command not found
[root@localhost mnt]# yum install net-tools -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.lzu.edu.cn
 * extras: mirrors.nwsuaf.edu.cn
 * updates: mirrors.163.com
Package net-tools-1.60-114.el6.x86_64 already installed and latest version
Nothing to do
[root@localhost mnt]# rpm -qa telnet-server
[root@localhost mnt]# yum install telnet-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.lzu.edu.cn
 * extras: mirrors.nwsuaf.edu.cn
 * updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-48.el6 will be installed
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-48.el6.x86_64
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-40.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch          Version                   Repository   Size
================================================================================
Installing:
 telnet-server        x86_64        1:0.17-48.el6             base         37 k
Installing for dependencies:
 xinetd               x86_64        2:2.3.14-40.el6           base        122 k

Transaction Summary
================================================================================
Install       2 Package(s)

Total download size: 159 k
Installed size: 313 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): telnet-server-0.17-48.el6.x86_64.rpm              |  37 kB     00:00     
(2/2): xinetd-2.3.14-40.el6.x86_64.rpm                   | 122 kB     00:00     
--------------------------------------------------------------------------------
Total                                           184 kB/s | 159 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:xinetd-2.3.14-40.el6.x86_64                                1/2
  Installing : 1:telnet-server-0.17-48.el6.x86_64                           2/2
  Verifying  : 1:telnet-server-0.17-48.el6.x86_64                           1/2
  Verifying  : 2:xinetd-2.3.14-40.el6.x86_64                                2/2

Installed:
  telnet-server.x86_64 1:0.17-48.el6                                            

Dependency Installed:
  xinetd.x86_64 2:2.3.14-40.el6                                                 

Complete!

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值