OpenVZ master node部署后续

wget http://download.openvz.org/openvz.repo -O /etc/yum.repos.d/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
yum update -y
yum install vzkernel -y
yum install vzctl vzquota -y
wget  http://dl.kvm.la/shell/bash_profile -O /root/.bash_profile
wget http://dl.kvm.la/conf/ve-vswap-solus.conf-sample -O /etc/vz/conf/ve-vswap-solus.conf-sample
wget http://down.kvm.la/conf/sysctl.conf -O /etc/sysctl.conf
yum install -y epel-release
yum install -y denyhosts rsync iftop tcpdump ploop mtr fuse-sshfs fuse-devel
chkconfig --add denyhosts
chkconfig --level 35 denyhosts on
service denyhosts restart
cat>/etc/sysconfig/modules/openvz.modules<<EOF
#!/bin/sh
/sbin/modprobe --first-time fuse
/sbin/modprobe ppp-compress-18
/sbin/modprobe pppoatm
/sbin/modprobe ppp_generic
/sbin/modprobe ppp_async
/sbin/modprobe ppp_deflate
/sbin/modprobe ppp_mppe
/sbin/modprobe pppol2tp
/sbin/modprobe xfrm_ipcomp
/sbin/modprobe tun
/sbin/modprobe nfs
/sbin/modprobe af_key
/sbin/modprobe esp4
/sbin/modprobe esp6
/sbin/modprobe ah4
/sbin/modprobe ah6
/sbin/modprobe xfrm4_tunnel
/sbin/modprobe xfrm4_mode_tunnel
/sbin/modprobe xfrm4_mode_transport
/sbin/modprobe xfrm4_mode_beet
/sbin/modprobe xfrm6_mode_tunnel
/sbin/modprobe xfrm6_mode_transport
/sbin/modprobe xfrm6_mode_beet
/sbin/modprobe xfrm6_mode_ro
/sbin/modprobe ipcomp6
/sbin/modprobe ipcomp
/sbin/modprobe xt_state
/sbin/modprobe ipip
/sbin/modprobe ip_gre
/sbin/modprobe tcp_hybla
/sbin/modprobe tcp_htcp
/sbin/modprobe vzcpt
EOF
chmod 755 /etc/sysconfig/modules/openvz.modules
/etc/sysconfig/modules/openvz.modules
cd /vz/template/cache
wget https://download.openvz.org/template/precreated/centos-6-x86.tar.gz -c -O centos-6-x86.tar.gz
wget https://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz -c -O  centos-6-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/centos-7-x86_64.tar.gz -c -O  centos-7-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/debian-6.0-x86.tar.gz -c -O  debian-6.0-x86.tar.gz
wget https://download.openvz.org/template/precreated/debian-6.0-x86_64.tar.gz -c -O  debian-6.0-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/debian-7.0-x86.tar.gz -c -O  debian-7.0-x86.tar.gz
wget https://download.openvz.org/template/precreated/debian-7.0-x86_64.tar.gz -c -O  debian-7.0-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/debian-8.0-x86_64.tar.gz -c -O  debian-8.0-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/debian-9.0-x86_64.tar.gz -c -O  debian-8.0-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/fedora-23-x86_64.tar.gz -c -O  fedora-22-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/scientific-6-x86.tar.gz -c -O  scientific-6-x86.tar.gz
wget https://download.openvz.org/template/precreated/scientific-6-x86_64.tar.gz -c -O  scientific-6-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/suse-13.1-x86.tar.gz -c -O  suse-13.1-x86.tar.gz
wget https://download.openvz.org/template/precreated/suse-13.1-x86_64.tar.gz -O  -c suse-13.1-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/suse-13.2-x86_64.tar.gz -c -O  suse-13.2-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/ubuntu-15.04-x86_64.tar.gz -c -O  ubuntu-15.04-x86_64.tar.gz
wget https://download.openvz.org/template/precreated/ubuntu-16.04-x86_64.tar.gz -c -O  ubuntu-16.04-x86_64.tar.gz

添加新评论 »