linux mini模式下如何制作本地yum源,并用远程工具安装 vim
linux mini模式下如何制作本地yum源,并用远程工具安装 vim
打开虚拟机
启动centos 系统
点右下角的光盘图标
出现连接(或是断开)、设置,下拉菜单,选择 “设置”
在虚拟机设置对话框内如图所示
[root@mchaoo ~]# vim
-bash: /usr/bin/vim: 没有那个文件或目录
光盘挂载:
查看系统中所有的挂载信息
[root@mchaoo ~]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@mchaoo ~]# mount /dev/sr0 /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
只读
[root@mchaoo ~]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sr0 on /mnt/cdrom type iso9660 (ro)
#iso9660表示光盘已挂载
[root@mchaoo ~]#
[root@mchaoo ~]# vim
-bash: /usr/bin/vim: 没有那个文件或目录
[root@mchaoo ~]# ifconfig
设置yum
[root@mchaoo ~]# cd /etc/yum.repos.d
#进入目录yum.repos.d
[root@mchaoo yum.repos.d]# ll
总用量 16
-rw-r--r--. 1 root root 1926 11月 27 2013 CentOS-Base.repo
-rw-r--r--. 1 root root 638 11月 27 2013 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 628 4月 28 02:17 CentOS-Media.repo
-rw-r--r--. 1 root root 3664 11月 27 2013 CentOS-Vault.repo
[root@mchaoo yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
把CentOS-Base.repo文件名改为 CentOS-Base.repo.bak
[root@mchaoo yum.repos.d]# ll
列出当前目录下文件
总用量 16
-rw-r--r--. 1 root root 1926 11月 27 2013 CentOS-Base.repo.bak
-rw-r--r--. 1 root root 638 11月 27 2013 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 628 4月 28 02:17 CentOS-Media.repo
-rw-r--r--. 1 root root 3664 11月 27 2013 CentOS-Vault.repo
[root@mchaoo yum.repos.d]# vi CentOS-Media.repo
[root@mchaoo yum.repos.d]# yum -y install vim
以下是安装过程所显示的信息
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.i686 2:7.2.411-1.8.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================
Package Arch Version Repository Size
==============================================================================
Installing:
vim-enhanced i686 2:7.2.411-1.8.el6 c6-media 837 k
Transaction Summary
==============================================================================
Install 1 Package(s)
Total download size: 837 k
Installed size: 1.8 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:vim-enhanced-7.2.411-1.8.el6.i686 1/1
Verifying : 2:vim-enhanced-7.2.411-1.8.el6.i686 1/1
Installed:
vim-enhanced.i686 2:7.2.411-1.8.el6
Complete!
vim 安装成功
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。