在Debian Etch上安装使用OpenVZvzctl set 102 --privvmpages 500000:750000 --save # give it some memory CHECKME vzctl start 102 vzctl exec 102 passwd and (yes, I see there are not too many interesting changes)... vzctl create 103 --ostemplate debian-etch-20061218-amd64 --config vps.basic and start the first VPS (vzctl start 101) since we took it offline for using it as the basis of our template, remember? now we have 3 VPSs running. Test it with vzlist, output: VEID NPROC STATUS IP_ADDR HOSTNAME
101 5 running 10.0.0.101 test101.mytest.org
102 5 running 10.0.0.102 test102.mytest.org
103 5 running 10.0.0.103 test103.mytest.org
VPSs need some memory, be default they are given way too little, so please set the vmguarpages, oomguarpages, privvmpages, etc, etc, etc, in you VPS confiv files (/etc/vz/conf/*.conf) to some sane values -- a page equals 4Kb. The errors that occure because your restricted your VPS too much can be read in by executing: vzctl exec 101 cat /proc/user_beancounters The last column of the UBC (user_beancounter) should only contain zeros, if ohterwise try raising some barriers and limits. Consult the OpenVZ documentation for more information on the individual options. Now we can continue setting up our apaches, postfixes, etceteras on the VPSs... Good luck! Ohh and below my /etc/vz/conf/101.conf file, it stinks, I just raised some values bluntly because we had error in the user_beancounter. cat /etc/vz/conf/101.conf # Copyright (C) 2000-2006 SWsoft. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # VERSION="2" ONBOOT="yes" # UBC parameters (in form of barrier:limit) # Primary parameters AVNUMPROC="40:40" NUMPROC="255:255" NUMTCPSOCK="80:80" NUMOTHERSOCK="255:255" VMGUARPAGES="500000:9223372036854775807" # Secondary parameters KMEMSIZE="33554432:36909875" TCPSNDBUF="319488:524288" TCPRCVBUF="524288:524288" OTHERSOCKBUF="439296:439296" DGRAMRCVBUF="132096:132096" OOMGUARPAGES="500000:9223372036854775807" # Auxiliary parameters LOCKEDPAGES="32:32" SHMPAGES="8192:8192" PRIVVMPAGES="500000:750000" NUMFILE="10240:10240" NUMFLOCK="100:110" NUMPTY="16:16" NUMSIGINFO="256:256" DCACHESIZE="1048576:1097728" PHYSPAGES="0:9223372036854775807" NUMIPTENT="128:128" # Disk quota parameters (in form of softlimit:hardlimit) DISKSPACE="1048576:1153434" DISKINODES="200000:220000" QUOTATIME="0" # CPU fair sheduler parameter CPUUNITS="1000" OFFLINE_MANAGEMENT="yes" VE_ROOT="/var/lib/vz/root/$VEID" VE_PRIVATE="/var/lib/vz/private/$VEID" OSTEMPLATE="debian-3.1-amd64-minimal" ORIGIN_SAMPLE="vps.basic" HOSTNAME="101.mytest.org" IP_ADDRESS="10.0.0.101" NAMESERVER="10.0.0.2" 原文链接:http://www.howtoforge.com/debian_etch_openvz 上一篇:在Debian中打造属于自己的deb包 下一篇:Debian+vsftpd+MySQL实现虚拟用户 更多相关文章
|
推荐文章
精彩文章
|