VirtualBox network / study environment setup for RHEL

摘要:
我访问了RHEL研究材料并再次设置了环境,并没有忘记该过程。1,从LenovoThinkPadT400复制了*.vdi(rhel6std.vdiandRHEL6 Student.vdi)文件,并创建了新的机器

I re-visited the RHEL study material and setup the environment again, noted down the procedure.

1, copied the *.vdi (rhel6std.vdi and RHEL6-Student.vdi) file from Lenovo ThinkPad T400 to my new Lenovo ThinkPad X1, created the new machine by importing the *.vdi, no need to install the system again.

2, setup the network at Linux Instructor and Linux Student
In VirtualBox Manager, File->Preferences...->Network, to create "VirtualBox Host-Only Ethernet Adapter #2" and "VirtualBox Host-Only Ethernet #3".
The Adapter #2 leave it as default,
Adatper#2
The Adapter #3 set as below, server address allocated as 192.168.18.100, server mask as 255.255.255.0, address range as 192.168.18.101 ~ 192.168.18.254:
Adatper#3
In Linux-student->Machine->Settings, set as below,
Student_network
In Linux-Instructor->Machine->Settings, set as below,
Instructor_network
In Windows, the network configuration as below,
Windows ipconfig
Network configuration on Linux-Instructor, as I cloned the machine, I didn't change anything and tried to test the network connection, but failed, the configuration as below,
/etc/sysconfig/network-scripts/glsorig-ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
DNS1="192.168.0.254"
HOSTNAME="instructor.example.com"
HWADDR="00:0C:29:65:C0:CE"
IPADDR="192.168.0.254"
MTU="1500"
NETMASK="255.255.255.0"
NM_CONTROLLED="yes"
ONBOOT="yes"

/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
BOOTPROTO=none
IPADDR=192.168.0.254
NETMASK=255.255.255.0
DNS1=192.168.0.254
HOSTNAME="instructor.example.com"
IPV6INIT=no
NAME="Bridge eth0"
NM_CONTROLLED=no
ONBOOT=yes
PEERNTP="no"
DELAY=0
TYPE=Bridge
USERCTL=no

/etc/sysconfig/network-scripts/ifcfg-br0:0
# gls remote.test interface
DEVICE=br0:0
IPADDR=192.168.1.254
NETMASK=255.255.255.0
TYPE=Ethernet
BOOTPROTO=none
IPV6INIT=no
USERCTL=no

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
DNS1=192.168.0.254
HOSTNAME="instructor.example.com"
IPADDR=192.168.0.254
MTU=1500
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
BRIDGE=br0
TYPE=Ethernet
HWADDR=08:00:27:04:C7:4B
IPV6INIT=no
USERCTL=no

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no

/etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.
Bringing up interface eth1: Device eth0 does not seem to be present, delaying initialization.
As below,
Network_fail
Delete the file /etc/udev/rules.d/70-persistent-net.rules, by commands:
mv 70-persistent-net.rules 70-persistent-net.rules.bak
reboot

encountered below problems,
MAC_address
change the MAC_address in the ethernet configuration file as required, by commands,
ifconfig -a                                    #this is to get the MAC address of the etho0
vim /etc/sysconfig/network-scripts/ifcfg-eth0   #modify the MAC address in the configuration file

service network restart
For Linux-Instructors network configuration, I configured all and I am not sure which file makes it work.
Network configuration on Linux-Student, as below,
[student@server1 Desktop]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.0.101
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.0.254
TYPE=Ethernet
DNS1=192.168.0.254
IPV6INIT=no
USERCTL=no
PEERDNS=no

and by command
setup
In "Device configuration" -> "eth0 (eth0) - Intel Corporation 82540EM Gigabit Ethernet Controller"
Netwok_config
/etc/init.d/NetworkManager stop
chkconfig NetworkManager off
service network restart

3, testing the result from Linux-student and Linux-Instructor
the connection from Linux-student as Linux-student -> Linux-Instructor->Window Host-> Internet, testing ping 8.8.8.8, ping instructor.example.com, ping 192.168.0.254, all successful,
Linux-student-network_test
the connection from Linux -Instructor as, Linux-student -> Linux-Instructor->Window host-> Internet, testing ping 8.8.8.8, ping 192.168.0.101, all successful,
Linux-Instructor-test

4, installation of VirtualBox Additions( VBOXADDITIONS_4.3.12_93733 ), and configure the share the folder between the Windows and Linux
Please refer to this link, http://xionghuilin.com/?p=7

5, reference links,
https://www.centos.org/forums/viewtopic.php?t=26971
https://www.centos.org/forums/viewtopic.php?t=7684


免责声明:文章转载自《VirtualBox network / study environment setup for RHEL》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇SQL Server 排名函数股票型基金买卖方法下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

ubuntu 安装 dnsmasq 解决网速慢的问题

我的系统是Ubuntu-9.10,平时看其他同事用的电脑上网都没有问题,但是我的总是很慢,于是上网找了一个解决办法,果然奏效。先安装dnsmasq,我们用它来做DNS缓存,因为ubuntu慢的原因大部分在域名解析上。sudo apt-get install dnsmasq然后我们编辑dnsmasq的配置文件:sudo vi /etc/dnsmasq.conf...

创建zabbix监控,添加监控机(server、agent、windows)

一、配置两台Linux主机的环境 主机 角色 192.168.200.112 server.zabbix.com 192.168.200.113 agent.server.com 192.168.200.11 windows10 1、修改主机名(主机名一定要修改,很重要) server端 [root@server ~]# vim /et...

设置定时执行任务

本篇主要介绍如何在Linux和Windows上分别创建定时执行任务。 Linux篇 Linux下创建定时执行任务可使用crontab,系统默认自带crontab,在Ubuntu 16.04下进行演示说明。 0.前述 用户所建立的crontab文件中,每一行都代表一项任务,每行的每个字段代表一项设置,它的格式共分为六个字段,前五段是时间设定段,第六段是...

centos7上用docker搭建简单的前后端分离项目

1. 安装docker Docker 要求 CentOS 系统的内核版本高于 3.10 ,首先验证你的CentOS 版本是否支持 Docker 。 通过uname -r命令查看你当前的内核版本 使用 yum 安装docker yum -y install docker 启动 Docker 服务 systemctl start docker 设置...

ubuntu下php安装目录说明

php当前安装目录 /etc/php5/ apache2:      采用APACHE2HANDLER启动 cli:         采用命令启动 fpm        php-fpm启动 fpm2        php-fpm多实例 mods-available   扩展安装目录 以下文件夹均指向mods-available下扩展 /etc/php5...

systemctl管理自定义服务模版

一 日常工作中,有许多需要使用systemctl进行管理服务的时候 [Unit] Description=radius Release [Service] Type=forking ExecStart=/etc/init.d/radius start ExecStop=/etc/init.d/radius stop Restart=on-abnorm...