虚拟机和linux都安装完成之后,我们就可以在linux 进行如下操作:
1、配置linux网络:
[root@localhost root]# cd /etc/sysconfig/network-scripts
[root@localhost network-scripts]# ls
ifcfg-eth0 ifdown-ipv6 ifup ifup-isdn ifup-sit
ifcfg-lo ifdown-isdn ifup-aliases ifup-plip ifup-sl
ifdown ifdown-post ifup-cipcb ifup-plusb ifup-wireless
ifdown-aliases ifdown-ppp ifup-ippp ifup-post init.ipv6-global
ifdown-cipcb ifdown-sit ifup-ipv6 ifup-ppp network-functions
ifdown-ippp ifdown-sl ifup-ipx ifup-routes network-functions-ipv6
[root@localhost network-scripts]# vim ifcfg-eth0
进入:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.2.95.100
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=no
GATEWAY=172.2.95.1
TYPE=Ethernet
NETWORK=172.2.95.0
BROADCAST=172.2.95.255
键入" i "插入数据,完成之后,键入‘Esc’,然后输入‘:wq’,敲回车就可以保存退出。
2、查看我们更改的信息。
[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.2.95.100
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=no
GATEWAY=172.2.95.1
TYPE=Ethernet
NETWORK=172.2.95.0
BROADCAST=172.2.95.255
3、重启网络:
[root@localhost network-scripts]# service network restart
正在关闭接口 eth0: [ 确定 ]
关闭环回接口: [ 确定 ]
设置网络参数: [ 确定 ]
弹出环回接口: [ 确定 ]
弹出界面 eth0: [ 确定 ]
[root@localhost network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:3F:6C:5F
inet addr:172.2.95.100 Bcast:172.2.95.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:391 errors:0 dropped:0 overruns:0 frame:0
TX packets:197 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:86092 (84.0 Kb) TX bytes:37094 (36.2 Kb)
Interrupt:5 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:561190 errors:0 dropped:0 overruns:0 frame:0
TX packets:561190 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:38375751 (36.5 Mb) TX bytes:38375751 (36.5 Mb)
[root@localhost network-scripts]# ping 172.2.95.100
[root@localhost network-scripts]#vim /etc/hosts ----更改主机名
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
172.2.95.100 oracle
~
[root@localhost network-scripts]# cd /etc/sysconfig/
[root@localhost sysconfig]# ls
amd identd pgsql
apmd init radvd
apm-scripts installinfo rawdevices
arpwatch irda redhat-config-securitylevel
authconfig irqbalance redhat-config-users
cbq keyboard redhat-logviewer
clock kudzu rhn
console mouse samba
desktop mouse.BeforeVMwareToolsInstall sendmail
devlabel named spamassassin
dhcpd netdump squid
dhcrelay netdump_id_dsa syslog
firstboot netdump_id_dsa.pub tux
gpm network ups
grub networking vncservers
harddisks network-scripts xinetd
hwconf ntpd yppasswdd
i18n pcmcia
[root@localhost sysconfig]#vim network ------更改主机名
NETWORKING=yes
HOSTNAME=oracle
重启系统;reboot
4、OS的配置: