close

寫一些東西,證明這個部落格還有在呼吸~

同時今天是找尋新礦區的第一天,避免有種在家裡閒閒沒事的罪惡感,所以上來寫一些文章囉!!

好了,今天要提的是OpenVZ,什麼是OpenVZ呢?

這兒~說穿了,就是一種虛擬機器,

在虛擬機器的範疇(VMware、Xen、KVM、Hyper-V、VirtualBox…)上,

使用者多半在意的不是虛擬機器的底層技術為何?

而是在意,使用這東西所付出的代價、容錯的程度、故障排除的速度、有無console介面、是否容易操作…等。

會挑OpenVZ來說明,最大的原因是,我沒有使用過,想說藉由此次機會,研究一下囉~

 


 參考 http://openvz.org/Quick_installation

環境說明:HostOS:CentOS 6.4 64Bits

建議將安裝HostOS時,將/vz目錄掛載在獨立的切割區,供openVZ使用,以利管理。

 

下載repository設定

#wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo

 

匯入GPG-Key

#rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ

 

線上安裝

#yum install vzkernel

 

修改sysctl

#vi /etc/sysctl.conf

# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0

# Enables source route verification
net.ipv4.conf.all.rp_filter = 1

# Enables the magic-sysrq key
kernel.sysrq = 1

# We do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

 

關閉SELinux

#echo "SELINUX=disabled" > /etc/sysconfig/selinux

 

安裝使用者工具

#yum install vzctl vzquota ploop

 

重開機並選擇開啟OpenVZ核心

CentOS 64-bit-2013-08-01-15-46-21.png  

下載樣版檔 

http://download.openvz.org/template/precreated/ 

以ubuntu 12.04_X86為例

不用解壓縮,將檔案放在/var/template/cache

#mkdir -p /vz/template/cache
#cd /vz/template/cache
#wget  http://download.openvz.org/template/precreated/ubuntu-12.04-x86.tar.gz

 

 

arrow
arrow
    全站熱搜

    creative1223 發表在 痞客邦 留言(0) 人氣()