攒一台电脑
以virtualbox为例:
插入光盘并设置为从光盘启动
以virtualbox为例:
安装RHEL5
只选择base组件,其它什么都不要选择:
虚拟机的网络模式
桥接:虚拟机与物理平行地接入局域网(同网段)
Host-only:仅仅物理与虚拟机之间可以互相通信(一根网线直接把两台电脑连接起来)
NAT:你的物理机是路由器,虚拟机通过物理机对外上网
RHEL5网络配置
编辑网卡配置文件:
:q! 不保存退出
重启网络服务:
在物理机上测试与虚拟机的连通性:
使用xmanager管理服务器
为虚拟机创建快照
关闭SELINUX
# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
关闭防火墙
[root@ocp ~]# service iptables stop
[root@ocp ~]# chkconfig iptables off
修改/etc/hosts文件
# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.10.244 ocp.example.com
配置yum源