1 |
neysx 06/03/17 10:26:33 |
2 |
|
3 |
Modified: vserver-howto.xml |
4 |
Log: |
5 |
#Update from #126491 |
6 |
|
7 |
Revision Changes Path |
8 |
1.7 xml/htdocs/doc/en/vserver-howto.xml |
9 |
|
10 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml?rev=1.7&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
11 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml?rev=1.7&content-type=text/plain&cvsroot=gentoo |
12 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml.diff?r1=1.6&r2=1.7&cvsroot=gentoo |
13 |
|
14 |
Index: vserver-howto.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/vserver-howto.xml,v |
17 |
retrieving revision 1.6 |
18 |
retrieving revision 1.7 |
19 |
diff -u -r1.6 -r1.7 |
20 |
--- vserver-howto.xml 13 Mar 2006 18:55:37 -0000 1.6 |
21 |
+++ vserver-howto.xml 17 Mar 2006 10:26:33 -0000 1.7 |
22 |
@@ -1,5 +1,5 @@ |
23 |
<?xml version='1.0' encoding="UTF-8"?> |
24 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vserver-howto.xml,v 1.6 2006/03/13 18:55:37 nightmorph Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vserver-howto.xml,v 1.7 2006/03/17 10:26:33 neysx Exp $ --> |
26 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
27 |
|
28 |
<guide link="/doc/en/vserver-howto.xml"> |
29 |
@@ -21,8 +21,8 @@ |
30 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
31 |
<license/> |
32 |
|
33 |
-<version>1.4</version> |
34 |
-<date>2006-03-13</date> |
35 |
+<version>1.5</version> |
36 |
+<date>2006-03-17</date> |
37 |
|
38 |
<chapter> |
39 |
<title>Introduction</title> |
40 |
@@ -70,7 +70,7 @@ |
41 |
</ti> |
42 |
</tr> |
43 |
<tr> |
44 |
- <th>util-vserver, vserver utils</th> |
45 |
+ <th>util-vserver</th> |
46 |
<ti> |
47 |
The <c>util-vserver</c> package contains all programs necessary for |
48 |
maintaining your virtual servers |
49 |
@@ -103,8 +103,7 @@ |
50 |
|
51 |
Linux VServer ---> |
52 |
[ ] Enable Legacy Kernel API |
53 |
-<comment>(Do not set!)</comment> |
54 |
- [ ] Disable Legacy Networking Kernel API |
55 |
+ [*] Disable Legacy Networking Kernel API |
56 |
<comment>(Highly recommended)</comment> |
57 |
[*] Enable Proc Security |
58 |
[*] Enable Hard CPU Limits |
59 |
@@ -114,8 +113,10 @@ |
60 |
</pre> |
61 |
|
62 |
<note> |
63 |
-If you are using reiserfs as your filesystem, you will need to enable extended |
64 |
-attributes for reiserfs in your kernel config. |
65 |
+If you are using reiserfs as filesystem on the partition where guest images are |
66 |
+stored, you will need to enable extended attributes for reiserfs in your |
67 |
+kernel config and additionally add the <c>attrs</c> option in |
68 |
+<path>/etc/fstab</path>. |
69 |
</note> |
70 |
|
71 |
<pre caption="Configure reiserfs options"> |
72 |
@@ -124,13 +125,8 @@ |
73 |
[*] ReiserFS extended attributes |
74 |
</pre> |
75 |
|
76 |
-<p> |
77 |
-Additionally, you will need to specify the <c>attrs</c> option in |
78 |
-<path>/etc/fstab</path> for your vserver partition: |
79 |
-</p> |
80 |
- |
81 |
<pre caption="Example fstab with extended attributes"> |
82 |
-/dev/hdb /vserver reiserfs noatime,attrs 0 0 |
83 |
+/dev/hdb /vservers reiserfs noatime,attrs 0 0 |
84 |
</pre> |
85 |
|
86 |
<p> |
87 |
@@ -143,7 +139,7 @@ |
88 |
# <i>make</i> |
89 |
<comment>(Installing)</comment> |
90 |
# <i>make modules_install</i> |
91 |
-# <i>cp arch/i386/boot/bzImage /boot/kernel-<KERNELVERSION>-vserver-<VSERVERVERSION></i> |
92 |
+# <i>cp arch/<arch>/boot/bzImage /boot/kernel-<KERNELVERSION>-vserver-<VSERVERVERSION></i> |
93 |
<comment>(Edit bootloader config file as required and)</comment> |
94 |
# <i>reboot</i> |
95 |
</pre> |
96 |
@@ -156,23 +152,26 @@ |
97 |
|
98 |
<p> |
99 |
To maintain your virtual servers you need the util-vserver package which |
100 |
-contains all necessary programs and many usefull features. |
101 |
+contains all necessary programs and many useful features. Be aware that there |
102 |
+is also a package called <c>vserver-utils</c>. It is a new incarnation of the |
103 |
+user-space implementation of the VServer kernel API, but not yet usable for |
104 |
+production use. |
105 |
</p> |
106 |
|
107 |
<note> |
108 |
-The tools and features used in this HowTo require |
109 |
-<c>>=sys-apps/util-vserver-0.30.208-r3</c>. You may have to keyword it first. |
110 |
+This version of the howto requires features only available in |
111 |
+<c>>=sys-apps/util-vserver-0.30.210-r6</c>. You may have to keyword/upgrade |
112 |
+it first. |
113 |
</note> |
114 |
|
115 |
-<pre caption="Install vserver utils"> |
116 |
+<pre caption="Install util-vserver"> |
117 |
# <i>emerge util-vserver</i> |
118 |
</pre> |
119 |
|
120 |
<p> |
121 |
You have to run the <c>vprocunhide</c> command after every reboot in order to |
122 |
-setup <path>/proc</path> permissions correctly for vserver use. An init script has |
123 |
-been installed by util-vserver. To use it you should add it to a |
124 |
-runlevel: |
125 |
+setup <path>/proc</path> permissions correctly for vserver use. An init script |
126 |
+has been installed by util-vserver. To use it you should add it to a runlevel: |
127 |
</p> |
128 |
|
129 |
<pre caption="vserver init script"> |
130 |
@@ -180,8 +179,13 @@ |
131 |
# <i>/etc/init.d/vservers start</i> |
132 |
</pre> |
133 |
|
134 |
+<note> |
135 |
+This init script will also start your default vservers. Read below for more |
136 |
+information. |
137 |
+</note> |
138 |
+ |
139 |
<p> |
140 |
-The vshelper script is used to correctly stop and restart virtual servers. You |
141 |
+The vshelper script is used to restart virtual servers correctly. You |
142 |
have to tell the kernel where the vshelper script is located: |
143 |
</p> |
144 |
|
145 |
@@ -219,7 +223,7 @@ |
146 |
<i>--hostname gentoo \</i> |
147 |
<i>--context 1253 \</i> |
148 |
<i>--interface eth0:192.168.1.253/24 \</i> |
149 |
- <i>stage3 /path/to/stage3-tarball.tar.bz2</i> |
150 |
+ <i>stage3 /path/to/stage3-<arch>-<date>.tar.bz2 <arch></i> |
151 |
</pre> |
152 |
|
153 |
<note> |
154 |
@@ -247,7 +251,7 @@ |
155 |
|
156 |
<pre caption="Create template tarball"> |
157 |
# <i>cd /vservers/gentoo-template</i> |
158 |
-# <i>tar cjvpf ../gentoo-template.tar.bz2 ./</i> |
159 |
+# <i>tar cjvpf ../gentoo-template-<arch>-<date>.tar.bz2 ./</i> |
160 |
</pre> |
161 |
|
162 |
<p> |
163 |
@@ -260,12 +264,12 @@ |
164 |
<i>--hostname myguest \</i> |
165 |
<i>--context 1252 \</i> |
166 |
<i>--interface eth0:192.168.1.252/24 \</i> |
167 |
- <i>template ./gentoo-template.tar.bz2</i> |
168 |
+ <i>template ./gentoo-template-<arch>-<date>.tar.bz2 <arch></i> |
169 |
</pre> |
170 |
|
171 |
<note> |
172 |
-You should use a shared portage tree for your guests to keep guests small in |
173 |
-size. Edit <path>/etc/vservers/myguest/fstab</path> and uncomment the entries |
174 |
+You should use a shared portage tree to keep guests small in size. Edit |
175 |
+<path>/etc/vservers/myguest/fstab</path> and uncomment the entries |
176 |
for <path>/usr/portage</path> and <path>/usr/portage/distfiles</path>. Guests |
177 |
will have read-only access to <path>/usr/portage</path> and read-write access |
178 |
to <path>/usr/portage/distfiles</path>. |
179 |
@@ -302,13 +306,140 @@ |
180 |
|
181 |
</body> |
182 |
</section> |
183 |
+</chapter> |
184 |
+ |
185 |
+<chapter> |
186 |
+<title>Maintenance made easy</title> |
187 |
+<section> |
188 |
+<title>Start guests on boot</title> |
189 |
+<body> |
190 |
+ |
191 |
+<p> |
192 |
+You can start certain guests during boot. Each guest can be assigned a MARK. |
193 |
+Now everything you have to do is configure these MARKs in the guests |
194 |
+configuration and tell the init script to run all MARKed guests. |
195 |
+</p> |
196 |
+ |
197 |
+<pre caption="Configure MARKs for each guest"> |
198 |
+<comment>(Do this for every guest you want to start)</comment> |
199 |
+# <i>mkdir -p /etc/vservers/myguest/apps/init</i> |
200 |
+# <i>echo "default" > /etc/vservers/myguest/apps/init/mark</i> |
201 |
+</pre> |
202 |
+ |
203 |
+<note> |
204 |
+Since all guests marked with "default" are started by default, nothing more has |
205 |
+to be done. If you have different marks you should also update |
206 |
+<path>/etc/conf.d/vservers</path>. |
207 |
+</note> |
208 |
+ |
209 |
+</body> |
210 |
+</section> |
211 |
+<section> |
212 |
+<title>Gentoo goodies</title> |
213 |
+<body> |
214 |
+ |
215 |
+<p> |
216 |
+The util-vserver ebuild has installed some goodies for Gentoo guests. You know |
217 |
+<c>vserver-new</c> from the previous chapter. In this chapter, you will learn |
218 |
+how to use <c>vesync</c> and <c>vemerge</c> to keep portage in sync as well as |
219 |
+<c>vupdateworld</c> and <c>vdispatch-conf</c> to update guests. |
220 |
+</p> |
221 |
+ |
222 |
+</body> |
223 |
+</section> |
224 |
+<section> |
225 |
+<title>Keep portage in sync</title> |
226 |
+<body> |
227 |
+ |
228 |
+<p> |
229 |
+The script <c>vesync</c> will help you to keep the metadata cache and overlays |
230 |
+in sync. <c>vemerge</c> is a simple wrapper for <c>emerge</c> in guests. |
231 |
+</p> |
232 |
+ |
233 |
+<pre caption="Examples"> |
234 |
+<comment>(Sync metadata for 'myguest')</comment> |
235 |
+# <i>vesync myguest</i> |
236 |
+<comment>(Sync metadata for all guests)</comment> |
237 |
+# <i>vesync -a</i> |
238 |
+<comment>(Sync metadata for all guests except 'myguest')</comment> |
239 |
+# <i>vesync -a -e myguest</i> |
240 |
+<comment>(Sync 'myoverlay' for all guests)</comment> |
241 |
+# <i>vesync -a \</i> |
242 |
+ <i>--overlay /usr/local/overlays/myoverlay \</i> |
243 |
+ <i>--overlay-host rsync://rsync.myhost.com/myoverlay \</i> |
244 |
+ <i>--overlay-only</i> |
245 |
+<comment>(emerge app-editors/vim in 'myguest')</comment> |
246 |
+# <i>vemerge myguest app-editors/vim -va</i> |
247 |
+</pre> |
248 |
+ |
249 |
+<note> |
250 |
+This script requires you to have a shared portage tree. |
251 |
+</note> |
252 |
+ |
253 |
+</body> |
254 |
+</section> |
255 |
+<section> |
256 |
+<title>Update guests</title> |
257 |
+<body> |
258 |
+ |
259 |
+<p> |
260 |
+Gentoo guests can share packages to save compilation time. In order to use |
261 |
+shared packages, you have to create a central directory for packages on the |
262 |
+host. We will use <path>/var/cache/vpackages</path> on the host and mount it |
263 |
+to <path>/usr/portage/packages</path> in every guest. |
264 |
+</p> |
265 |
+ |
266 |
+<pre caption="Add bind mount to guest configuration"> |
267 |
+# <i>mkdir -p /var/cache/vpackages</i> |
268 |
+# <i>$EDITOR /etc/vservers/myguest/fstab</i> |
269 |
+<comment>(Add this line at the end)</comment> |
270 |
+/var/cache/vpackages /usr/portage/packages none bind,rw 0 0 |
271 |
+</pre> |
272 |
+ |
273 |
+<p> |
274 |
+Now you can use <c>vupdateworld</c> to update every guest. The command is |
275 |
+equivalent to something like <c>emerge --deep --update --newuse world</c> |
276 |
+depending on command line options. |
277 |
+</p> |
278 |
+ |
279 |
+<pre caption="vupdateworld examples"> |
280 |
+<comment>(Pretend update for 'myguest')</comment> |
281 |
+# <i>vupdateworld -p myguest</i> |
282 |
+<comment>(Update 'myguest' using binary packages)</comment> |
283 |
+# <i>vupdateworld -k myguest</i> |
284 |
+<comment>(Update all guests using binary packages)</comment> |
285 |
+# <i>vupdateworld -ka</i> |
286 |
+</pre> |
287 |
+ |
288 |
+<note> |
289 |
+In order to get binary packages you can either use PORTAGE_BINHOST (see <c>man |
290 |
+make.conf</c>) or set FEATURES="buildpkg" in one or more guests. |
291 |
+</note> |
292 |
+ |
293 |
+<p> |
294 |
+After a successful update you can easily update all configuration files with |
295 |
+<c>vdispatch-conf</c>. It is a simple wrapper for <c>dispatch-conf</c> and |
296 |
+behaves exactly the same. |
297 |
+</p> |
298 |
+ |
299 |
+<pre caption="vdispatch-conf examples"> |
300 |
+<comment>(Update configuration files for 'myguest')</comment> |
301 |
+# <i>vdispatch-conf myguest</i> |
302 |
+<comment>(Update configuration files for all guests)</comment> |
303 |
+# <i>vdispatch-conf -a</i> |
304 |
+</pre> |
305 |
+ |
306 |
+</body> |
307 |
+</section> |
308 |
+ |
309 |
<section> |
310 |
<title>Contact</title> |
311 |
<body> |
312 |
|
313 |
<p> |
314 |
-Please feel free to contact the author or file a bug on <uri |
315 |
-link="http://bugs.gentoo.org">Bugzilla</uri> in case of any problems. |
316 |
+Please feel free to contact the <mail link="hollow@g.o">author</mail> or |
317 |
+file a bug on <uri link="http://bugs.gentoo.org">Bugzilla</uri> in case of any |
318 |
+problems. |
319 |
</p> |
320 |
|
321 |
</body> |
322 |
|
323 |
|
324 |
|
325 |
-- |
326 |
gentoo-doc-cvs@g.o mailing list |