系统最小化安装后,使用命令时提示“command not found”

虚拟机新加块硬盘,分区时,提示 " command not found".

直接yum也无法安装... ...

  
  
  
  
  1. [root@Cacti ~]# fdisk -l 
  2.  
  3. Disk /dev/sda: 107.4 GB, 107374182400 bytes 
  4. 255 heads, 63 sectors/track, 13054 cylinders 
  5. Units = cylinders of 16065 * 512 = 8225280 bytes 
  6. Sector size (logical/physical): 512 bytes / 512 bytes 
  7. I/O size (minimum/optimal): 512 bytes / 512 bytes 
  8. Disk identifier: 0x000a1889 
  9.  
  10.    Device Boot      Start         End      Blocks   Id  System 
  11. /dev/sda1   *           1          66      524288   83  Linux 
  12. Partition 1 does not end on cylinder boundary. 
  13. /dev/sda2              66         588     4194304   82  Linux swap / Solaris 
  14. Partition 2 does not end on cylinder boundary. 
  15. /dev/sda3             588       13055   100137984   83  Linux 
  16.  
  17. Disk /dev/sdb: 21.5 GB, 21474836480 bytes 
  18. 255 heads, 63 sectors/track, 2610 cylinders 
  19. Units = cylinders of 16065 * 512 = 8225280 bytes 
  20. Sector size (logical/physical): 512 bytes / 512 bytes 
  21. I/O size (minimum/optimal): 512 bytes / 512 bytes 
  22. Disk identifier: 0x00000000 
  23.  
  24. Disk /dev/sdb doesn't contain a valid partition table 
  25. [root@Cacti ~]# pvcreate /dev/sdb  
  26. -bash: pvcreate: command not found 
  27. You have new mail in /var/spool/mail/root 
  28. [root@Cacti ~]# pvdisplay 
  29. -bash: pvdisplay: command not found 
  30. [root@Cacti ~]# yum install pvdisplay 
  31. Loaded plugins: fastestmirror 
  32. Loading mirror speeds from cached hostfile 
  33.  * base: centos.ustc.edu.cn 
  34.  * extras: centos.ustc.edu.cn 
  35.  * updates: centos.ustc.edu.cn 
  36. Setting up Install Process 
  37. No package pvdisplay available. 

很郁闷吧,本来就菜,想办法吧!于是登录到一台完整安装的系统上。

  
  
  
  
  1. [root@localhost localhost]# pvdispaly 
  2. -bash: pvdispaly: command not found 
  3. [root@localhost localhost]# pvcreate 
  4.   Please enter a physical volume path 
  5.   Run `pvcreate --help' for more information. 
  6. [root@localhost localhost]# which pvcreate 
  7. /sbin/pvcreate 
  8. [root@localhost localhost]# rpm -qf /sbin/pvcreate  
  9. lvm2-2.02.72-8.el6_0.4.x86_64 

找到了,就是这个了,lvm2

  
  
  
  
  1. [root@Cacti ~]# yum install lvm2-2.02.72-8.el6_0.4.x86_64 
  2. Loaded plugins: fastestmirror 
  3. Loading mirror speeds from cached hostfile 
  4.  * base: centos.ustc.edu.cn 
  5.  * extras: centos.ustc.edu.cn 
  6.  * updates: centos.ustc.edu.cn 
  7. Setting up Install Process 
  8. No package lvm2-2.02.72-8.el6_0.4.x86_64 available. 
  9. Error: Nothing to do 
  10. [root@Cacti ~]# yum install lvm2 
  11. Loaded plugins: fastestmirror 
  12. Loading mirror speeds from cached hostfile 
  13.  * base: centos.ustc.edu.cn 
  14.  * extras: centos.ustc.edu.cn 
  15.  * updates: centos.ustc.edu.cn 
  16. Setting up Install Process 
  17. Resolving Dependencies 
  18. ......................................                                                                                                                                                       576 kB/s | 1.8 MB     00:03      
  19. Running rpm_check_debug 
  20. Running Transaction Test 
  21. Transaction Test Succeeded 
  22. Running Transaction 
  23.   Installing : libudev-147-2.42.el6.x86_64                                                                                                                                             1/7  
  24.   Installing : device-mapper-libs-1.02.74-10.el6.x86_64                                                                                                                                2/7  
  25.   Installing : device-mapper-1.02.74-10.el6.x86_64                                                                                                                                     3/7  
  26.   Installing : device-mapper-event-libs-1.02.74-10.el6.x86_64                                                                                                                          4/7  
  27.   Installing : device-mapper-event-1.02.74-10.el6.x86_64                                                                                                                               5/7  
  28.   Installing : lvm2-libs-2.02.95-10.el6.x86_64                                                                                                                                         6/7  
  29.   Installing : lvm2-2.02.95-10.el6.x86_64                                                                                                                                              7/7  
  30.  
  31. Installed: 
  32.   lvm2.x86_64 0:2.02.95-10.el6                                                                                                                                                                  
  33.  
  34. Dependency Installed: 
  35.   device-mapper.x86_64 0:1.02.74-10.el6     device-mapper-event.x86_64 0:1.02.74-10.el6     device-mapper-event-libs.x86_64 0:1.02.74-10.el6     device-mapper-libs.x86_64 0:1.02.74-10.el6     
  36.   libudev.x86_64 0:147-2.42.el6             lvm2-libs.x86_64 0:2.02.95-10.el6               
  37.  
  38. Complete! 
  39. You have new mail in /var/spool/mail/root 
  40. [root@Cacti ~]# pvcreate /dev/sdb  
  41.   Writing physical volume data to disk "/dev/sdb" 
  42.   Physical volume "/dev/sdb" successfully created 
  43. [root@Cacti ~]# pvdisplay 
  44.   "/dev/sdb" is a new physical volume of "20.00 GiB" 
  45.   --- NEW Physical volume --- 
  46.   PV Name               /dev/sdb 
  47.   VG Name                
  48.   PV Size               20.00 GiB 
  49.   Allocatable           NO 
  50.   PE Size               0    
  51.   Total PE              0 
  52.   Free PE               0 
  53.   Allocated PE          0 
  54.   PV UUID               Li76jc-Hbq2-9TsD-Fcui-3XZA-YDxS-Ma6bN5 
  55.     
  56. [root@Cacti ~]#  

看到了吧,可以用了!!

你可能感兴趣的:(command,found,not)