首页 > 代码库 > centos6.8安装openvz

centos6.8安装openvz

参考资料https://openvz.org/Quick_Installation_CentOS_61:首先下载openvz.repowget -P /etc/yum.repos.d/ https://download.openvz.org/openvz.repo2:yum更新安装yum updateyum install vzkernelyum install vzctl vzquota ploop3vi /etc/sysctl.confnet.ipv4.ip_forward = 1net.ipv4.conf.default.proxy_arp = 0net.ipv4.conf.all.rp_filter = 1net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 1net.ipv4.conf.default.send_redirects = 1net.ipv4.conf.all.send_redirects = 0net.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.default.forwarding = 1kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 68719476736kernel.shmall = 4294967296第一步:新建主机cn3131vzctl create 3131 --hostname cn3131 --ostemplate centos-6-x86_64 --ipadd 10.86.3.131 --config defavzctl set 3131 --userpasswd root:firadiovzctl start 3131删掉的指令vzctl stop 3131vzctl delete 3131详细配置命令vzctl set 3131 --save --cpus 4vzctl set 3131 --save --ram 8Gvzctl set 3131 --save --swap 8Gvzctl set 3131 --save --diskspace 20G主机测试用vzctl create 3132 --hostname cn3132 --ostemplate centos-6-x86_64 --ipadd 10.86.3.132 --config vip4vzctl set 3132 --userpasswd root:123vzctl start 3132免费送一台vzctl create 3141 --hostname cn3141 --ostemplate centos-6-x86_64 --ipadd 10.86.3.141vzctl set 3141 --userpasswd root:firadiovzctl create 3143 --hostname cn3143 --ostemplate centos-6-x86_64 --ipadd 10.86.3.143vzctl set 3143 --save --cpus 1vzctl set 3143 --save --ram 8Gvzctl set 3143 --save --swap 8Gvzctl set 3143 --save --diskspace 20G

 

centos6.8安装openvz