本來在虛擬機上安裝的centos6.0(Final)版本系統,安裝的後,由於每次登陸用crt
登,但默認開機不在虛擬機上登陸,crt連不上(網卡沒啟動)。
接下來 就修改一下
查看一下使用的網卡 。
[hcr@slave2 ~]$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:8C:BF:DF
inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe8c:bfdf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:220 errors:0 dropped:0 overruns:0 frame:0
TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21357 (20.8 KiB) TX bytes:26980 (26.3 KiB)
Interrupt:19 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 b) TX bytes:240 (240.0 b)
然後 進入到配置linux網絡目錄
[hcr@slave2 ~]$ cd /etc/sysconfig/network-scripts修改的網卡配置如下(ONBOOT=yes 開機自啟動配置)
[hcr@slave2 network-scripts]$ cat ifcfg-eth1
DEVICE="eth1"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
IPADDR=192.168.1.13
PREFIX=24
GATEWAY=192.168.1.1
HWADDR=00:0C:29:8C:BF:DF
配置後,接下來再重啟用crt連接操作即可,不用每次都先登錄虛擬機了