日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內(nèi)最全IT社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當(dāng)前位置:首頁 > 服務(wù)器 > rhel6.4網(wǎng)絡(luò)安裝kvm虛擬機

rhel6.4網(wǎng)絡(luò)安裝kvm虛擬機

來源:程序員人生   發(fā)布時間:2014-12-16 08:51:59 閱讀次數(shù):3235次

本次實驗環(huán)境如圖1所示


1:安裝條件條件:

1.確保主板支持intel-VT或AMD-V

2.VMware里的rhel 6.4已裝好,并且已設(shè)置該虛擬機也支持虛擬化,設(shè)置以下所示


3.通過命令確認(rèn)是不是支持intel-VT或AMD-V

[root@localhost ~]# egrep --color "vmx|svm" /proc/cpuinfo

有結(jié)果返回就說明支持,反之亦然

 

2:安裝KVM并配置網(wǎng)卡橋接(橋接到eth1上),在已安裝的rhel 6.4 (圖 1所示)上操作

1.安裝KVM

[root@localhost ~]#yum -y groupinstall Virtualization "Virtualization Client" "Virtualization Platform" "Virtualization Tools"

[root@localhost ~]# /etc/init.d/libvirtd start ; chkconfig libvirtd on

[root@localhost ~]#/etc/init.d/libvirt-guests start ; chkconfig libvirt-guests on

 

2.網(wǎng)橋設(shè)置

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

HWADDR=00:0C:29:3F:5A:2e

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

IPADDR=172.16.1.1

NETMASK=255.255.255.0

BRIDGE=br0                                                                                      //添加這1行

 

[root@localhost network-scripts]# pwd

/etc/sysconfig/network-scripts

[root@localhost network-scripts]# cp ifcfg-eth1 ifcfg-br0

[root@localhost network-scripts]# cat ifcfg-br0

DEVICE=br0                                                                                       //裝備名為br0

TYPE=Bridge                                                                                     //設(shè)別類型為Bridge

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

IPADDR=172.16.1.1

NETMASK=255.255.255.0            

重啟網(wǎng)絡(luò)

[root@localhost network-scripts]#/etc/init.d/network restart

查看網(wǎng)橋信息

[root@localhost network-scripts]# brctl show

bridge name     bridge id               STP enabled     interfaces

br0             8000.000c293f5a2e       no                    eth1                                                  //已橋接到eth1上

virbr0          8000.525400635d23       yes                virbr0-nic

 

3:配置dhcp+tftp+vsftpd網(wǎng)絡(luò)安裝服務(wù)器

◆.安裝dhcp

1.[root@localhost ~]# yum -y install dhcp

 

2.配置dhcp

[root@localhost ~]# grep -v "^#"/etc/dhcp/dhcpd.conf |grep ^[^$]

default-lease-time 600;

max-lease-time 7200;

next-server     172.16.1.1;

filename        "pxelinux.0";

ddns-update-style none;

log-facility local7;

subnet 172.16.1.0 netmask 255.255.255.0 {

 range 172.16.1.2 172.16.1.10;

}

[root@localhost ~]#

 

3.啟動dhcp服務(wù)

[root@localhost ~]# /etc/init.d/dhcpd start;chkconfig dhcpd on

Starting dhcpd:                                           [  OK  ]

[root@localhost ~]#

 

◆.安裝tftp-server和syslinux

1.[root@localhost ~]# yum -y install tftp-server syslinux

 

2.配置tftp

[root@localhost ~]# grep -v "^#"/etc/xinetd.d/tftp

service tftp

{

       socket_type             = dgram

       protocol                = udp

       wait                    = yes

       user                    = root

       server                  =/usr/sbin/in.tftpd

       server_args             = -s/var/lib/tftpboot

       disable                 = no                                                                                    //把yes改成no

       per_source              = 11

       cps                     = 100 2

       flags                   = IPv4

}

[root@localhost tftpboot]# pwd

/var/lib/tftpboot

[root@localhost tftpboot]# cp /usr/share/syslinux/pxelinux.0 ./

[root@localhost tftpboot]# mkdir pxelinux.cfg

[root@localhost tftpboot]# cp /media/rhel/isolinux/* ./   ///media/rhel為光盤掛載目錄

[root@localhost tftpboot]# cp isolinux.cfg pxelinux.cfg/default

[root@localhost tftpboot]# chmod 644 pxelinux.cfg/default

[root@localhost tftpboot]# vi pxelinux.cfg/default (其中紅色為更改處)

default linux

#prompt 1

timeout 600

 

display boot.msg

 

menu background splash.jpg

menu title Welcome to Red Hat EnterpriseLinux 6.4!

menu color border 0 #ffffffff #00000000

menu color sel 7 #ffffffff #ff000000

menu color title 0 #ffffffff #00000000

menu color tabmsg 0 #ffffffff #00000000

menu color unsel 0 #ffffffff #00000000

menu color hotsel 0 #ff000000 #ffffffff

menu color hotkey 7 #ffffffff #ff000000

menu color scrollbar 0 #ffffffff #00000000

 

label linux

 menu label ^Install or upgrade an existing system

 menu default

 kernel vmlinuz

 append initrd=initrd.img ksdevice=eth0 ks=ftp://172.16.1.1/rhel6.4.cfg

label vesa

 menu label Install system with ^basic video driver

 kernel vmlinuz

 append initrd=initrd.img xdriver=vesa nomodeset

label rescue

 menu label ^Rescue installed system

 kernel vmlinuz

 append initrd=initrd.img rescue

label local

 menu label Boot from ^local drive

 localboot 0xffff

label memtest86

 menu label ^Memory test

 kernel memtest

 append -

[root@localhost tftpboot]#

 

3.啟動xinentd服務(wù)

[root@localhost ~]# /etc/init.d/xinetd start ; chkconfig xinetd on

Starting xinetd:                                           [  OK  ]

[root@localhost ~]#

 

◆安裝vsftpd

1. [root@localhost ~]# yum -y install vsftpd

2.啟動vsftpd服務(wù)

[root@localhost ~]# /etc/init.d/vsftpd start ; chkconfig vsftpd on

Starting vsftpd for vsftpd:                                [  OK  ]

[root@localhost ~]#

3.掛載安裝光盤到ftp目錄下

[root@localhost ~]# mount /dev/cdrom/ var/ftp/pub/

 

◆配置ks文件

1.ks文件內(nèi)容以下

[root@localhost ~]# cat rhel6.4.cfg

#platform=x86, AMD64, or Intel EM64T

#version=DEVEL

# Firewall configuration

firewall --disabled

# Install OS instead of upgrade

install

# Use network installation

url --url="ftp://172.16.1.1/pub"

# Root password

rootpw --iscrypted$1$p4HkNd7X$xOiflpAb0Rsi6Ec2R1F9l1

# System authorization information

auth --useshadow  --passalgo=sha512

# Use text mode install

text

# System keyboard

keyboard us

# System language

lang en_US

# SELinux configuration

selinux --disabled

# Do not configure the X Window System

skipx

# Installation logging level

logging --level=info

# Reboot after installation

reboot

# System timezone

timezone Asia/Shanghai

# Network information

network --bootproto=dhcp --device=eth0 --onboot=on

# System bootloader configuration

bootloader --location=mbr

# Clear the Master Boot Record

zerombr

# Partition clearing information

clearpart --all --initlabel

# Disk partitioning information

part / --fstype="ext4"--ondisk=vda --size=4000

part swap --fstype="swap" --grow--ondisk=vda --size=1

 

%packages

@base

gcc

gcc-c++

libstdc++-devel

make

openssh-clients

acpid

 

%end

 

%post

 

echo"ttyS0">>/etc/securetty

sed -i '/quiet/a console=ttyS0' /boot/grub/grub.conf

sed -i '/quiet/N; s/ / /' /boot/grub/grub.conf

 

cat >>/etc/yum.repos.d/network.repo<<EOF

[Server]

name=Red Hat Enterprise Linux 6.4

baseurl=ftp://172.16.1.1/pub/Server

enabled=1

gpgcheck=0

 

 

[HighAvailability]

name=Red Hat Enterprise Linux 6.4

baseurl=ftp://172.16.1.1/pub/HighAvailability

enabled=1

gpgcheck=0

 

 

[LoadBalancer]

name=Red Hat Enterprise Linux 6.4

baseurl=ftp://172.16.1.1/pub/LoadBalancer

enabled=1

gpgcheck=0

 

[ResilientStorage]

name=Red Hat Enterprise Linux 6.4

baseurl=ftp://172.16.1.1/pub/ResilientStorage

enabled=1

gpgcheck=0

 

[ScalableFileSystem]

name=Red Hat Enterprise Linux 6.4

baseurl=ftp://172.16.1.1/pub/ScalableFileSystem

enabled=1

gpgcheck=0

EOF

[root@localhost ~]#

 

注:ks文件制作這里不做演示,我已提早做好

 

2.復(fù)制rhel6.4.cfg到/var/ftp/目錄下

[root@localhost ~]# cp rhel6.4.cfg /var/ftp/

 

4:開始安裝虛擬機,virt-manager圖形界面安裝在這里不做演示,這里只演示通過ks文件安裝

1.location+"extra-args"方式安裝

[root@localhost ~]# virt-install

> --name rhel6.4⑴

> --ram 1024

> --vcpus 1

> --os-type=linux                            //可以不需要這句,只支持URL方式

> --os-variant=rhel6                        //可以不需要這句,只支持URL方式

> --network bridge=br0

> --file /var/lib/libvirt/images/rhel6.4⑴.img

>--file-size 5

>--nonsparse

> --location ftp://172.16.1.1/pub/

> --extra-args "ks=ftp

生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關(guān)閉
程序員人生
主站蜘蛛池模板: 国产色播视频 | 在线一级视频 | 成人小视频在线 | 99热在线只有精品 | 激情网综合 | 久久久精 | 精精国产xxxx视频在线播放 | 亚洲高清在线播放 | 免费在线毛片 | 久久久www成人免费精品张筱雨 | 欧美日韩精品电影 | 日韩有码一区二区三区 | 国产精品成人在线 | 日韩在线观看视频免费 | 99精品一区 | 国产精品一区二区三区四区 | 日韩欧美在线一区二区 | 极品麻豆 | 青草青青在线视频 | 欧美日韩国内 | 久久美女性网 | 成人性视频在线 | 99在线免费视频 | 一区二区国产精品视频 | 欧美日韩一区二区三区不卡 | 久久精品视频一区 | 日韩精品免费在线视频 | 久久国产a | 精品专区| 日本中文字幕在线视频 | 久久久久久国产 | 欧美日韩电影在线观看 | 91欧美一区二区三区成人 | 欧美日韩第一页 | 99久久精品免费看蜜桃的推荐词 | 一级毛片免费版 | 日韩精品三区 | 日韩专区中文字幕 | 一二三区在线 | 精品99在线观看 | 理论片在线看片三免费 |