虚拟化软件是VMware,我已经安装好了Centos6.5系统,挂载上光驱,网络设置为桥接模式
修改网卡信息
修改网卡信息 ip为192.168.1.108 ip随意不占用就行 掩码 网关填路由器的网关
重启网卡
测试一下是否能ping通路由器。
接下来就是shell连接linux了 下面都显示命令行了 基本不截图了
接下来接配置本地YUM源了
[root@localhost ~]# mount /dev/cdrom /mnt/
挂载光驱到临时文件夹mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
挂载成功
[root@localhost ~]# cd /etc/yum.repos.d/
进入文件夹
[root@localhost yum.repos.d]# mkdir backup
创建文件夹
[root@localhost yum.repos.d]# mv CentOS-* backup
移动CentOS开头的文件到backup文件夹
[root@localhost yum.repos.d]# cp backup/CentOS-Media.repo .
复制backup目录下的CentOS-Media.repo的文件夹到本地 注意后面的点要加上
[root@localhost yum.repos.d]# vi CentOS-Media.repo
编辑YUM的配置
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt \\这是要改的地方之一
gpgcheck=1
enabled=1 \\这是要改的地方之一
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@localhost yum.repos.d]# cd /mnt/Packages/
进入光驱的目录
[root@localhost Packages]# yum -y install vim-*
尝试安装VIM,下面显示这些就是成功了!
Loaded plugins: fastestmirror
c6-media | 4.0 kB 00:00 ...
c6-media/primary_db | 4.4 MB 00:00 ...
Setting up Install Process
Examining vim-common-7.2.411-1.8.el6.x86_64.rpm: 2:vim-common-7.2.411-1.8.el6.x86_64
Marking vim-common-7.2.411-1.8.el6.x86_64.rpm to be installed
Examining vim-enhanced-7.2.411-1.8.el6.x86_64.rpm: 2:vim-enhanced-7.2.411-1.8.el6.x86_64
Marking vim-enhanced-7.2.411-1.8.el6.x86_64.rpm to be installed
Examining vim-minimal-7.2.411-1.8.el6.x86_64.rpm: 2:vim-minimal-7.2.411-1.8.el6.x86_64
vim-minimal-7.2.411-1.8.el6.x86_64.rpm: does not update installed package.
Examining vim-X11-7.2.411-1.8.el6.x86_64.rpm: 2:vim-X11-7.2.411-1.8.el6.x86_64
Marking vim-X11-7.2.411-1.8.el6.x86_64.rpm to be installed
Resolving Dependencies
………………………………………………………………………………………………………………………………………………
Dependency Installed:
atk.x86_64 0:1.30.0-1.el6 avahi-libs.x86_64 0:0.6.25-12.el6
cairo.x86_64 0:1.8.8-3.1.el6 cups-libs.x86_64 1:1.4.2-50.el6_4.5
fontconfig.x86_64 0:2.8.0-3.el6 freetype.x86_64 0:2.3.11-14.el6_3.1
gnutls.x86_64 0:2.8.5-10.el6_4.2 gpm-libs.x86_64 0:1.20.6-12.el6
gtk2.x86_64 0:2.20.1-4.el6 hicolor-icon-theme.noarch 0:0.11-1.1.el6
jasper-libs.x86_64 0:1.900.1-15.el6_1.1 libICE.x86_64 0:1.0.6-1.el6
libSM.x86_64 0:1.2.1-2.el6 libX11.x86_64 0:1.5.0-4.el6
libX11-common.noarch 0:1.5.0-4.el6 libXau.x86_64 0:1.0.6-4.el6
libXcomposite.x86_64 0:0.4.3-4.el6 libXcursor.x86_64 0:1.1.13-6.20130524git8f677eaea.el6
libXdamage.x86_64 0:1.1.3-4.el6 libXext.x86_64 0:1.3.1-2.el6
libXfixes.x86_64 0:5.0-3.el6 libXft.x86_64 0:2.3.1-2.el6
libXi.x86_64 0:1.6.1-3.el6 libXinerama.x86_64 0:1.1.2-2.el6
libXrandr.x86_64 0:1.4.0-1.el6 libXrender.x86_64 0:0.9.7-2.el6
libXt.x86_64 0:1.1.3-1.el6 libjpeg-turbo.x86_64 0:1.2.1-1.el6
libpng.x86_64 2:1.2.49-1.el6_2 libthai.x86_64 0:0.1.12-3.el6
libtiff.x86_64 0:3.9.4-9.el6_3 libxcb.x86_64 0:1.8.1-1.el6
pango.x86_64 0:1.28.1-7.el6_3 perl.x86_64 4:5.10.1-136.el6
perl-Module-Pluggable.x86_64 1:3.90-136.el6 perl-Pod-Escapes.x86_64 1:1.04-136.el6
perl-Pod-Simple.x86_64 1:3.13-136.el6 perl-libs.x86_64 4:5.10.1-136.el6
perl-version.x86_64 3:0.77-136.el6 pixman.x86_64 0:0.26.2-5.el6_4
Complete!
好了,本地YUM源就配置成功了!