標籤:linux nano命令
650) this.width=650;" src="/e/u261/themes/default/images/spacer.gif" style="background:url("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd;" alt="spacer.gif" />首先查看下這個目錄裡有沒有Centos-Base.repo這個檔案(附件裡有這個)
然後用Xmanager下的xftp 把本機上的這個檔案複製到虛擬機器中的/目錄下
[[email protected] ~]# mv Centos-Base.repo /etc/yum.repos.d/
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
Centos-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo 剪下過去 查看這個目錄 裡面出現這個檔案
然後執行
[[email protected] yum.repos.d]# yum clean all
[[email protected] yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net
base | 3.7 kB 00:00
base/group_gz | 220 kB 00:00
base/filelists_db | 5.9 MB 00:02
base/primary_db | 4.4 MB 00:02
base/other_db | 2.8 MB 00:01
extras | 3.3 kB 00:00
extras/filelists_db | 11 kB 00:00
extras/prestodelta | 904 B 00:00
extras/primary_db | 19 kB 00:00
extras/other_db | 22 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 3.0 MB 00:00
updates/prestodelta | 535 kB 00:00
updates/primary_db | 5.4 MB 00:02
updates/other_db | 46 MB 00:26
Metadata Cache Created
這2條命令 會提示下載安裝包組件
然後就可以安裝nano啦!!!
[[email protected] ~]# yum install nano
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.btte.net
* updates: mirrors.btte.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nano.x86_64 0:2.0.9-7.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nano x86_64 2.0.9-7.el6 base 436 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 436 k
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
nano-2.0.9-7.el6.x86_64.rpm | 436 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : nano-2.0.9-7.el6.x86_64 1/1
Verifying : nano-2.0.9-7.el6.x86_64 1/1
Installed:
nano.x86_64 0:2.0.9-7.el6
Complete!
紅色的是主要命令 不會的小夥伴可以試試 , 我用的是CentOS 6.5 64位的
linux下安裝 nano 如果沒有這個命令的話~~可以看下