1
# Occitan (post 1500) translation for ubuntu-docs
2
# Copyright (c) 2007 Rosetta Contributors and Canonical Ltd 2007
3
# This file is distributed under the same license as the ubuntu-docs package.
4
# Yannig MARCHEGAY <yannig@marchegay.org>, 2007.
10
"Project-Id-Version: ubuntu-docs\n"
11
"Report-Msgid-Bugs-To: \n"
12
"POT-Creation-Date: 2010-03-29 08:26+0100\n"
13
"PO-Revision-Date: 2010-03-29 21:09+0000\n"
14
"Last-Translator: Yannig MARCHEGAY (Kokoyaya) <yannig@marchegay.org>\n"
15
"Language-Team: Occitan (post 1500) <ubuntu-l10n-oci@lists.ubuntu.com>\n"
17
"Content-Type: text/plain; charset=UTF-8\n"
18
"Content-Transfer-Encoding: 8bit\n"
19
"X-Launchpad-Export-Date: 2010-04-17 14:52+0000\n"
20
"X-Generator: Launchpad (build Unknown)\n"
22
#: serverguide/C/serverguide-C.omf:6(creator) serverguide/C/serverguide-C.omf:7(maintainer)
23
msgid "ubuntu-doc@lists.ubuntu.com (Ubuntu Documentation Project)"
24
msgstr "ubuntu-doc@lists.ubuntu.com (projècte de documentacion d'Ubuntu)"
26
#: serverguide/C/serverguide-C.omf:8(title) serverguide/C/serverguide-C.omf:11(description) serverguide/C/serverguide.xml:14(title) serverguide/C/bookinfo.xml:13(title)
27
msgid "Ubuntu Server Guide"
28
msgstr "Guida del servidor Ubuntu"
30
#: serverguide/C/serverguide-C.omf:9(date)
34
#: serverguide/C/windows-networking.xml:13(title)
35
msgid "Windows Networking"
38
#: serverguide/C/windows-networking.xml:15(para)
40
"Computer networks are often comprised of diverse systems, and while "
41
"operating a network made up entirely of Ubuntu desktop and server computers "
42
"would certainly be fun, some network environments must consist of both "
43
"Ubuntu and <trademark class=\"registered\">Microsoft</trademark><trademark "
44
"class=\"registered\">Windows</trademark> systems working together in "
45
"harmony. This section of the <phrase>Ubuntu</phrase> Server Guide introduces "
46
"principles and tools used in configuring your Ubuntu Server for sharing "
47
"network resources with Windows computers."
49
"Las rets informaticas son sovent compausadas de sistèmas divèrses e "
50
"quitament se operar una ret constituida exclusivament d'estacions de trabalh "
51
"e de servidors Ubuntu seriá segurament plasent, d'unes environaments de ret "
52
"son constituits a l'encòp de sistèmas Ubuntu e de sistèmas <trademark "
53
"class=\"registered\">Microsoft</trademark><trademark "
54
"class=\"registered\">Windows</trademark> que trabalhan amassa en armonia. "
55
"Aquesta seccion del guida del servidor <phrase>Ubuntu</phrase> presenta los "
56
"principis e los espleches utilizats per configurar vòstre servidor Ubuntu "
57
"per partejar de ressorsas de ret amb d'ordenadors Windows."
59
#: serverguide/C/windows-networking.xml:25(title) serverguide/C/virtualization.xml:402(title) serverguide/C/security.xml:354(title) serverguide/C/remote-administration.xml:22(title) serverguide/C/package-management.xml:20(title) serverguide/C/introduction.xml:13(title)
63
#: serverguide/C/windows-networking.xml:27(para)
65
"Successfully networking your Ubuntu system with Windows clients involves "
66
"providing and integrating with services common to Windows environments. Such "
67
"services assist the sharing of data and information about the computers and "
68
"users involved in the network, and may be classified under three major "
69
"categories of functionality:"
71
"Per capitar la mesa en ret de vòstre sistèma Ubuntu amb de clients Windows, "
72
"vos cal provesir e integrar los servicis utilizats frequentament dins los "
73
"environaments Windows. Aqueles servicis permeton lo partiment de las donadas "
74
"e de las informacions suls ordenadors e los utilizaires presents sus la ret. "
75
"Pòdon èsser classats segon tres categorias principalas segon lor ròtle :"
77
#: serverguide/C/windows-networking.xml:35(para)
79
"<emphasis role=\"bold\">File and Printer Sharing Services</emphasis>. Using "
80
"the Server Message Block (SMB) protocol to facilitate the sharing of files, "
81
"folders, volumes, and the sharing of printers throughout the network."
83
"<emphasis role=\"bold\">Servicis de partiments de fichièrs e "
84
"d'etampadoiras</ emphasis>. L'utilizacion del protocòl Server Message Block "
85
"(SMB) facilita lo partiment de fichièrs, de dorsièrs, de volums, e le "
86
"partiment de las estampadoiras sus la ret."
88
#: serverguide/C/windows-networking.xml:41(para)
90
"<emphasis role=\"bold\">Directory Services</emphasis>. Sharing vital "
91
"information about the computers and users of the network with such "
92
"technologies as the Lightweight Directory Access Protocol (LDAP) and "
93
"Microsoft <trademark class=\"registered\">Active Directory</trademark>."
95
"<emphasis role=\"bold\">Servicis d'annuari</emphasis>. Partiment de las "
96
"informacions vitalas suls ordenadors e los utilizaires de la ret amb de "
97
"tecnologias coma LDAP (Lightweight Directory Access Protocol) e l'<trademark "
98
"class=\"registered\">Active Directory</trademark> de Microsoft (servicis "
101
#: serverguide/C/windows-networking.xml:48(para)
103
"<emphasis role=\"bold\">Authentication and Access</emphasis>. Establishing "
104
"the identity of a computer or user of the network and determining the "
105
"information the computer or user is authorized to access using such "
106
"principles and technologies as file permissions, group policies, and the "
107
"Kerberos authentication service."
109
"<emphasis role=\"bold\">Autentificacion e Accès</ emphasis>. Establir "
110
"l'identitat d'un ordenador o un utilizaire de la ret e determinar las "
111
"informacions a las qualas l'ordenador o l'utilizaire es autorizat a accedir "
112
"amb l'ajuda d'aquestes principis e de tecnologias coma las permissions de "
113
"fichièrs, de politicas de grop e lo servici d'autentificacion Kerberos."
115
#: serverguide/C/windows-networking.xml:56(para)
117
"Fortunately, your Ubuntu system may provide all such facilities to Windows "
118
"clients and share network resources among them. One of the principal pieces "
119
"of software your Ubuntu system includes for Windows networking is the Samba "
120
"suite of SMB server applications and tools."
122
"Urosament, vòstre sistèma Ubuntu pòt provesir totas aquestas foncionalitats "
123
"des clients Windows e partejar las ressorsas de la ret amb eles. Un dels "
124
"principals logicials incluses dins vòstre sistèma Ubuntu que permet la mesa "
125
"en ret amb Windows es la seguida Samba compausada de las aplicacions e "
126
"espleches per servidor SMB."
128
#: serverguide/C/windows-networking.xml:62(para)
130
"This section of the <phrase>Ubuntu</phrase> Server Guide will introduce some "
131
"of the common Samba use cases, and how to install and configure the "
132
"necessary packages. Additional detailed documentation and information on "
133
"Samba can be found on the <ulink url=\"http://www.samba.org\">Samba "
136
"Aquesta partida del guida servdor <phrase>Ubuntu</phrase> vos presentarà "
137
"qualques cases d'utilizacion de Samba e cossí installar e configurar los "
138
"paquets necessaris. Trobaretz mai d'informacions e una documentacion "
139
"completa sus Samba sul site de <ulink "
140
"url=\"http://www.samba.org\">Samba</ulink>."
142
#: serverguide/C/windows-networking.xml:70(title)
143
msgid "Samba File Server"
144
msgstr "Servidor de fichièrs Samba"
146
#: serverguide/C/windows-networking.xml:72(para)
148
"One of the most common ways to network Ubuntu and Windows computers is to "
149
"configure Samba as a File Server. This section covers setting up a "
150
"<application>Samba</application> server to share files with Windows clients."
152
"Un dels metòdes mai corrents per metre Ubuntu e Windows en ret es de "
153
"configurar Samba en servidor de fichièrs. Aquesta seccion descriu "
154
"l'installacion d'un servidor <application>Samba</application> pet partejar "
155
"de fichièrs amb de clients Windows."
157
#: serverguide/C/windows-networking.xml:77(para)
159
"The server will be configured to share files with any client on the network "
160
"without prompting for a password. If your environment requires stricter "
161
"Access Controls see <xref linkend=\"samba-fileprint-security\"/>"
163
"Lo servidor serà configurat per partejar de fichièrs amb un client quin que "
164
"siá sus la ret sens demandar de senhal. Se vòstre environament necessita de "
165
"contraròtles d'accès mai estricts, consultatz <xref linkend=\"samba-"
166
"fileprint-security\"/>"
168
#: serverguide/C/windows-networking.xml:83(title) serverguide/C/windows-networking.xml:287(title) serverguide/C/windows-networking.xml:1302(title) serverguide/C/web-servers.xml:41(title) serverguide/C/web-servers.xml:675(title) serverguide/C/web-servers.xml:816(title) serverguide/C/web-servers.xml:940(title) serverguide/C/vpn.xml:33(title) serverguide/C/virtualization.xml:62(title) serverguide/C/virtualization.xml:2014(title) serverguide/C/vcs.xml:28(title) serverguide/C/vcs.xml:86(title) serverguide/C/vcs.xml:405(title) serverguide/C/remote-administration.xml:52(title) serverguide/C/remote-administration.xml:233(title) serverguide/C/network-config.xml:937(title) serverguide/C/network-auth.xml:52(title) serverguide/C/network-auth.xml:1581(title) serverguide/C/network-auth.xml:2092(title) serverguide/C/network-auth.xml:2483(title) serverguide/C/monitoring.xml:42(title) serverguide/C/monitoring.xml:428(title) serverguide/C/mail.xml:40(title) serverguide/C/mail.xml:496(title) serverguide/C/mail.xml:674(title) serverguide/C/mail.xml:823(title) serverguide/C/mail.xml:1315(title) serverguide/C/lamp-applications.xml:108(title) serverguide/C/lamp-applications.xml:287(title) serverguide/C/lamp-applications.xml:423(title) serverguide/C/installation.xml:13(title) serverguide/C/installation.xml:957(title) serverguide/C/file-server.xml:347(title) serverguide/C/file-server.xml:462(title) serverguide/C/dns.xml:23(title) serverguide/C/databases.xml:40(title) serverguide/C/databases.xml:164(title) serverguide/C/chat.xml:37(title) serverguide/C/chat.xml:141(title) serverguide/C/backups.xml:593(title)
170
msgstr "Installacion"
172
#: serverguide/C/windows-networking.xml:85(para)
174
"The first step is to install the <application>samba</application> package. "
175
"From a terminal prompt enter:"
177
"La primièra etapa consistís a installar lo paquet "
178
"<application>samba</application>. Dins un terminal picatz :"
180
#: serverguide/C/windows-networking.xml:90(command) serverguide/C/windows-networking.xml:299(command)
181
msgid "sudo apt-get install samba"
182
msgstr "sudo apt-get install samba"
184
#: serverguide/C/windows-networking.xml:93(para)
186
"That's all there is to it; you are now ready to configure Samba to share "
189
"Es tot çò que vos cal far. Ara, sètz prèst a configurar Samba per partejar "
192
#: serverguide/C/windows-networking.xml:99(title) serverguide/C/windows-networking.xml:304(title) serverguide/C/web-servers.xml:61(title) serverguide/C/web-servers.xml:726(title) serverguide/C/web-servers.xml:827(title) serverguide/C/web-servers.xml:967(title) serverguide/C/web-servers.xml:1067(title) serverguide/C/vpn.xml:138(title) serverguide/C/virtualization.xml:2088(title) serverguide/C/vcs.xml:39(title) serverguide/C/vcs.xml:423(title) serverguide/C/remote-administration.xml:74(title) serverguide/C/remote-administration.xml:258(title) serverguide/C/package-management.xml:387(title) serverguide/C/network-config.xml:959(title) serverguide/C/network-auth.xml:2131(title) serverguide/C/network-auth.xml:2504(title) serverguide/C/monitoring.xml:187(title) serverguide/C/monitoring.xml:454(title) serverguide/C/mail.xml:505(title) serverguide/C/mail.xml:684(title) serverguide/C/mail.xml:908(title) serverguide/C/mail.xml:1344(title) serverguide/C/lamp-applications.xml:128(title) serverguide/C/lamp-applications.xml:314(title) serverguide/C/lamp-applications.xml:453(title) serverguide/C/file-server.xml:360(title) serverguide/C/file-server.xml:488(title) serverguide/C/dns.xml:39(title) serverguide/C/databases.xml:84(title) serverguide/C/databases.xml:183(title) serverguide/C/clustering.xml:47(title) serverguide/C/chat.xml:57(title) serverguide/C/chat.xml:153(title) serverguide/C/backups.xml:616(title)
193
msgid "Configuration"
194
msgstr "Configuracion"
196
#: serverguide/C/windows-networking.xml:101(para)
198
"The main Samba configuration file is located in "
199
"<filename>/etc/samba/smb.conf</filename>. The default configuration file has "
200
"a significant amount of comments in order to document various configuration "
203
"Lo fichièr de configuracion principal de Samba es "
204
"<filename>/etc/samba/smb.conf</filename>. Lo fichièr de configuracion per "
205
"defaut es amplament comentat per explicar las nombrosas directivas de "
208
#: serverguide/C/windows-networking.xml:106(para)
210
"Not all the available options are included in the default configuration "
211
"file. See the <filename>smb.conf</filename><application>man</application> "
212
"page or the <ulink url=\"http://samba.org/samba/docs/man/Samba-HOWTO-"
213
"Collection/\">Samba HOWTO Collection</ulink> for more details."
215
"Lo fichièr de configuracion conten pas totas las opcions disponiblas. "
216
"Consultatz la pagina <application>man</application> de "
217
"<filename>smb.conf</filename> o <ulink "
218
"url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/\"> Samba HOWTO "
219
"Colleccion (en)</ ulink> per mai de detalhs."
221
#: serverguide/C/windows-networking.xml:116(para)
223
"First, edit the following key/value pairs in the "
224
"<emphasis>[global]</emphasis> section of "
225
"<filename>/etc/samba/smb.conf</filename>:"
227
"D'en primièr, modificatz los parèlhs clau/valor seguentas dins la seccion "
228
"<emphasis>[global]</emphasis> de <filename>/etc/samba/smb.conf</filename> :"
230
#: serverguide/C/windows-networking.xml:121(programlisting) serverguide/C/windows-networking.xml:311(programlisting) serverguide/C/windows-networking.xml:776(programlisting) serverguide/C/windows-networking.xml:990(programlisting)
234
" workgroup = EXAMPLE\n"
239
" workgroup = EXAMPLE\n"
243
#: serverguide/C/windows-networking.xml:127(para)
245
"The <emphasis>security</emphasis> parameter is farther down in the [global] "
246
"section, and is commented by default. Also, change "
247
"<emphasis>EXAMPLE</emphasis> to better match your environment."
249
"Lo paramètre <emphasis>security</ emphasis> situat mai bas dins la seccion "
250
"[global] es comentat per defaut. Modificatz tanben <emphasis>EXEMPLE</ "
251
"emphasis> per l'adaptar a vòstre environament."
253
#: serverguide/C/windows-networking.xml:135(para)
255
"Create a new section at the bottom of the file, or uncomment one of the "
256
"examples, for the directory to be shared:"
258
"Creatz una seccion novèla a la fin del fichièr (o descomentatz un dels "
259
"exemples) pel dorsièr de partejar :"
261
#: serverguide/C/windows-networking.xml:139(programlisting)
266
" comment = Ubuntu File Server Share\n"
267
" path = /srv/samba/share\n"
271
" create mask = 0755\n"
275
"comment = Dorsièr partejat sul servidor Ubuntu\n"
276
"path = /srv/samba/share\n"
280
"create mask = 0755\n"
282
#: serverguide/C/windows-networking.xml:151(para)
284
"<emphasis>comment:</emphasis> a short description of the share. Adjust to "
287
"<emphasis>comment :</emphasis> una brèva descripcion del partiment. Adaptatz-"
288
"lo a vòstres besonhs."
290
#: serverguide/C/windows-networking.xml:156(para)
291
msgid "<emphasis>path:</emphasis> the path to the directory to share."
292
msgstr "<emphasis>path :</emphasis> l'emplaçament del dorsièr de partejar."
294
#: serverguide/C/windows-networking.xml:159(para)
296
"This example uses <filename>/srv/samba/sharename</filename> because, "
297
"according to the <emphasis>Filesystem Hierarchy Standard (FHS)</emphasis>, "
298
"<ulink url=\"http://www.pathname.com/fhs/pub/fhs-"
299
"2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM\">/srv</ulink> is where site-"
300
"specific data should be served. Technically Samba shares can be placed "
301
"anywhere on the filesystem as long as the permissions are correct, but "
302
"adhering to standards is recommended."
304
"Aqueste exemple utiliza <filename>/srv/samba/nom_partiment</ filename> "
305
"perque segon la nòrma de la ierarquia dels sistèmas de fichièrs "
306
"(<emphasis>Filesystem Hierarchy Standard (FHS)</emphasis>), <ulink "
307
"url=\"http://www.pathname.com/fhs/pub/fhs-"
308
"2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM\">/srv</ulink> es l'emplaçament "
309
"ont se devon trobar las donadas de servir sus la ret. Tecnicament, los "
310
"partiments Samba pòdon èsser plaçats ont que siá sul sistèma de fichiers "
311
"tant que las permissions son corrèctas, mas lo respièch dels estandards es "
314
#: serverguide/C/windows-networking.xml:168(para)
316
"<emphasis>browsable:</emphasis> enables Windows clients to browse the shared "
317
"directory using <application>Windows Explorer</application>."
319
"<emphasis>browsable :</emphasis> autoriza los clients Windows a percórrer lo "
320
"repertòri partejat en utilizant l'<application>explorador de fichièrs de "
321
"Windows</application>."
323
#: serverguide/C/windows-networking.xml:174(para)
325
"<emphasis>guest ok:</emphasis> allows clients to connect to the share "
326
"without supplying a password."
328
"<emphasis>guest ok :</emphasis> permet als clients de se connectar al "
329
"repertòri partejat sens provesir de senhal."
331
#: serverguide/C/windows-networking.xml:179(para)
333
"<emphasis>read only:</emphasis> determines if the share is read only or if "
334
"write privileges are granted. Write privileges are allowed only when the "
335
"value is <emphasis>no</emphasis>, as is seen in this example. If the value "
336
"is <emphasis>yes</emphasis>, then access to the share is read only."
338
"<emphasis>read only :</emphasis> determina se lo partiment es en lectura "
339
"sola o se los privilègis en escritura son acordats. Los dreches d'escritura "
340
"son acordats solament se la valor es <emphasis>no</emphasis>. Coma òm lo veu "
341
"dins aqueste exemple, se la valor es <emphasis>yes</emphasis>, alara l'accès "
342
"al partimente es en lectura sola."
344
#: serverguide/C/windows-networking.xml:184(para)
346
"<emphasis>create mask:</emphasis> determines the permissions new files will "
349
"<emphasis>create mask :</emphasis> determina las permissions dels fichièrs "
352
#: serverguide/C/windows-networking.xml:193(para)
354
"Now that <application>Samba</application> is configured, the directory needs "
355
"to be created and the permissions changed. From a terminal enter:"
357
"Ara que <application>Samba</application> es configurat, lo repertòri deu "
358
"èsser creat e las permissions modificadas. Dempuèi un terminal, picatz :"
360
#: serverguide/C/windows-networking.xml:199(command)
361
msgid "sudo mkdir -p /srv/samba/share"
362
msgstr "sudo mkdir -p /srv/samba/share"
364
#: serverguide/C/windows-networking.xml:200(command)
365
msgid "sudo chown nobody.nogroup /srv/samba/share/"
366
msgstr "sudo chown nobody.nogroup /srv/samba/share/"
368
#: serverguide/C/windows-networking.xml:204(para)
370
"The <emphasis>-p</emphasis> switch tells mkdir to create the entire "
371
"directory tree if it doesn't exist. Change the share name to fit your "
374
"L'opcion<emphasis>-p</emphasis> indica a mkdir de crear l'arborescéncia "
375
"completa s'existís pas ja. Adaptatz lo nom del partiment en foncion de "
376
"vòstre environament."
378
#: serverguide/C/windows-networking.xml:213(para)
380
"Finally, restart the <application>samba</application> services to enable the "
383
"Per acabar, reaviatz los servicis <application>samba</application> per "
384
"activar la configuracion novèla :"
386
#: serverguide/C/windows-networking.xml:218(command) serverguide/C/windows-networking.xml:331(command) serverguide/C/windows-networking.xml:468(command) serverguide/C/windows-networking.xml:567(command) serverguide/C/windows-networking.xml:937(command) serverguide/C/windows-networking.xml:1047(command) serverguide/C/windows-networking.xml:1162(command) serverguide/C/network-auth.xml:1860(command)
387
msgid "sudo /etc/init.d/samba restart"
388
msgstr "sudo /etc/init.d/samba restart"
390
#: serverguide/C/windows-networking.xml:225(para)
392
"Once again, the above configuration gives all access to any client on the "
393
"local network. For a more secure configuration see <xref linkend=\"samba-"
394
"fileprint-security\"/>."
396
"Notatz plan que la configuracion çaisús balha un accès complet a un client "
397
"quin que siá sus la ret locala. Per una configuracion mai securizada, "
398
"consultatz <xref linkend=\"samba-fileprint-security\"/>."
400
#: serverguide/C/windows-networking.xml:231(para)
402
"From a Windows client you should now be able to browse to the Ubuntu file "
403
"server and see the shared directory. To check that everything is working try "
404
"creating a directory from Windows."
406
"Ara, vos caldriá èsser en mesura de percórrer lo servidor de fichièrs Ubuntu "
407
"e de veire lo repertòri partejat dempuèi un client Windows. Per verificar "
408
"que tot fonciona, ensajatz de crear un repertòri dempuèi Windows."
410
#: serverguide/C/windows-networking.xml:236(para)
412
"To create additional shares simply create new <emphasis>[dir]</emphasis> "
413
"sections in <filename>/etc/samba/smb.conf</filename>, and restart "
414
"<emphasis>Samba</emphasis>. Just make sure that the directory you want to "
415
"share actually exists and the permissions are correct."
417
"Per crear d'autres partiments, apondètz de seccions novèlas "
418
"<emphasis>[dir]</emphasis> dins <filename>/etc/samba/smb.conf</filename> e "
419
"reaviatz <emphasis>Samba</emphasis>. Asseguratz-vos solament que lo "
420
"repertòri que volètz partejar existís e que possedís las permissions "
423
#: serverguide/C/windows-networking.xml:243(title) serverguide/C/windows-networking.xml:341(title) serverguide/C/windows-networking.xml:696(title) serverguide/C/windows-networking.xml:1066(title) serverguide/C/windows-networking.xml:1273(title) serverguide/C/virtualization.xml:366(title) serverguide/C/virtualization.xml:1168(title) serverguide/C/reporting-bugs.xml:304(title) serverguide/C/remote-administration.xml:491(title) serverguide/C/network-config.xml:569(title) serverguide/C/network-config.xml:824(title) serverguide/C/network-auth.xml:1531(title) serverguide/C/network-auth.xml:1975(title) serverguide/C/network-auth.xml:2579(title) serverguide/C/network-auth.xml:3087(title) serverguide/C/installation.xml:892(title) serverguide/C/installation.xml:1173(title) serverguide/C/databases.xml:122(title) serverguide/C/databases.xml:273(title) serverguide/C/backups.xml:855(title)
427
#: serverguide/C/windows-networking.xml:247(para) serverguide/C/windows-networking.xml:345(para) serverguide/C/windows-networking.xml:700(para) serverguide/C/windows-networking.xml:1070(para)
429
"For in depth Samba configurations see the <ulink "
430
"url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/\">Samba HOWTO "
433
"Per de configuracions mai elaboradas de Samba, consultatz los <ulink "
434
"url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/\">guidas "
435
"practics Samba (en)</ulink>"
437
#: serverguide/C/windows-networking.xml:253(para) serverguide/C/windows-networking.xml:351(para) serverguide/C/windows-networking.xml:706(para) serverguide/C/windows-networking.xml:1076(para)
439
"The guide is also available in <ulink "
440
"url=\"http://www.amazon.com/exec/obidos/tg/detail/-/0131882228\">printed "
443
"Aqueste guida es tanben disponible en <ulink "
444
"url=\"http://www.amazon.com/exec/obidos/tg/detail/-/0131882228\">format "
447
#: serverguide/C/windows-networking.xml:259(para) serverguide/C/windows-networking.xml:357(para)
450
"url=\"http://www.oreilly.com/catalog/9780596007690/\">Using Samba</ulink> is "
451
"another good reference."
453
"<ulink url=\"http://www.oreilly.com/catalog/9780596007690/\">Using "
454
"Samba</ulink> d'O'Reilly es una autra bona font d'informacions."
456
#: serverguide/C/windows-networking.xml:265(para) serverguide/C/windows-networking.xml:368(para) serverguide/C/windows-networking.xml:731(para) serverguide/C/windows-networking.xml:1100(para) serverguide/C/windows-networking.xml:1286(para)
458
"The <ulink url=\"https://help.ubuntu.com/community/Samba\">Ubuntu Wiki Samba "
462
#: serverguide/C/windows-networking.xml:274(title)
463
msgid "Samba Print Server"
464
msgstr "Servidor d'estampatge Samba"
466
#: serverguide/C/windows-networking.xml:276(para)
468
"Another common use of Samba is to configure it to share printers installed, "
469
"either locally or over the network, on an Ubuntu server. Similar to <xref "
470
"linkend=\"samba-fileserver\"/> this section will configure Samba to allow "
471
"any client on the local network to use the installed printers without "
472
"prompting for a username and password."
474
"Una autra utilizacion classica de Samba es de lo configurar per partejar las "
475
"estampadoiras installadas sus un servidor Ubuntu, que siá localament o sus "
476
"la ret. Amai <xref linkend=\"samba-fileserver\"/>, aquesta seccion permet de "
477
"configurar Samba per permetre a un client quin que siá sus la ret d'utilizar "
478
"las estampadoiras sens demanda de senhal."
480
#: serverguide/C/windows-networking.xml:282(para)
482
"For a more secure configuration see <xref linkend=\"samba-fileprint-"
485
"Per una configuracion mai securizada, vejatz <xref linkend=\"samba-fileprint-"
488
#: serverguide/C/windows-networking.xml:289(para)
490
"Before installing and configuring Samba it is best to already have a working "
491
"<application>CUPS</application> installation. See <xref linkend=\"cups\"/> "
494
"Abans d'installar e de configurar Samba, es preferible de dispausar d'una "
495
"installacion foncionala de <application>CUPS</application>. Vejatz <xref "
496
"linkend=\"cups\"/> per mai de detalhs."
498
#: serverguide/C/windows-networking.xml:294(para)
500
"To install the <application>samba</application> package, from a terminal "
503
"Per installar lo paquet <application>samba</application>, entratz la comanda "
504
"seguenta dempuèi un terminal :"
506
#: serverguide/C/windows-networking.xml:305(para)
508
"After installing samba edit <filename>/etc/samba/smb.conf</filename>. Change "
509
"the <emphasis>workgroup</emphasis> attribute to what is appropriate for your "
510
"network, and change <emphasis>security</emphasis> to <emphasis "
511
"role=\"italic\">share</emphasis>:"
513
"Aprèp aver installat Samba, modificatz lo fichièr "
514
"<filename>/etc/samba/smb.conf</filename> e cambiatz l'atribut "
515
"<emphasis>workgroup</emphasis> per l'adaptar a vòstra ret. Metètz tanben "
516
"l'atribut <emphasis>security</emphasis> a <emphasis "
517
"role=\"italic\">share</emphasis> :"
519
#: serverguide/C/windows-networking.xml:317(para)
521
"In the <emphasis>[printers]</emphasis> section change the <emphasis>guest "
522
"ok</emphasis> option to <emphasis role=\"italic\">yes</emphasis>:"
524
"Dins la seccion <emphasis>[printers]</emphasis>, metètz l'opcion "
525
"<emphasis>guest ok</emphasis> a <emphasis role=\"italic\">yes</emphasis> :"
527
#: serverguide/C/windows-networking.xml:321(programlisting)
535
#: serverguide/C/windows-networking.xml:326(para)
536
msgid "After editing <filename>smb.conf</filename> restart Samba:"
537
msgstr "Reaviatz Samba aprèp aver modificat <filename>smb.conf</filename>"
539
#: serverguide/C/windows-networking.xml:334(para)
541
"The default Samba configuration will automatically share any printers "
542
"installed. Simply install the printer locally on your Windows clients."
544
"La configuracion per defaut de Samba partejarà automaticament tota "
545
"estampadoira installada. Installatz simplament l'estampadoira localament sus "
546
"vòstres clients Windows."
548
#: serverguide/C/windows-networking.xml:363(para)
550
"Also, see the <ulink url=\"http://www.cups.org/\">CUPS Website</ulink> for "
551
"more information on configuring CUPS."
553
"Vejatz tanben lo <ulink url=\"http://www.cups.org/\">site Web CUPS</ulink> "
554
"per mai d'informacions sul biais de configurar CUPS."
556
#: serverguide/C/windows-networking.xml:377(title)
557
msgid "Securing a Samba File and Print Server"
558
msgstr "Securizar un servidor de fichièrs e d'estampatge Samba"
560
#: serverguide/C/windows-networking.xml:380(title)
561
msgid "Samba Security Modes"
562
msgstr "Perfils de seguretat de Samba"
564
#: serverguide/C/windows-networking.xml:382(para)
566
"There are two security levels available to the Common Internet Filesystem "
567
"(CIFS) network protocol <emphasis>user-level</emphasis> and <emphasis>share-"
568
"level</emphasis>. Samba's <emphasis>security mode</emphasis> implementation "
569
"allows more flexibility, providing four ways of implementing user-level "
570
"security and one way to implement share-level:"
572
"Los dos nivèls de seguretat disponibles pel protocòl de ret CIFS (Common "
573
"Internet Filesystem) son <emphasis>user-level</emphasis> e <emphasis>share-"
574
"level</emphasis>. La mesa en òbra de las <emphasis>opcions de "
575
"seguretat</emphasis> de Samba permet mai de flexibilitat en provesissent "
576
"quatre possibilitat de seguretat al nivèl de l'utilizaire mai una al nivèl "
579
#: serverguide/C/windows-networking.xml:391(para)
581
"<emphasis>security = user:</emphasis> requires clients to supply a username "
582
"and password to connect to shares. Samba user accounts are separate from "
583
"system accounts, but the <application>libpam-smbpass</application> package "
584
"will sync system users and passwords with the Samba user database."
586
"<emphasis>security = user:</emphasis> impausa als clients de provesir un nom "
587
"d'utilizaire e un senhal per se connectar als partiments. Los comptes "
588
"d'utilizaires Samba son diferents dels comptes de sistèma, mas lo paquet "
589
"<application>libpam-smbpass</application> permet de sincronizar los "
590
"utilizaires e senhal del sistèma amb la banca de donadas dels utilizaires "
593
#: serverguide/C/windows-networking.xml:398(para)
595
"<emphasis>security = domain:</emphasis> this mode allows the Samba server to "
596
"appear to Windows clients as a Primary Domain Controller (PDC), Backup "
597
"Domain Controller (BDC), or a Domain Member Server (DMS). See <xref "
598
"linkend=\"samba-dc\"/> for further information."
601
#: serverguide/C/windows-networking.xml:405(para)
603
"<emphasis>security = ADS:</emphasis> allows the Samba server to join an "
604
"Active Directory domain as a native member. See <xref linkend=\"samba-ad-"
605
"integration\"/> for details."
608
#: serverguide/C/windows-networking.xml:411(para)
610
"<emphasis>security = server:</emphasis> this mode is left over from before "
611
"Samba could become a member server, and due to some security issues should "
612
"not be used. See the <ulink url=\"http://samba.org/samba/docs/man/Samba-"
613
"HOWTO-Collection/ServerType.html#id349531\">Server Security</ulink> section "
614
"of the Samba guide for more details."
617
#: serverguide/C/windows-networking.xml:419(para)
619
"<emphasis>security = share:</emphasis> allows clients to connect to shares "
620
"without supplying a username and password."
623
#: serverguide/C/windows-networking.xml:426(para)
625
"The security mode you choose will depend on your environment and what you "
626
"need the Samba server to accomplish."
629
#: serverguide/C/windows-networking.xml:432(title)
630
msgid "Security = User"
631
msgstr "Security = User"
633
#: serverguide/C/windows-networking.xml:434(para)
635
"This section will reconfigure the Samba file and print server, from <xref "
636
"linkend=\"samba-fileserver\"/> and <xref linkend=\"samba-printserver\"/>, to "
637
"require authentication."
640
#: serverguide/C/windows-networking.xml:439(para)
642
"First, install the <application>libpam-smbpass</application> package which "
643
"will sync the system users to the Samba user database:"
646
#: serverguide/C/windows-networking.xml:445(command)
647
msgid "sudo apt-get install libpam-smbpass"
648
msgstr "sudo apt-get install libpam-smbpass"
650
#: serverguide/C/windows-networking.xml:449(para)
652
"If you chose the <emphasis>Samba Server</emphasis> task during installation "
653
"<application>libpam-smbpass</application> is already installed."
656
#: serverguide/C/windows-networking.xml:455(para)
658
"Edit <filename>/etc/samba/smb.conf</filename>, and in the "
659
"<emphasis>[share]</emphasis> section change:"
661
"Modificatz la seccion <emphasis>[share]</emphasis> del fichièr "
662
"<filename>/etc/samba/smb.conf</filename> :"
664
#: serverguide/C/windows-networking.xml:459(programlisting)
673
#: serverguide/C/windows-networking.xml:463(para)
674
msgid "Finally, restart Samba for the new settings to take effect:"
676
"Per acabar, reaviatz Samba per que los paramètres novèls sián preses en "
679
#: serverguide/C/windows-networking.xml:471(para)
681
"Now when connecting to the shared directories or printers you should be "
682
"prompted for a username and password."
685
#: serverguide/C/windows-networking.xml:476(para)
687
"If you choose to map a network drive to the share you can check the "
688
"<quote>Reconnect at Logon</quote> check box, which will require you to only "
689
"enter the username and password once, at least until the password changes."
692
#: serverguide/C/windows-networking.xml:484(title)
693
msgid "Share Security"
694
msgstr "Seguretat dels Partiments"
696
#: serverguide/C/windows-networking.xml:486(para)
698
"There are several options available to increase the security for each "
699
"individual shared directory. Using the <emphasis>[share]</emphasis> example, "
700
"this section will cover some common options."
703
#: serverguide/C/windows-networking.xml:492(title)
707
#: serverguide/C/windows-networking.xml:494(para)
709
"Groups define a collection of computers or users which have a common level "
710
"of access to particular network resources and offer a level of granularity "
711
"in controlling access to such resources. For example, if a group <emphasis "
712
"role=\"italic\">qa</emphasis> is defined and contains the users <emphasis "
713
"role=\"italic\">freda</emphasis>, <emphasis "
714
"role=\"italic\">danika</emphasis>, and <emphasis "
715
"role=\"italic\">rob</emphasis> and a second group <emphasis "
716
"role=\"italic\">support</emphasis> is defined and consists of users "
717
"<emphasis role=\"italic\">danika</emphasis>, <emphasis "
718
"role=\"italic\">jeremy</emphasis>, and <emphasis "
719
"role=\"italic\">vincent</emphasis> then certain network resources configured "
720
"to allow access by the <emphasis role=\"italic\">qa</emphasis> group will "
721
"subsequently enable access by freda, danika, and rob, but not jeremy or "
722
"vincent. Since the user <emphasis role=\"italic\">danika</emphasis> belongs "
723
"to both the <emphasis role=\"italic\">qa</emphasis> and <emphasis "
724
"role=\"italic\">support</emphasis> groups, she will be able to access "
725
"resources configured for access by both groups, whereas all other users will "
726
"have only access to resources explicitly allowing the group they are part of."
729
#: serverguide/C/windows-networking.xml:508(para)
731
"By default Samba looks for the local system groups defined in "
732
"<filename>/etc/group</filename> to determine which users belong to which "
733
"groups. For more information on adding and removing users from groups see "
734
"<xref linkend=\"adding-deleting-users\"/>."
737
#: serverguide/C/windows-networking.xml:514(para)
739
"When defining groups in the Samba configuration file, "
740
"<filename>/etc/samba/smb.conf</filename>, the recognized syntax is to "
741
"preface the group name with an \"@\" symbol. For example, if you wished to "
742
"define a group named <emphasis role=\"italic\">sysadmin</emphasis> in a "
743
"certain section of the <filename>/etc/samba/smb.conf</filename>, you would "
744
"do so by entering the group name as <emphasis "
745
"role=\"bold\">@sysadmin</emphasis>."
748
#: serverguide/C/windows-networking.xml:523(title)
749
msgid "File Permissions"
750
msgstr "Dreches d'accès als fichièrs"
752
#: serverguide/C/windows-networking.xml:525(para)
754
"File Permissions define the explicit rights a computer or user has to a "
755
"particular directory, file, or set of files. Such permissions may be defined "
756
"by editing the <filename>/etc/samba/smb.conf</filename> file and specifying "
757
"the explicit permissions of a defined file share."
760
#: serverguide/C/windows-networking.xml:531(para)
762
"For example, if you have defined a Samba share called "
763
"<emphasis>share</emphasis> and wish to give <emphasis role=\"italic\">read-"
764
"only</emphasis> permissions to the group of users known as <emphasis "
765
"role=\"italic\">qa</emphasis>, but wanted to allow writing to the share by "
766
"the group called <emphasis role=\"italic\">sysadmin</emphasis> and the user "
767
"named <emphasis role=\"italic\">vincent</emphasis>, then you could edit the "
768
"<filename>/etc/samba/smb.conf</filename> file, and add the following entries "
769
"under the <emphasis>[share]</emphasis> entry:"
772
#: serverguide/C/windows-networking.xml:540(programlisting)
777
" write list = @sysadmin, vincent\n"
781
"write list = @sysadmin, vincent\n"
783
#: serverguide/C/windows-networking.xml:545(para)
785
"Another possible Samba permission is to declare "
786
"<emphasis>administrative</emphasis> permissions to a particular shared "
787
"resource. Users having administrative permissions may read, write, or modify "
788
"any information contained in the resource the user has been given explicit "
789
"administrative permissions to."
792
#: serverguide/C/windows-networking.xml:551(para)
794
"For example, if you wanted to give the user <emphasis "
795
"role=\"italic\">melissa</emphasis> administrative permissions to the "
796
"<emphasis role=\"italic\">share</emphasis> example, you would edit the "
797
"<filename>/etc/samba/smb.conf</filename> file, and add the following line "
798
"under the <emphasis>[share]</emphasis> entry:"
801
#: serverguide/C/windows-networking.xml:558(programlisting)
805
" admin users = melissa\n"
808
" admin users = melissa\n"
810
#: serverguide/C/windows-networking.xml:562(para)
812
"After editing <filename>/etc/samba/smb.conf</filename>, restart Samba for "
813
"the changes to take effect:"
816
#: serverguide/C/windows-networking.xml:571(para)
818
"For the <emphasis>read list</emphasis> and <emphasis>write list</emphasis> "
819
"to work the Samba security mode must <emphasis>not</emphasis> be set to "
820
"<emphasis role=\"italic\">security = share</emphasis>"
823
#: serverguide/C/windows-networking.xml:577(para)
825
"Now that Samba has been configured to limit which groups have access to the "
826
"shared directory, the filesystem permissions need to be updated."
829
#: serverguide/C/windows-networking.xml:582(para)
831
"Traditional Linux file permissions do not map well to Windows NT Access "
832
"Control Lists (ACLs). Fortunately POSIX ACLs are available on Ubuntu servers "
833
"providing more fine grained control. For example, to enable ACLs on "
834
"<filename>/srv</filename> an EXT3 filesystem, edit "
835
"<filename>/etc/fstab</filename> adding the <emphasis>acl</emphasis> option:"
838
#: serverguide/C/windows-networking.xml:589(programlisting)
842
"UUID=66bcdd2e-8861-4fb0-b7e4-e61c569fe17d /srv ext3 noatime,relatime,acl "
846
"UUID=66bcdd2e-8861-4fb0-b7e4-e61c569fe17d /srv ext3 noatime,relatime,acl 0 "
849
#: serverguide/C/windows-networking.xml:593(para)
850
msgid "Then remount the partition:"
851
msgstr "Puèi remontatz la particion :"
853
#: serverguide/C/windows-networking.xml:598(command)
854
msgid "sudo mount -v -o remount /srv"
855
msgstr "sudo mount -v -o remount /srv"
857
#: serverguide/C/windows-networking.xml:602(para)
859
"The above example assumes <filename>/srv</filename> on a separate partition. "
860
"If <filename>/srv</filename>, or wherever you have configured your share "
861
"path, is part of the <filename>/</filename> partition a reboot may be "
865
#: serverguide/C/windows-networking.xml:609(para)
867
"To match the Samba configuration above the <emphasis>sysadmin</emphasis> "
868
"group will be given read, write, and execute permissions to "
869
"<filename>/srv/samba/share</filename>, the <emphasis>qa</emphasis> group "
870
"will be given read and execute permissions, and the files will be owned by "
871
"the username <emphasis>melissa</emphasis>. Enter the following in a terminal:"
874
#: serverguide/C/windows-networking.xml:617(command)
875
msgid "sudo chown -R melissa /srv/samba/share/"
876
msgstr "sudo chown -R melissa /srv/samba/share/"
878
#: serverguide/C/windows-networking.xml:618(command)
879
msgid "sudo chgrp -R sysadmin /srv/samba/share/"
880
msgstr "sudo chgrp -R sysadmin /srv/samba/share/"
882
#: serverguide/C/windows-networking.xml:619(command)
883
msgid "sudo setfacl -R -m g:qa:rx /srv/samba/share/"
884
msgstr "sudo setfacl -R -m g:qa:rx /srv/samba/share/"
886
#: serverguide/C/windows-networking.xml:623(para)
888
"The <application>setfacl</application> command above gives "
889
"<emphasis>execute</emphasis> permissions to all files in the "
890
"<filename>/srv/samba/share</filename> directory, which you may or may not "
894
#: serverguide/C/windows-networking.xml:629(para)
896
"Now from a Windows client you should notice the new file permissions are "
897
"implemented. See the <application>acl</application> and "
898
"<application>setfacl</application> man pages for more information on POSIX "
902
#: serverguide/C/windows-networking.xml:637(title)
903
msgid "Samba AppArmor Profile"
904
msgstr "Perfil AppArmor per Samba"
906
#: serverguide/C/windows-networking.xml:639(para)
908
"Ubuntu comes with the <application>AppArmor</application> security module, "
909
"which provides mandatory access controls. The default AppArmor profile for "
910
"Samba will need to be adapted to your configuration. For more details on "
911
"using AppArmor see <xref linkend=\"apparmor\"/>."
914
#: serverguide/C/windows-networking.xml:645(para)
916
"There are default AppArmor profiles for <filename>/usr/sbin/smbd</filename> "
917
"and <filename>/usr/sbin/nmbd</filename>, the Samba daemon binaries, as part "
918
"of the <application>apparmor-profiles</application> packages. To install the "
919
"package, from a terminal prompt enter:"
922
#: serverguide/C/windows-networking.xml:652(command) serverguide/C/security.xml:925(command)
923
msgid "sudo apt-get install apparmor-profiles"
924
msgstr "sudo apt-get install apparmor-profiles"
926
#: serverguide/C/windows-networking.xml:656(para)
927
msgid "This package contains profiles for several other binaries."
930
#: serverguide/C/windows-networking.xml:661(para)
932
"By default the profiles for <application>smbd</application> and "
933
"<application>nmbd</application> are in <emphasis>complain</emphasis> mode "
934
"allowing Samba to work without modifying the profile, and only logging "
935
"errors. To place the <application>smbd</application> profile into "
936
"<emphasis>enforce</emphasis> mode, and have Samba work as expected, the "
937
"profile will need to be modified to reflect any directories that are shared."
940
#: serverguide/C/windows-networking.xml:668(para)
942
"Edit <filename>/etc/apparmor.d/usr.sbin.smbd</filename> adding information "
943
"for <emphasis>[share]</emphasis> from the file server example:"
946
#: serverguide/C/windows-networking.xml:673(programlisting)
950
" /srv/samba/share/ r,\n"
951
" /srv/samba/share/** rwkix,\n"
954
" /srv/samba/share/ r,\n"
955
"/srv/samba/share/** rwkix,\n"
957
#: serverguide/C/windows-networking.xml:678(para)
959
"Now place the profile into <emphasis>enforce</emphasis> and reload it:"
962
#: serverguide/C/windows-networking.xml:683(command)
963
msgid "sudo aa-enforce /usr/sbin/smbd"
964
msgstr "sudo aa-enforce /usr/sbin/smbd"
966
#: serverguide/C/windows-networking.xml:684(command)
967
msgid "cat /etc/apparmor.d/usr.sbin.smbd | sudo apparmor_parser -r"
968
msgstr "cat /etc/apparmor.d/usr.sbin.smbd | sudo apparmor_parser -r"
970
#: serverguide/C/windows-networking.xml:687(para)
972
"You should now be able to read, write, and execute files in the shared "
973
"directory as normal, and the <application>smbd</application> binary will "
974
"have access to only the configured files and directories. Be sure to add "
975
"entries for each directory you configure Samba to share. Also, any errors "
976
"will be logged to <filename>/var/log/syslog</filename>."
979
#: serverguide/C/windows-networking.xml:712(para) serverguide/C/windows-networking.xml:1082(para)
982
"url=\"http://www.oreilly.com/catalog/9780596007690/\">Using Samba</ulink> is "
983
"also a good reference."
986
#: serverguide/C/windows-networking.xml:718(para)
988
"<ulink url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/securing-"
989
"samba.html\">Chapter 18</ulink> of the Samba HOWTO Collection is devoted to "
993
#: serverguide/C/windows-networking.xml:724(para)
995
"For more information on Samba and ACLs see the <ulink "
996
"url=\"http://samba.org/samba/docs/man/Samba-HOWTO-"
997
"Collection/AccessControls.html#id397568\">Samba ACLs page </ulink>."
1000
#: serverguide/C/windows-networking.xml:740(title)
1001
msgid "Samba as a Domain Controller"
1002
msgstr "Samba coma contrarotlador de domeni"
1004
#: serverguide/C/windows-networking.xml:742(para)
1006
"Although it cannot act as an Active Directory Primary Domain Controller "
1007
"(PDC), a Samba server can be configured to appear as a Windows NT4-style "
1008
"domain controller. A major advantage of this configuration is the ability to "
1009
"centralize user and machine credentials. Samba can also use multiple "
1010
"backends to store the user information."
1013
#: serverguide/C/windows-networking.xml:749(title)
1014
msgid "Primary Domain Controller"
1015
msgstr "Contrarotlador principal de domeni"
1017
#: serverguide/C/windows-networking.xml:751(para)
1019
"This section covers configuring Samba as a Primary Domain Controller (PDC) "
1020
"using the default smbpasswd backend."
1023
#: serverguide/C/windows-networking.xml:758(para)
1025
"First, install Samba, and <application>libpam-smbpass</application> to sync "
1026
"the user accounts, by entering the following in a terminal prompt:"
1029
#: serverguide/C/windows-networking.xml:764(command) serverguide/C/windows-networking.xml:980(command)
1030
msgid "sudo apt-get install samba libpam-smbpass"
1031
msgstr "sudo apt-get install samba libpam-smbpass"
1033
#: serverguide/C/windows-networking.xml:770(para)
1035
"Next, configure Samba by editing <filename>/etc/samba/smb.conf</filename>. "
1036
"The <emphasis>security</emphasis> mode should be set to <emphasis "
1037
"role=\"italic\">user</emphasis>, and the <emphasis>workgroup</emphasis> "
1038
"should relate to your organization:"
1041
#: serverguide/C/windows-networking.xml:785(para)
1043
"In the commented <quote>Domains</quote> section add or uncomment the "
1047
#: serverguide/C/windows-networking.xml:789(programlisting)
1051
" domain logons = yes\n"
1052
" logon path = \\\\%N\\%U\\profile\n"
1053
" logon drive = H:\n"
1054
" logon home = \\\\%N\\%U\n"
1055
" logon script = logon.cmd\n"
1056
" add machine script = sudo /usr/sbin/useradd -N -g machines -c Machine -d "
1057
"/var/lib/samba -s /bin/false %u\n"
1060
#: serverguide/C/windows-networking.xml:800(para)
1062
"<emphasis>domain logons:</emphasis> provides the netlogon service causing "
1063
"Samba to act as a domain controller."
1065
"<emphasis>domain logons :</emphasis> permet a Samba d'agir coma un "
1066
"contrarotlador de domeni"
1068
#: serverguide/C/windows-networking.xml:805(para)
1070
"<emphasis>logon path:</emphasis> places the user's Windows profile into "
1071
"their home directory. It is also possible to configure a "
1072
"<emphasis>[profiles]</emphasis> share placing all profiles under a single "
1076
#: serverguide/C/windows-networking.xml:811(para)
1078
"<emphasis>logon drive:</emphasis> specifies the home directory local path."
1081
#: serverguide/C/windows-networking.xml:816(para)
1083
"<emphasis>logon home:</emphasis> specifies the home directory location."
1086
#: serverguide/C/windows-networking.xml:821(para)
1088
"<emphasis>logon script:</emphasis> determines the script to be run locally "
1089
"once a user has logged in. The script needs to be placed in the "
1090
"<emphasis>[netlogon]</emphasis> share."
1093
#: serverguide/C/windows-networking.xml:827(para)
1095
"<emphasis>add machine script:</emphasis> a script that will automatically "
1096
"create the <emphasis>Machine Trust Account</emphasis> needed for a "
1097
"workstation to join the domain."
1100
#: serverguide/C/windows-networking.xml:831(para)
1102
"In this example the <emphasis>machines</emphasis> group will need to be "
1103
"created using the <application>addgroup</application> utility see <xref "
1104
"linkend=\"adding-deleting-users\"/> for details."
1107
#: serverguide/C/windows-networking.xml:839(para)
1109
"If you wish to not use <emphasis>Roaming Profiles</emphasis> leave the "
1110
"<emphasis>logon home</emphasis> and <emphasis>logon path</emphasis> options "
1114
#: serverguide/C/windows-networking.xml:848(para)
1116
"Uncomment the <emphasis>[homes]</emphasis> share to allow the <emphasis "
1117
"role=\"italic\">logon home</emphasis> to be mapped:"
1120
#: serverguide/C/windows-networking.xml:853(programlisting)
1125
" comment = Home Directories\n"
1126
" browseable = no\n"
1128
" create mask = 0700\n"
1129
" directory mask = 0700\n"
1130
" valid users = %S\n"
1134
" comment = Home Directories\n"
1135
" browseable = no\n"
1137
" create mask = 0700\n"
1138
" directory mask = 0700\n"
1139
" valid users = %S\n"
1141
#: serverguide/C/windows-networking.xml:866(para)
1143
"When configured as a domain controller a <emphasis>[netlogon]</emphasis> "
1144
"share needs to be configured. To enable the share, uncomment:"
1147
#: serverguide/C/windows-networking.xml:871(programlisting)
1152
" comment = Network Logon Service\n"
1153
" path = /srv/samba/netlogon\n"
1155
" read only = yes\n"
1156
" share modes = no\n"
1160
"comment = Servici d'autentificacion de la ret (netlogon)\n"
1161
"path = /srv/samba/netlogon\n"
1164
"share modes = no\n"
1166
#: serverguide/C/windows-networking.xml:881(para)
1168
"The original <emphasis>netlogon</emphasis> share path is "
1169
"<filename>/home/samba/netlogon</filename>, but according to the Filesystem "
1170
"Hierarchy Standard (FHS), <ulink url=\"http://www.pathname.com/fhs/pub/fhs-"
1171
"2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM\">/srv</ulink> is the correct "
1172
"location for site-specific data provided by the system."
1175
#: serverguide/C/windows-networking.xml:892(para)
1177
"Now create the <filename role=\"directory\">netlogon</filename> directory, "
1178
"and an empty (for now) <filename>logon.cmd</filename> script file:"
1181
#: serverguide/C/windows-networking.xml:898(command)
1182
msgid "sudo mkdir -p /srv/samba/netlogon"
1183
msgstr "sudo mkdir -p /srv/samba/netlogon"
1185
#: serverguide/C/windows-networking.xml:899(command)
1186
msgid "sudo touch /srv/samba/netlogon/logon.cmd"
1187
msgstr "sudo touch /srv/samba/netlogon/logon.cmd"
1189
#: serverguide/C/windows-networking.xml:902(para)
1191
"You can enter any normal Windows logon script commands in "
1192
"<filename>logon.cmd</filename> to customize the client's environment."
1195
#: serverguide/C/windows-networking.xml:910(para)
1197
"With <emphasis>root</emphasis> being disabled by default, in order to join a "
1198
"workstation to the domain, a system group needs to be mapped to the Windows "
1199
"<emphasis>Domain Admins</emphasis> group. Using the "
1200
"<application>net</application> utility, from a terminal enter:"
1203
#: serverguide/C/windows-networking.xml:917(command)
1205
"sudo net groupmap add ntgroup=\"Domain Admins\" unixgroup=sysadmin rid=512 "
1208
"sudo net groupmap add ntgroup=\"Domain Admins\" unixgroup=sysadmin rid=512 "
1211
#: serverguide/C/windows-networking.xml:921(para)
1213
"Change <emphasis role=\"italic\">sysadmin</emphasis> to whichever group you "
1214
"prefer. Also, the user used to join the domain needs to be a member of the "
1215
"<emphasis>sysadmin</emphasis> group, as well as a member of the system "
1216
"<emphasis>admin</emphasis> group. The <emphasis>admin</emphasis> group "
1217
"allows <application>sudo</application> use."
1220
#: serverguide/C/windows-networking.xml:932(para)
1221
msgid "Finally, restart Samba to enable the new domain controller:"
1224
#: serverguide/C/windows-networking.xml:943(para)
1226
"You should now be able to join Windows clients to the Domain in the same "
1227
"manner as joining them to an NT4 domain running on a Windows server."
1230
#: serverguide/C/windows-networking.xml:953(title)
1231
msgid "Backup Domain Controller"
1232
msgstr "Contrarotlador segondari de domeni"
1234
#: serverguide/C/windows-networking.xml:955(para)
1236
"With a Primary Domain Controller (PDC) on the network it is best to have a "
1237
"Backup Domain Controller (BDC) as well. This will allow clients to "
1238
"authenticate in case the PDC becomes unavailable."
1241
#: serverguide/C/windows-networking.xml:960(para)
1243
"When configuring Samba as a BDC you need a way to sync account information "
1244
"with the PDC. There are multiple ways of accomplishing this "
1245
"<application>scp</application>, <application>rsync</application>, or by "
1246
"using <application>LDAP</application> as the <emphasis>passdb "
1247
"backend</emphasis>."
1250
#: serverguide/C/windows-networking.xml:966(para)
1252
"Using LDAP is the most robust way to sync account information, because both "
1253
"domain controllers can use the same information in real time. However, "
1254
"setting up a LDAP server may be overly complicated for a small number of "
1255
"user and computer accounts. See <xref linkend=\"samba-ldap\"/> for details."
1258
#: serverguide/C/windows-networking.xml:975(para)
1260
"First, install <application>samba</application> and <application>libpam-"
1261
"smbpass</application>. From a terminal enter:"
1263
"Per començar, installatz <application>samba</application> e "
1264
"<application>libpam-smbpass</application>. Picatz dins un terminal :"
1266
#: serverguide/C/windows-networking.xml:986(para)
1268
"Now, edit <filename>/etc/samba/smb.conf</filename> and uncomment the "
1269
"following in the <emphasis>[global]</emphasis>:"
1272
#: serverguide/C/windows-networking.xml:999(para)
1273
msgid "In the commented <emphasis>Domains</emphasis> uncomment or add:"
1276
#: serverguide/C/windows-networking.xml:1003(programlisting)
1280
" domain logons = yes\n"
1281
" domain master = no\n"
1284
" domain logons = yes\n"
1285
" domain master = no\n"
1287
#: serverguide/C/windows-networking.xml:1011(para)
1289
"Make sure a user has rights to read the files in "
1290
"<filename>/var/lib/samba</filename>. For example, to allow users in the "
1291
"<emphasis>admin</emphasis> group to <application>scp</application> the "
1295
#: serverguide/C/windows-networking.xml:1017(command)
1296
msgid "sudo chgrp -R admin /var/lib/samba"
1297
msgstr "sudo chgrp -R admin /var/lib/samba"
1299
#: serverguide/C/windows-networking.xml:1023(para)
1301
"Next, sync the user accounts, using <application>scp</application> to copy "
1302
"the <filename>/var/lib/samba</filename> directory from the PDC:"
1305
#: serverguide/C/windows-networking.xml:1029(command)
1306
msgid "sudo scp -r username@pdc:/var/lib/samba /var/lib"
1307
msgstr "sudo scp -r username@pdc:/var/lib/samba /var/lib"
1309
#: serverguide/C/windows-networking.xml:1033(para)
1311
"Replace <emphasis>username</emphasis> with a valid username and "
1312
"<emphasis>pdc</emphasis> with the hostname or IP Address of your actual PDC."
1315
#: serverguide/C/windows-networking.xml:1042(para)
1316
msgid "Finally, restart <application>samba</application>:"
1319
#: serverguide/C/windows-networking.xml:1053(para)
1321
"You can test that your Backup Domain controller is working by stopping the "
1322
"Samba daemon on the PDC, then trying to login to a Windows client joined to "
1326
#: serverguide/C/windows-networking.xml:1058(para)
1328
"Another thing to keep in mind is if you have configured the <emphasis>logon "
1329
"home</emphasis> option as a directory on the PDC, and the PDC becomes "
1330
"unavailable, access to the user's <emphasis>Home</emphasis> drive will also "
1331
"be unavailable. For this reason it is best to configure the <emphasis>logon "
1332
"home</emphasis> to reside on a separate file server from the PDC and BDC."
1335
#: serverguide/C/windows-networking.xml:1088(para)
1337
"<ulink url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/samba-"
1338
"pdc.html\">Chapter 4</ulink> of the Samba HOWTO Collection explains setting "
1339
"up a Primary Domain Controller."
1342
#: serverguide/C/windows-networking.xml:1094(para)
1344
"<ulink url=\"http://us3.samba.org/samba/docs/man/Samba-HOWTO-"
1345
"Collection/samba-bdc.html\">Chapter 5</ulink> of the Samba HOWTO Collection "
1346
"explains setting up a Backup Domain Controller."
1349
#: serverguide/C/windows-networking.xml:1109(title)
1350
msgid "Samba Active Directory Integration"
1351
msgstr "Integracion de Samba a l'Active Directory."
1353
#: serverguide/C/windows-networking.xml:1112(title)
1354
msgid "Accessing a Samba Share"
1355
msgstr "Accedir a un partiment Samba"
1357
#: serverguide/C/windows-networking.xml:1114(para)
1359
"Another, use for Samba is to integrate into an existing Windows network. "
1360
"Once part of an Active Directory domain, Samba can provide file and print "
1361
"services to AD users."
1364
#: serverguide/C/windows-networking.xml:1119(para)
1366
"The simplest way to join an AD domain is to use <application>Likewise-"
1367
"open</application>. For detailed instructions see <xref linkend=\"likewise-"
1371
#: serverguide/C/windows-networking.xml:1124(para)
1373
"Once part of the domain, enter the following command in the terminal prompt:"
1376
#: serverguide/C/windows-networking.xml:1129(command)
1377
msgid "sudo apt-get install samba smbfs smbclient"
1378
msgstr "sudo apt-get install samba smbfs smbclient"
1380
#: serverguide/C/windows-networking.xml:1132(para)
1382
"Since the <application>likewise-open</application> and "
1383
"<application>samba</application> packages use separate "
1384
"<filename>secrets.tdb</filename> files, a symlink will need to be created in "
1385
"<filename role=\"directory\">/var/lib/samba</filename>:"
1388
#: serverguide/C/windows-networking.xml:1138(command)
1389
msgid "sudo mv /var/lib/samba/secrets.tdb /var/lib/samba/secrets.tdb.orig"
1390
msgstr "sudo mv /var/lib/samba/secrets.tdb /var/lib/samba/secrets.tdb.orig"
1392
#: serverguide/C/windows-networking.xml:1139(command)
1393
msgid "sudo ln -s /etc/samba/secrets.tdb /var/lib/samba"
1394
msgstr "sudo ln -s /etc/samba/secrets.tdb /var/lib/samba"
1396
#: serverguide/C/windows-networking.xml:1142(para)
1397
msgid "Next, edit <filename>/etc/samba/smb.conf</filename> changing:"
1400
#: serverguide/C/windows-networking.xml:1146(programlisting)
1404
" workgroup = EXAMPLE\n"
1407
" realm = EXAMPLE.COM\n"
1409
" idmap backend = lwopen\n"
1410
" idmap uid = 50-9999999999\n"
1411
" idmap gid = 50-9999999999\n"
1414
" workgroup = EXAMPLE\n"
1417
"realm = EXAMPLE.COM\n"
1419
"idmap backend = lwopen\n"
1420
"idmap uid = 50-9999999999\n"
1421
"idmap gid = 50-9999999999\n"
1423
#: serverguide/C/windows-networking.xml:1157(para)
1425
"Restart <application>samba</application> for the new settings to take effect:"
1428
#: serverguide/C/windows-networking.xml:1165(para)
1430
"You should now be able to access any <application>Samba</application> shares "
1431
"from a Windows client. However, be sure to give the appropriate AD users or "
1432
"groups access to the share directory. See <xref linkend=\"samba-fileprint-"
1433
"security\"/> for more details."
1436
#: serverguide/C/windows-networking.xml:1173(title)
1437
msgid "Accessing a Windows Share"
1438
msgstr "Accedir a un partiment Windows"
1440
#: serverguide/C/windows-networking.xml:1175(para)
1442
"Now that the Samba server is part of the Active Directory domain you can "
1443
"access any Windows server shares:"
1446
#: serverguide/C/windows-networking.xml:1182(para)
1448
"To mount a Windows file share enter the following in a terminal prompt:"
1451
#: serverguide/C/windows-networking.xml:1186(command)
1452
msgid "mount.cifs //fs01.example.com/share mount_point"
1453
msgstr "mount.cifs //fs01.example.com/partage punt_de_montatge"
1455
#: serverguide/C/windows-networking.xml:1189(para)
1457
"It is also possible to access shares on computers not part of an AD domain, "
1458
"but a username and password will need to be provided."
1461
#: serverguide/C/windows-networking.xml:1197(para)
1463
"To mount the share during boot place an entry in "
1464
"<filename>/etc/fstab</filename>, for example:"
1467
#: serverguide/C/windows-networking.xml:1201(programlisting)
1471
"//192.168.0.5/share /mnt/windows cifs auto,username=steve,password=secret,rw "
1475
"//192.168.0.5/share /mnt/windows cifs auto,username=steve,password=secret,rw "
1478
#: serverguide/C/windows-networking.xml:1208(para)
1480
"Another way to copy files from a Windows server is to use the "
1481
"<application>smbclient</application> utility. To list the files in a Windows "
1485
#: serverguide/C/windows-networking.xml:1214(command)
1486
msgid "smbclient //fs01.example.com/share -k -c \"ls\""
1487
msgstr "smbclient //fs01.example.com/share -k -c \"ls\""
1489
#: serverguide/C/windows-networking.xml:1220(para)
1490
msgid "To copy a file from the share, enter:"
1493
#: serverguide/C/windows-networking.xml:1225(command)
1494
msgid "smbclient //fs01.example.com/share -k -c \"get file.txt\""
1495
msgstr "smbclient //fs01.example.com/partage -k -c \"get fichièr.txt\""
1497
#: serverguide/C/windows-networking.xml:1228(para)
1499
"This will copy the <filename>file.txt</filename> into the current directory."
1502
#: serverguide/C/windows-networking.xml:1235(para)
1503
msgid "And to copy a file to the share:"
1504
msgstr "Per copiar un fichièr cap al partiment :"
1506
#: serverguide/C/windows-networking.xml:1240(command)
1507
msgid "smbclient //fs01.example.com/share -k -c \"put /etc/hosts hosts\""
1508
msgstr "smbclient //fs01.example.com/share -k -c \"put /etc/hosts hosts\""
1510
#: serverguide/C/windows-networking.xml:1243(para)
1512
"This will copy the <filename>/etc/hosts</filename> to "
1513
"<filename>//fs01.example.com/share/hosts</filename>."
1516
#: serverguide/C/windows-networking.xml:1250(para)
1518
"The <emphasis>-c</emphasis> option used above allows you to execute the "
1519
"<application>smbclient</application> command all at once. This is useful for "
1520
"scripting and minor file operations. To enter the <emphasis>smb: \\"
1521
"></emphasis> prompt, a FTP like prompt where you can execute normal file "
1522
"and directory commands, simply execute:"
1525
#: serverguide/C/windows-networking.xml:1257(command)
1526
msgid "smbclient //fs01.example.com/share -k"
1527
msgstr "smbclient //fs01.example.com/partiment -k"
1529
#: serverguide/C/windows-networking.xml:1264(para)
1531
"Replace all instances of <emphasis>fs01.example.com/share</emphasis>, "
1532
"<emphasis>//192.168.0.5/share</emphasis>, "
1533
"<emphasis>username=steve,password=secret</emphasis>, and "
1534
"<emphasis>file.txt</emphasis> with your server's IP, hostname, share name, "
1535
"file name, and an actual username and password with rights to the share."
1538
#: serverguide/C/windows-networking.xml:1275(para)
1540
"For more <application>smbclient</application> options see the man page: "
1541
"<command>man smbclient</command>, also available <ulink "
1542
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man1/smbclient.1.html\">on"
1546
#: serverguide/C/windows-networking.xml:1280(para)
1548
"The <application>mount.cifs</application><ulink "
1549
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/mount.cifs.8.html\">m"
1550
"an page</ulink> is also useful for more detailed information."
1553
#: serverguide/C/windows-networking.xml:1293(title)
1554
msgid "Likewise Open"
1555
msgstr "Likewise Open"
1557
#: serverguide/C/windows-networking.xml:1295(para)
1559
"<application>Likewise Open</application> simplifies the necessary "
1560
"configuration needed to authenticate a Linux machine to an Active Directory "
1561
"domain. Based on <application>winbind</application>, the "
1562
"<application>likewise-open</application> package takes the pain out of "
1563
"integrating Ubuntu authentication into an existing Windows network."
1566
#: serverguide/C/windows-networking.xml:1304(para)
1568
"There are two ways to use Likewise Open, <application>likewise-"
1569
"open</application> the command line utility and <application>likewise-open-"
1570
"gui</application>. This section focuses on the command line utility."
1573
#: serverguide/C/windows-networking.xml:1309(para)
1575
"To install the <application>likewise-open</application> package, open a "
1576
"terminal prompt and enter:"
1579
#: serverguide/C/windows-networking.xml:1314(command)
1580
msgid "sudo apt-get install likewise-open"
1581
msgstr "sudo apt-get install likewise-open"
1583
#: serverguide/C/windows-networking.xml:1319(title)
1584
msgid "Joining a Domain"
1585
msgstr "Rejónher un domeni"
1587
#: serverguide/C/windows-networking.xml:1321(para)
1589
"The main executable file of the <application>likewise-open</application> "
1590
"package is <filename>/usr/bin/domainjoin-cli</filename>, which is used to "
1591
"join your computer to the domain. Before you join a domain you will need to "
1592
"make sure you have:"
1595
#: serverguide/C/windows-networking.xml:1329(para)
1597
"Access to an Active Directory user with appropriate rights to join the "
1601
#: serverguide/C/windows-networking.xml:1334(para)
1603
"The <emphasis>Fully Qualified Domain Name</emphasis> (FQDN) of the domain "
1604
"you want to join. If your AD domain does not match a valid domain such as "
1605
"<emphasis role=\"italic\">example.com</emphasis>, it is likely that it has "
1606
"the form of <emphasis>domainname.local</emphasis>."
1609
#: serverguide/C/windows-networking.xml:1341(para)
1611
"DNS for the domain setup properly. In a production AD environment this "
1612
"should be the case. Proper Microsoft DNS is needed so that client "
1613
"workstations can determine the Active Directory domain is available."
1616
#: serverguide/C/windows-networking.xml:1345(para)
1618
"If you don't have a Windows DNS server on your network, see <xref "
1619
"linkend=\"likewise-open-ms-dns\"/> for details."
1622
#: serverguide/C/windows-networking.xml:1352(para)
1623
msgid "To join a domain, from a terminal prompt enter:"
1626
#: serverguide/C/windows-networking.xml:1357(command)
1627
msgid "sudo domainjoin-cli join example.com Administrator"
1628
msgstr "sudo domainjoin-cli join example.com Administrator"
1630
#: serverguide/C/windows-networking.xml:1361(para)
1632
"Replace <emphasis>example.com</emphasis> with your domain name, and "
1633
"<emphasis>Administrator</emphasis> with the appropriate user name."
1636
#: serverguide/C/windows-networking.xml:1367(para)
1638
"You will then be prompted for the user's password. If all goes well a "
1639
"<emphasis>SUCCESS</emphasis> message should be printed to the console."
1642
#: serverguide/C/windows-networking.xml:1373(para)
1644
"After joining the domain, it is necessary to reboot before attempting to "
1645
"authenticate against the domain."
1648
#: serverguide/C/windows-networking.xml:1379(para)
1650
"After successfully joining an Ubuntu machine to an Active Directory domain "
1651
"you can authenticate using any valid AD user. To login you will need to "
1652
"enter the user name as 'domain\\username'. For example to ssh to a server "
1653
"joined to the domain enter:"
1656
#: serverguide/C/windows-networking.xml:1386(command)
1657
msgid "ssh 'example\\steve'@hostname"
1658
msgstr "ssh 'example\\steve'@hostname"
1660
#: serverguide/C/windows-networking.xml:1390(para)
1662
"If configuring a Desktop the user name will need to be prefixed with "
1663
"<emphasis role=\"italic\">domain\\</emphasis> in the graphical logon as well."
1666
#: serverguide/C/windows-networking.xml:1396(para)
1668
"To make likewise-open use a default domain, you can add the following "
1669
"statement to <filename>/etc/samba/lwiauthd.conf</filename>:"
1672
#: serverguide/C/windows-networking.xml:1400(programlisting)
1676
"winbind use default domain = yes\n"
1679
"winbind use default domain = yes\n"
1681
#: serverguide/C/windows-networking.xml:1404(para)
1682
msgid "Then restart the <application>likewise-open</application> daemons:"
1685
#: serverguide/C/windows-networking.xml:1409(command)
1686
msgid "sudo /etc/init.d/likewise-open restart"
1687
msgstr "sudo /etc/init.d/likewise-open restart"
1689
#: serverguide/C/windows-networking.xml:1413(para)
1691
"Once configured for a <emphasis>default domain</emphasis> the <emphasis "
1692
"role=\"italic\">'domain\\'</emphasis> is no longer required, users can login "
1693
"using only their username."
1696
#: serverguide/C/windows-networking.xml:1419(para)
1698
"The <application>domainjoin-cli</application> utility can also be used to "
1699
"leave the domain. From a terminal:"
1702
#: serverguide/C/windows-networking.xml:1424(command)
1703
msgid "sudo domainjoin-cli leave"
1704
msgstr "sudo domainjoin-cli leave"
1706
#: serverguide/C/windows-networking.xml:1429(title) serverguide/C/security.xml:1777(title)
1707
msgid "Other Utilities"
1708
msgstr "Autres utilitaris"
1710
#: serverguide/C/windows-networking.xml:1431(para)
1712
"The <application>likewise-open</application> package comes with a few other "
1713
"utilities that may be useful for gathering information about the Active "
1714
"Directory environment. These utilities are used to join the machine to the "
1715
"domain, and are the same as those available in the <application>samba-"
1716
"common</application> and <application>winbind</application> packages:"
1719
#: serverguide/C/windows-networking.xml:1440(para)
1721
"<application>lwinet</application>: Returns information about the network and "
1724
"<application>lwinet</application> : renvia d'informacions sus la ret e lo "
1727
#: serverguide/C/windows-networking.xml:1445(para)
1729
"<application>lwimsg</application>: Allows interaction with the "
1730
"<application>likewise-winbindd</application> daemon."
1733
#: serverguide/C/windows-networking.xml:1450(para)
1735
"<application>lwiinfo</application>: Displays information about various parts "
1739
#: serverguide/C/windows-networking.xml:1456(para)
1740
msgid "Please refer to each utility's man page specific for details."
1743
#: serverguide/C/windows-networking.xml:1462(title) serverguide/C/mail.xml:351(title) serverguide/C/mail.xml:1598(title) serverguide/C/dns.xml:338(title)
1744
msgid "Troubleshooting"
1747
#: serverguide/C/windows-networking.xml:1466(para)
1749
"If the client has trouble joining the domain, double check that the "
1750
"Microsoft DNS is listed first in <filename>/etc/resolv.conf</filename>. For "
1754
#: serverguide/C/windows-networking.xml:1471(programlisting)
1758
"nameserver 192.168.0.1\n"
1761
"nameserver 192.168.0.1\n"
1763
#: serverguide/C/windows-networking.xml:1476(para)
1765
"For more information when joining a domain, use the <emphasis>--loglevel "
1766
"verbose</emphasis> or <emphasis>--advanced</emphasis> option of the "
1767
"<application>domainjoin-cli</application> utility:"
1770
#: serverguide/C/windows-networking.xml:1482(command)
1771
msgid "sudo domainjoin-cli --loglevel verbose join example.com Administrator"
1773
"sudo domainjoin-cli --loglevel verbose join example.com Administrator"
1775
#: serverguide/C/windows-networking.xml:1486(para)
1777
"If an Active Directory user has trouble logging in, check the "
1778
"<filename>/var/log/auth.log</filename> for details."
1781
#: serverguide/C/windows-networking.xml:1491(para)
1783
"When joining an Ubuntu Desktop workstation to a domain, you may need to edit "
1784
"<filename>/etc/nsswitch.conf</filename> if your AD domain uses the <emphasis "
1785
"role=\"italic\">.local</emphasis> syntax. In order to join the domain the "
1786
"<emphasis>\"mdns4\"</emphasis> entry should be removed from the "
1787
"<emphasis>hosts</emphasis> option. For example:"
1790
#: serverguide/C/windows-networking.xml:1497(programlisting)
1794
"hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4\n"
1797
"hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4\n"
1799
#: serverguide/C/windows-networking.xml:1501(para)
1800
msgid "Change the above to:"
1801
msgstr "Transformatz la linha çaisús en :"
1803
#: serverguide/C/windows-networking.xml:1505(programlisting)
1807
"hosts: files dns [NOTFOUND=return]\n"
1810
"hosts: files dns [NOTFOUND=return]\n"
1812
#: serverguide/C/windows-networking.xml:1509(para)
1813
msgid "Then restart networking by entering:"
1816
#: serverguide/C/windows-networking.xml:1514(command) serverguide/C/network-config.xml:559(command)
1817
msgid "sudo /etc/init.d/networking restart"
1818
msgstr "sudo /etc/init.d/networking restart"
1820
#: serverguide/C/windows-networking.xml:1517(para)
1821
msgid "You should now be able to join the Active Directory domain."
1824
#: serverguide/C/windows-networking.xml:1525(title)
1825
msgid "Microsoft DNS"
1826
msgstr "DNS Microsoft"
1828
#: serverguide/C/windows-networking.xml:1527(para)
1830
"The following are instructions for installing DNS on an Active Directory "
1831
"domain controller running Windows Server 2003, but the instructions should "
1832
"be similar for other versions:"
1835
#: serverguide/C/windows-networking.xml:1536(para)
1838
"<menuchoice><guimenuitem>Start</guimenuitem><guimenuitem>Administrative Tools"
1839
"</guimenuitem><guimenuitem>Manage Your Server</guimenuitem></menuchoice>. "
1840
"This will open the <application>Server Role Mangement</application> utility."
1843
#: serverguide/C/windows-networking.xml:1544(para)
1844
msgid "Click <guilabel>Add or remove a role</guilabel>"
1847
#: serverguide/C/windows-networking.xml:1545(para) serverguide/C/windows-networking.xml:1547(para) serverguide/C/windows-networking.xml:1550(para)
1849
msgstr "Clicatz sus « Seguent »"
1851
#: serverguide/C/windows-networking.xml:1546(para)
1852
msgid "Select \"DNS Server\""
1853
msgstr "Seleccionatz « Servidor DNS »"
1855
#: serverguide/C/windows-networking.xml:1548(para)
1856
msgid "Click Next again to proceed"
1859
#: serverguide/C/windows-networking.xml:1549(para)
1860
msgid "Select \"Create a forward lookup zone\" if it is not selected."
1861
msgstr "Marcatz « Crear una zòna de recèrca dirècta » s'es pas fach ja."
1863
#: serverguide/C/windows-networking.xml:1551(para)
1865
"Make sure \"This server maintains the zone\" is selected and click Next."
1868
#: serverguide/C/windows-networking.xml:1552(para)
1869
msgid "Enter your domain name and click Next"
1872
#: serverguide/C/windows-networking.xml:1553(para)
1873
msgid "Click Next to \"Allow only secure dynamic updates\""
1876
#: serverguide/C/windows-networking.xml:1555(para)
1878
"Enter the IP for DNS servers to forward queries to, or Select \"No, it "
1879
"should not forward queries\" and click Next."
1882
#: serverguide/C/windows-networking.xml:1559(para) serverguide/C/windows-networking.xml:1560(para)
1883
msgid "Click Finish"
1884
msgstr "Clicatz sus Acabar"
1886
#: serverguide/C/windows-networking.xml:1562(para)
1888
"DNS is now installed and can be further configured using the "
1889
"<application>Microsoft Management Console</application> DNS snap-in."
1892
#: serverguide/C/windows-networking.xml:1570(para)
1894
msgstr "Clicatz sus « Aviar »"
1896
#: serverguide/C/windows-networking.xml:1571(para)
1897
msgid "Control Panel"
1898
msgstr "Panèl de configuracion"
1900
#: serverguide/C/windows-networking.xml:1572(para)
1901
msgid "Network Connections"
1902
msgstr "Connexions a la ret"
1904
#: serverguide/C/windows-networking.xml:1573(para)
1905
msgid "Right Click \"Local Area Connection\""
1908
#: serverguide/C/windows-networking.xml:1574(para)
1909
msgid "Click Properties"
1910
msgstr "Clicatz sus « Proprietats »"
1912
#: serverguide/C/windows-networking.xml:1575(para)
1913
msgid "Double click \"Internet Protocol (TCP/IP)\""
1916
#: serverguide/C/windows-networking.xml:1576(para)
1917
msgid "Enter the Server's IP Address as the \"Preferred DNS server\""
1920
#: serverguide/C/windows-networking.xml:1577(para)
1922
msgstr "Clicatz sus Ok"
1924
#: serverguide/C/windows-networking.xml:1578(para)
1925
msgid "Click Ok again to save the settings"
1928
#: serverguide/C/windows-networking.xml:1567(para)
1930
"Next, configure the Server to use itself for DNS queries: <placeholder-1/>"
1933
#: serverguide/C/windows-networking.xml:1585(title) serverguide/C/web-servers.xml:624(title) serverguide/C/web-servers.xml:772(title) serverguide/C/web-servers.xml:922(title) serverguide/C/web-servers.xml:1017(title) serverguide/C/web-servers.xml:1239(title) serverguide/C/vpn.xml:303(title) serverguide/C/virtualization.xml:1840(title) serverguide/C/virtualization.xml:2165(title) serverguide/C/vcs.xml:539(title) serverguide/C/security.xml:877(title) serverguide/C/security.xml:1211(title) serverguide/C/security.xml:1626(title) serverguide/C/security.xml:1817(title) serverguide/C/remote-administration.xml:203(title) serverguide/C/package-management.xml:454(title) serverguide/C/other-apps.xml:330(title) serverguide/C/network-config.xml:1006(title) serverguide/C/network-config.xml:1107(title) serverguide/C/monitoring.xml:391(title) serverguide/C/monitoring.xml:527(title) serverguide/C/mail.xml:459(title) serverguide/C/mail.xml:643(title) serverguide/C/mail.xml:795(title) serverguide/C/mail.xml:1217(title) serverguide/C/mail.xml:1646(title) serverguide/C/lamp-applications.xml:259(title) serverguide/C/lamp-applications.xml:388(title) serverguide/C/lamp-applications.xml:496(title) serverguide/C/file-server.xml:284(title) serverguide/C/file-server.xml:436(title) serverguide/C/file-server.xml:619(title) serverguide/C/dns.xml:572(title) serverguide/C/clustering.xml:234(title) serverguide/C/chat.xml:107(title) serverguide/C/chat.xml:221(title) serverguide/C/backups.xml:297(title)
1935
msgstr "Referéncias"
1937
#: serverguide/C/windows-networking.xml:1587(para)
1939
"Please refer to the <ulink "
1940
"url=\"http://www.likewisesoftware.com/\">Likewise</ulink> home page for "
1941
"further information."
1944
#: serverguide/C/windows-networking.xml:1591(para)
1946
"For more <application>domainjoin-cli</application> options see the man page: "
1947
"<command>man domainjoin-cli</command>."
1950
#: serverguide/C/windows-networking.xml:1595(para)
1952
"Also, see the <ulink "
1953
"url=\"https://help.ubuntu.com/community/LikewiseOpen\">Ubuntu Wiki "
1954
"LikewiseOpen</ulink> page."
1957
#: serverguide/C/web-servers.xml:13(title)
1959
msgstr "Servidors Web"
1961
#: serverguide/C/web-servers.xml:14(para)
1963
"A Web server is a software responsible for accepting HTTP requests from "
1964
"clients, which are known as Web browsers, and serving them HTTP responses "
1965
"along with optional data contents, which usually are Web pages such as HTML "
1966
"documents and linked objects (images, etc.)."
1969
#: serverguide/C/web-servers.xml:19(title)
1970
msgid "HTTPD - Apache2 Web Server"
1971
msgstr "HTTPD - servidor Web Apache2"
1973
#: serverguide/C/web-servers.xml:20(para)
1975
"Apache is the most commonly used Web Server on Linux systems. Web Servers "
1976
"are used to serve Web Pages requested by client computers. Clients typically "
1977
"request and view Web Pages using Web Browser applications such as "
1978
"<application>Firefox</application>, <application>Opera</application>, or "
1979
"<application>Mozilla</application>."
1982
#: serverguide/C/web-servers.xml:24(para)
1984
"Users enter a Uniform Resource Locator (URL) to point to a Web server by "
1985
"means of its Fully Qualified Domain Name (FQDN) and a path to the required "
1986
"resource. For example, to view the home page of the <ulink "
1987
"url=\"http://www.ubuntu.com\">Ubuntu Web site</ulink> a user will enter only "
1988
"the FQDN. To request specific information about <ulink "
1989
"url=\"http://www.ubuntu.com/support/paid\">paid support</ulink>, a user will "
1990
"enter the FQDN followed by a path."
1993
#: serverguide/C/web-servers.xml:29(para)
1995
"The most common protocol used to transfer Web pages is the Hyper Text "
1996
"Transfer Protocol (HTTP). Protocols such as Hyper Text Transfer Protocol "
1997
"over Secure Sockets Layer (HTTPS), and File Transfer Protocol (FTP), a "
1998
"protocol for uploading and downloading files, are also supported."
2001
#: serverguide/C/web-servers.xml:33(para)
2003
"Apache Web Servers are often used in combination with the "
2004
"<application>MySQL</application> database engine, the HyperText Preprocessor "
2005
"(<application>PHP</application>) scripting language, and other popular "
2006
"scripting languages such as <application>Python</application> and "
2007
"<application>Perl</application>. This configuration is termed LAMP (Linux, "
2008
"Apache, MySQL and Perl/Python/PHP) and forms a powerful and robust platform "
2009
"for the development and deployment of Web-based applications."
2012
#: serverguide/C/web-servers.xml:42(para)
2014
"The <application>Apache2</application> web server is available in Ubuntu "
2015
"Linux. To install Apache2:"
2018
#: serverguide/C/web-servers.xml:48(para)
2019
msgid "At a terminal prompt enter the following command:"
2022
#: serverguide/C/web-servers.xml:53(command)
2023
msgid "sudo apt-get install apache2"
2024
msgstr "sudo apt-get install apache2"
2026
#: serverguide/C/web-servers.xml:63(para)
2028
"Apache2 is configured by placing <emphasis>directives</emphasis> in plain "
2029
"text configuration files. These <emphasis>directives</emphasis> are "
2030
"separated between the following files and directories:"
2033
#: serverguide/C/web-servers.xml:71(para)
2035
"<emphasis>apache2.conf:</emphasis> the main Apache2 configuration file. "
2036
"Contains settings that are <emphasis>global</emphasis> to Apache2."
2039
#: serverguide/C/web-servers.xml:77(para)
2041
"<emphasis>conf.d:</emphasis> contains configuration files which apply "
2042
"<emphasis>globally</emphasis> to Apache2. Other packages that use Apache2 to "
2043
"serve content may add files, or symlinks, to this directory."
2046
#: serverguide/C/web-servers.xml:83(para)
2048
"<emphasis>envvars:</emphasis> file where Apache2 "
2049
"<emphasis>environment</emphasis> variables are set."
2052
#: serverguide/C/web-servers.xml:88(para)
2054
"<emphasis>httpd.conf:</emphasis> historically the main Apache2 configuration "
2055
"file, named after the <application>httpd</application> daemon. The file can "
2056
"be used for <emphasis>user specific</emphasis> configuration options that "
2057
"globally effect Apache2."
2060
#: serverguide/C/web-servers.xml:95(para)
2062
"<emphasis>mods-available:</emphasis> this directory contains configuration "
2063
"files to both load <emphasis>modules</emphasis> and configure them. Not all "
2064
"modules will have specific configuration files, however."
2067
#: serverguide/C/web-servers.xml:101(para)
2069
"<emphasis>mods-enabled:</emphasis> holds <emphasis>symlinks</emphasis> to "
2070
"the files in <filename>/etc/apache2/mods-available</filename>. When a module "
2071
"configuration file is symlinked it will be enabled the next time "
2072
"<application>apache2</application> is restarted."
2075
#: serverguide/C/web-servers.xml:108(para)
2077
"<emphasis>ports.conf:</emphasis> houses the directives that determine which "
2078
"TCP ports Apache2 is listening on."
2081
#: serverguide/C/web-servers.xml:113(para)
2083
"<emphasis>sites-available:</emphasis> this directory has configuration files "
2084
"for Apache2 <emphasis>Virtual Hosts</emphasis>. Virtual Hosts allow Apache2 "
2085
"to be configured for multiple sites that have separate configurations."
2088
#: serverguide/C/web-servers.xml:119(para)
2090
"<emphasis>sites-enabled:</emphasis> like mods-enabled, <filename "
2091
"role=\"directory\">sites-enabled</filename> contains symlinks to the "
2092
"<filename>/etc/apache2/sites-available</filename> directory. Similarly when "
2093
"a configuration file in sites-available is symlinked, the site configured by "
2094
"it will be active once Apache2 is restarted."
2097
#: serverguide/C/web-servers.xml:127(para)
2099
"In addition, other configuration files may be added using the "
2100
"<emphasis>Include</emphasis> directive, and wildcards can be used to include "
2101
"many configuration files. Any directive may be placed in any of these "
2102
"configuration files. Changes to the main configuration files are only "
2103
"recognized by Apache2 when it is started or restarted."
2106
#: serverguide/C/web-servers.xml:136(para)
2108
"The server also reads a file containing mime document types; the filename is "
2109
"set by the <emphasis>TypesConfig</emphasis> directive, and is "
2110
"<filename>/etc/mime.types</filename> by default."
2113
#: serverguide/C/web-servers.xml:141(title)
2114
msgid "Basic Settings"
2115
msgstr "Reglatges de basa"
2117
#: serverguide/C/web-servers.xml:142(para)
2119
"This section explains Apache2 server essential configuration parameters. "
2120
"Refer to the <ulink url=\"http://httpd.apache.org/docs/2.2/\">Apache2 "
2121
"Documentation</ulink> for more details."
2124
#: serverguide/C/web-servers.xml:150(para)
2126
"Apache2 ships with a virtual-host-friendly default configuration. That is, "
2127
"it is configured with a single default virtual host (using the "
2128
"<emphasis>VirtualHost</emphasis> directive) which can modified or used as-is "
2129
"if you have a single site, or used as a template for additional virtual "
2130
"hosts if you have multiple sites. If left alone, the default virtual host "
2131
"will serve as your default site, or the site users will see if the URL they "
2132
"enter does not match the <emphasis>ServerName</emphasis> directive of any of "
2133
"your custom sites. To modify the default virtual host, edit the file "
2134
"<filename>/etc/apache2/sites-available/default</filename>."
2137
#: serverguide/C/web-servers.xml:163(para)
2139
"The directives set for a virtual host only apply to that particular virtual "
2140
"host. If a directive is set server-wide and not defined within the virtual "
2141
"host settings, the default setting is used. For example, you can define a "
2142
"Webmaster email address and not define individual email addresses for each "
2146
#: serverguide/C/web-servers.xml:171(para)
2148
"If you wish to configure a new virtual host or site, copy that file into the "
2149
"same directory with a name you choose. For example:"
2152
#: serverguide/C/web-servers.xml:177(command)
2154
"sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-"
2155
"available/mynewsite"
2157
"sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-"
2158
"available/mon_site_novèl"
2160
#: serverguide/C/web-servers.xml:180(para)
2162
"Edit the new file to configure the new site using some of the directives "
2166
#: serverguide/C/web-servers.xml:187(para)
2168
"The <emphasis>ServerAdmin</emphasis> directive specifies the email address "
2169
"to be advertised for the server's administrator. The default value is "
2170
"webmaster@localhost. This should be changed to an email address that is "
2171
"delivered to you (if you are the server's administrator). If your website "
2172
"has a problem, Apache2 will display an error message containing this email "
2173
"address to report the problem to. Find this directive in your site's "
2174
"configuration file in /etc/apache2/sites-available."
2177
#: serverguide/C/web-servers.xml:198(para)
2179
"The <emphasis>Listen</emphasis> directive specifies the port, and optionally "
2180
"the IP address, Apache2 should listen on. If the IP address is not "
2181
"specified, Apache2 will listen on all IP addresses assigned to the machine "
2182
"it runs on. The default value for the Listen directive is 80. Change this to "
2183
"127.0.0.1:80 to cause Apache2 to listen only on your loopback interface so "
2184
"that it will not be available to the Internet, to (for example) 81 to change "
2185
"the port that it listens on, or leave it as is for normal operation. This "
2186
"directive can be found and changed in its own file, "
2187
"<filename>/etc/apache2/ports.conf</filename>"
2190
#: serverguide/C/web-servers.xml:211(para)
2192
"The <emphasis>ServerName</emphasis> directive is optional and specifies what "
2193
"FQDN your site should answer to. The default virtual host has no ServerName "
2194
"directive specified, so it will respond to all requests that do not match a "
2195
"ServerName directive in another virtual host. If you have just acquired the "
2196
"domain name ubunturocks.com and wish to host it on your Ubuntu server, the "
2197
"value of the ServerName directive in your virtual host configuration file "
2198
"should be ubunturocks.com. Add this directive to the new virtual host file "
2199
"you created earlier (<filename>/etc/apache2/sites-"
2200
"available/mynewsite</filename>)."
2203
#: serverguide/C/web-servers.xml:223(para)
2205
"You may also want your site to respond to www.ubunturocks.com, since many "
2206
"users will assume the www prefix is appropriate. Use the "
2207
"<emphasis>ServerAlias</emphasis> directive for this. You may also use "
2208
"wildcards in the ServerAlias directive."
2211
#: serverguide/C/web-servers.xml:230(para)
2213
"For example, the following configuration will cause your site to respond to "
2214
"any domain request ending in <emphasis>.ubunturocks.com</emphasis>."
2217
#: serverguide/C/web-servers.xml:236(programlisting)
2221
"ServerAlias *.ubunturocks.com\n"
2224
"ServerAlias *.ubunturocks.com\n"
2226
#: serverguide/C/web-servers.xml:242(para)
2228
"The <emphasis>DocumentRoot</emphasis> directive specifies where Apache2 "
2229
"should look for the files that make up the site. The default value is "
2230
"/var/www. No site is configured there, but if you uncomment the "
2231
"<emphasis>RedirectMatch</emphasis> directive in "
2232
"<filename>/etc/apache2/apache2.conf</filename> requests will be redirected "
2233
"to /var/www/apache2-default where the default Apache2 site awaits. Change "
2234
"this value in your site's virtual host file, and remember to create that "
2235
"directory if necessary!"
2238
#: serverguide/C/web-servers.xml:254(para)
2240
"The /etc/apache2/sites-available directory is <emphasis role=\"bold\"> "
2241
"not</emphasis> parsed by Apache2. Symbolic links in /etc/apache2/sites-"
2242
"enabled point to \"available\" sites."
2245
#: serverguide/C/web-servers.xml:260(para)
2247
"Enable the new <emphasis>VirtualHost</emphasis> using the "
2248
"<application>a2ensite</application> utility and restart Apache2:"
2251
#: serverguide/C/web-servers.xml:266(command)
2252
msgid "sudo a2ensite mynewsite"
2253
msgstr "sudo a2ensite mynewsite"
2255
#: serverguide/C/web-servers.xml:267(command) serverguide/C/web-servers.xml:285(command) serverguide/C/web-servers.xml:538(command) serverguide/C/web-servers.xml:547(command) serverguide/C/web-servers.xml:606(command) serverguide/C/mail.xml:932(command) serverguide/C/lamp-applications.xml:228(command)
2256
msgid "sudo /etc/init.d/apache2 restart"
2257
msgstr "sudo /etc/init.d/apache2 restart"
2259
#: serverguide/C/web-servers.xml:271(para)
2261
"Be sure to replace <emphasis>mynewsite</emphasis> with a more descriptive "
2262
"name for the VirtualHost. One method is to name the file after the "
2263
"<emphasis>ServerName</emphasis> directive of the VirtualHost."
2266
#: serverguide/C/web-servers.xml:278(para)
2268
"Similarly, use the <application>a2dissite</application> utility to disable "
2269
"sites. This is can be useful when troubleshooting configuration problems "
2270
"with multiple VirtualHosts:"
2273
#: serverguide/C/web-servers.xml:284(command)
2274
msgid "sudo a2dissite mynewsite"
2275
msgstr "sudo a2dissite mon_site_novèl"
2277
#: serverguide/C/web-servers.xml:290(title)
2278
msgid "Default Settings"
2279
msgstr "Paramètres per defaut"
2281
#: serverguide/C/web-servers.xml:292(para)
2283
"This section explains configuration of the Apache2 server default settings. "
2284
"For example, if you add a virtual host, the settings you configure for the "
2285
"virtual host take precedence for that virtual host. For a directive not "
2286
"defined within the virtual host settings, the default value is used."
2289
#: serverguide/C/web-servers.xml:304(para)
2291
"The <emphasis>DirectoryIndex</emphasis> is the default page served by the "
2292
"server when a user requests an index of a directory by specifying a forward "
2293
"slash (/) at the end of the directory name."
2296
#: serverguide/C/web-servers.xml:311(para)
2298
"For example, when a user requests the page "
2299
"http://www.example.com/this_directory/, he or she will get either the "
2300
"DirectoryIndex page if it exists, a server-generated directory list if it "
2301
"does not and the Indexes option is specified, or a Permission Denied page if "
2302
"neither is true. The server will try to find one of the files listed in the "
2303
"DirectoryIndex directive and will return the first one it finds. If it does "
2304
"not find any of these files and if <emphasis>Options Indexes</emphasis> is "
2305
"set for that directory, the server will generate and return a list, in HTML "
2306
"format, of the subdirectories and files in the directory. The default value, "
2307
"found in <filename>/etc/apache2/mods-available/dir.conf</filename> is "
2308
"\"index.html index.cgi index.pl index.php index.xhtml index.htm\". Thus, if "
2309
"Apache2 finds a file in a requested directory matching any of these names, "
2310
"the first will be displayed."
2313
#: serverguide/C/web-servers.xml:332(para)
2315
"The <emphasis>ErrorDocument</emphasis> directive allows you to specify a "
2316
"file for Apache2 to use for specific error events. For example, if a user "
2317
"requests a resource that does not exist, a 404 error will occur, and per "
2318
"Apache2's default configuration, the file "
2319
"<filename>/usr/share/apache2/error/HTTP_NOT_FOUND.html.var </filename> will "
2320
"be displayed. That file is not in the server's DocumentRoot, but there is an "
2321
"Alias directive in <filename>/etc/apache2/apache2.conf</filename> that "
2322
"redirects requests to the /error directory to "
2323
"<filename>/usr/share/apache2/error/</filename>."
2326
#: serverguide/C/web-servers.xml:344(para)
2328
"To see a list of the default ErrorDocument directives, use this command:"
2331
#: serverguide/C/web-servers.xml:350(command)
2332
msgid "grep ErrorDocument /etc/apache2/apache2.conf"
2333
msgstr "grep ErrorDocument /etc/apache2/apache2.conf"
2335
#: serverguide/C/web-servers.xml:355(para)
2337
"By default, the server writes the transfer log to the file "
2338
"<filename>/var/log/apache2/access.log</filename>. You can change this on a "
2339
"per-site basis in your virtual host configuration files with the "
2340
"<emphasis>CustomLog</emphasis> directive, or omit it to accept the default, "
2341
"specified in <filename> /etc/apache2/apache2.conf</filename>. You may also "
2342
"specify the file to which errors are logged, via the "
2343
"<emphasis>ErrorLog</emphasis> directive, whose default is "
2344
"<filename>/var/log/apache2/error.log</filename>. These are kept separate "
2345
"from the transfer logs to aid in troubleshooting problems with your Apache2 "
2346
"server. You may also specify the <emphasis>LogLevel</emphasis> (the default "
2347
"value is \"warn\") and the <emphasis>LogFormat</emphasis> (see <filename> "
2348
"/etc/apache2/apache2.conf</filename> for the default value)."
2351
#: serverguide/C/web-servers.xml:370(para)
2353
"Some options are specified on a per-directory basis rather than per-server. "
2354
"<emphasis>Options</emphasis> is one of these directives. A Directory stanza "
2355
"is enclosed in XML-like tags, like so:"
2358
#: serverguide/C/web-servers.xml:376(programlisting)
2362
"<Directory /var/www/mynewsite>\n"
2364
"</Directory>\n"
2367
#: serverguide/C/web-servers.xml:382(para)
2369
"The <emphasis>Options</emphasis> directive within a Directory stanza accepts "
2370
"one or more of the following values (among others), separated by spaces:"
2373
#: serverguide/C/web-servers.xml:394(para)
2375
"Most files should not be executed as CGI scripts. This would be very "
2376
"dangerous. CGI scripts should kept in a directory separate from and outside "
2377
"your DocumentRoot, and only this directory should have the ExecCGI option "
2378
"set. This is the default, and the default location for CGI scripts is "
2379
"<filename>/usr/lib/cgi-bin</filename>."
2382
#: serverguide/C/web-servers.xml:389(para)
2384
"<emphasis role=\"bold\">ExecCGI</emphasis> - Allow execution of CGI scripts. "
2385
"CGI scripts are not executed if this option is not chosen. <placeholder-1/>"
2388
#: serverguide/C/web-servers.xml:405(para)
2390
"<emphasis role=\"bold\">Includes</emphasis> - Allow server-side includes. "
2391
"Server-side includes allow an HTML file to <emphasis> include</emphasis> "
2392
"other files. This is not a common option. See <ulink "
2393
"url=\"http://httpd.apache.org/docs/2.2/howto/ssi.html\">the Apache2 SSI "
2394
"HOWTO</ulink> for more information."
2397
#: serverguide/C/web-servers.xml:414(para)
2399
"<emphasis role=\"bold\">IncludesNOEXEC</emphasis> - Allow server-side "
2400
"includes, but disable the <emphasis>#exec</emphasis> and "
2401
"<emphasis>#include</emphasis> commands in CGI scripts."
2404
#: serverguide/C/web-servers.xml:426(para)
2406
"For security reasons, this should usually not be set, and certainly should "
2407
"not be set on your DocumentRoot directory. Enable this option carefully on a "
2408
"per-directory basis only if you are certain you want users to see the entire "
2409
"contents of the directory."
2412
#: serverguide/C/web-servers.xml:421(para)
2414
"<emphasis role=\"bold\">Indexes</emphasis> - Display a formatted list of the "
2415
"directory's contents, if no <emphasis>DirectoryIndex</emphasis> (such as "
2416
"index.html) exists in the requested directory. <placeholder-1/>"
2419
#: serverguide/C/web-servers.xml:436(para)
2421
"<emphasis role=\"bold\">Multiview</emphasis> - Support content-negotiated "
2422
"multiviews; this option is disabled by default for security reasons. See the "
2424
"url=\"http://httpd.apache.org/docs/2.2/mod/mod_negotiation.html#multiviews\">"
2425
"Apache2 documentation on this option</ulink>."
2428
#: serverguide/C/web-servers.xml:444(para)
2430
"<emphasis role=\"bold\">SymLinksIfOwnerMatch</emphasis> - Only follow "
2431
"symbolic links if the target file or directory has the same owner as the "
2435
#: serverguide/C/web-servers.xml:456(title)
2436
msgid "httpd Settings"
2437
msgstr "Paramètres httpd"
2439
#: serverguide/C/web-servers.xml:458(para)
2441
"This section explains some basic <application>httpd</application> daemon "
2442
"configuration settings."
2445
#: serverguide/C/web-servers.xml:462(para)
2447
"<emphasis role=\"bold\">LockFile</emphasis> - The LockFile directive sets "
2448
"the path to the lockfile used when the server is compiled with either "
2449
"USE_FCNTL_SERIALIZED_ACCEPT or USE_FLOCK_SERIALIZED_ACCEPT. It must be "
2450
"stored on the local disk. It should be left to the default value unless the "
2451
"logs directory is located on an NFS share. If this is the case, the default "
2452
"value should be changed to a location on the local disk and to a directory "
2453
"that is readable only by root."
2456
#: serverguide/C/web-servers.xml:471(para)
2458
"<emphasis role=\"bold\">PidFile</emphasis> - The PidFile directive sets the "
2459
"file in which the server records its process ID (pid). This file should only "
2460
"be readable by root. In most cases, it should be left to the default value."
2463
#: serverguide/C/web-servers.xml:477(para)
2465
"<emphasis role=\"bold\">User</emphasis> - The User directive sets the userid "
2466
"used by the server to answer requests. This setting determines the server's "
2467
"access. Any files inaccessible to this user will also be inaccessible to "
2468
"your website's visitors. The default value for User is www-data."
2471
#: serverguide/C/web-servers.xml:484(para)
2473
"Unless you know exactly what you are doing, do not set the User directive to "
2474
"root. Using root as the User will create large security holes for your Web "
2478
#: serverguide/C/web-servers.xml:490(para)
2480
"The Group directive is similar to the User directive. Group sets the group "
2481
"under which the server will answer requests. The default group is also www-"
2485
#: serverguide/C/web-servers.xml:496(title)
2486
msgid "Apache2 Modules"
2489
#: serverguide/C/web-servers.xml:498(para)
2491
"Apache2 is a modular server. This implies that only the most basic "
2492
"functionality is included in the core server. Extended features are "
2493
"available through modules which can be loaded into Apache2. By default, a "
2494
"base set of modules is included in the server at compile-time. If the server "
2495
"is compiled to use dynamically loaded modules, then modules can be compiled "
2496
"separately, and added at any time using the LoadModule directive. Otherwise, "
2497
"Apache2 must be recompiled to add or remove modules."
2500
#: serverguide/C/web-servers.xml:510(para)
2502
"Ubuntu compiles Apache2 to allow the dynamic loading of modules. "
2503
"Configuration directives may be conditionally included on the presence of a "
2504
"particular module by enclosing them in an "
2505
"<emphasis><IfModule></emphasis> block."
2508
#: serverguide/C/web-servers.xml:517(para)
2510
"You can install additional Apache2 modules and use them with your Web "
2511
"server. For example, run the following command from a terminal prompt to "
2512
"install the <emphasis>MySQL Authentication</emphasis> module:"
2515
#: serverguide/C/web-servers.xml:524(command)
2516
msgid "sudo apt-get install libapache2-mod-auth-mysql"
2517
msgstr "sudo apt-get install libapache2-mod-auth-mysql"
2519
#: serverguide/C/web-servers.xml:527(para)
2521
"See the <filename>/etc/apache2/mods-available</filename> directory, for "
2522
"additional modules."
2525
#: serverguide/C/web-servers.xml:531(para)
2527
"Use the <application>a2enmod</application> utility to enable a module:"
2530
#: serverguide/C/web-servers.xml:537(command)
2531
msgid "sudo a2enmod auth_mysql"
2532
msgstr "sudo a2enmod auth_mysql"
2534
#: serverguide/C/web-servers.xml:541(para)
2535
msgid "Similarly, <application>a2dismod</application> will disable a module:"
2538
#: serverguide/C/web-servers.xml:546(command)
2539
msgid "sudo a2dismod auth_mysql"
2540
msgstr "sudo a2dismod auth_mysql"
2542
#: serverguide/C/web-servers.xml:553(title)
2543
msgid "HTTPS Configuration"
2544
msgstr "Configuracion HTTPS"
2546
#: serverguide/C/web-servers.xml:555(para)
2548
"The <application>mod_ssl</application> module adds an important feature to "
2549
"the Apache2 server - the ability to encrypt communications. Thus, when your "
2550
"browser is communicating using SSL, the https:// prefix is used at the "
2551
"beginning of the Uniform Resource Locator (URL) in the browser navigation "
2555
#: serverguide/C/web-servers.xml:564(para)
2557
"The <application>mod_ssl</application> module is available in "
2558
"<application>apache2-common</application> package. Execute the following "
2559
"command from a terminal prompt to enable the "
2560
"<application>mod_ssl</application> module:"
2563
#: serverguide/C/web-servers.xml:571(command)
2564
msgid "sudo a2enmod ssl"
2565
msgstr "sudo a2enmod ssl"
2567
#: serverguide/C/web-servers.xml:574(para)
2569
"There is a default HTTPS configuration file in <filename>/etc/apache2/sites-"
2570
"available/default-ssl</filename>. In order for "
2571
"<application>Apache2</application> to provide HTTPS, a "
2572
"<emphasis>certificate</emphasis> and <emphasis>key</emphasis> file are also "
2573
"needed. The default HTTPS configuration will use a certificate and key "
2574
"generated by the <application>ssl-cert</application> package. They are good "
2575
"for testing, but the auto-generated certificate and key should be replaced "
2576
"by a certificate specific to the site or server. For information on "
2577
"generating a key and obtaining a certificate see <xref "
2578
"linkend=\"certificates-and-security\"/>"
2581
#: serverguide/C/web-servers.xml:584(para)
2583
"To configure <application>Apache2</application> for HTTPS, enter the "
2587
#: serverguide/C/web-servers.xml:589(command)
2588
msgid "sudo a2ensite default-ssl"
2589
msgstr "sudo a2ensite default-ssl"
2591
#: serverguide/C/web-servers.xml:593(para)
2593
"The directories <filename>/etc/ssl/certs</filename> and "
2594
"<filename>/etc/ssl/private</filename> are the default locations. If you "
2595
"install the certificate and key in another directory make sure to change "
2596
"<emphasis>SSLCertificateFile</emphasis> and "
2597
"<emphasis>SSLCertificateKeyFile</emphasis> appropriately."
2600
#: serverguide/C/web-servers.xml:600(para)
2602
"With Apache2 now configured for HTTPS, restart the service to enable the new "
2606
#: serverguide/C/web-servers.xml:611(para)
2608
"Depending on how you obtained your certificate you may need to enter a "
2609
"passphrase when <application>Apache2</application> starts."
2612
#: serverguide/C/web-servers.xml:617(para)
2614
"You can access the secure server pages by typing https://your_hostname/url/ "
2615
"in your browser address bar."
2618
#: serverguide/C/web-servers.xml:628(para)
2620
"<ulink url=\"http://httpd.apache.org/docs/2.2/\">Apache2 "
2621
"Documentation</ulink> contains in depth information on Apache2 configuration "
2622
"directives. Also, see the <application>apache2-doc</application> package for "
2623
"the official Apache2 docs."
2626
#: serverguide/C/web-servers.xml:635(para)
2628
"See the <ulink url=\"http://www.modssl.org/docs/\">Mod SSL "
2629
"Documentation</ulink> site for more SSL related information."
2632
#: serverguide/C/web-servers.xml:641(para)
2634
"O'Reilly's <ulink url=\"http://oreilly.com/catalog/9780596001919/\">Apache "
2635
"Cookbook</ulink> is a good resource for accomplishing specific Apache2 "
2639
#: serverguide/C/web-servers.xml:647(para)
2641
"For Ubuntu specific Apache2 questions, ask in the <emphasis>#ubuntu-"
2642
"server</emphasis> IRC channel on <ulink "
2643
"url=\"http://freenode.net/\">freenode.net</ulink>."
2646
#: serverguide/C/web-servers.xml:653(para)
2648
"Usually integrated with PHP and MySQL the <ulink "
2649
"url=\"https://help.ubuntu.com/community/ApacheMySQLPHP\">Apache MySQL PHP "
2650
"Ubuntu Wiki </ulink> page is a good resource."
2653
#: serverguide/C/web-servers.xml:664(title)
2654
msgid "PHP5 - Scripting Language"
2655
msgstr "PHP5 - Lengatge d'escript"
2657
#: serverguide/C/web-servers.xml:665(para)
2659
"PHP is a general-purpose scripting language suited for Web development. The "
2660
"PHP script can be embedded into HTML. This section explains how to install "
2661
"and configure PHP5 in Ubuntu System with Apache2 and MySQL."
2664
#: serverguide/C/web-servers.xml:669(para)
2666
"This section assumes you have installed and configured Apache2 Web Server "
2667
"and MySQL Database Server. You can refer to Apache2 section and MySQL "
2668
"sections in this document to install and configure Apache2 and MySQL "
2672
#: serverguide/C/web-servers.xml:676(para)
2673
msgid "The PHP5 is available in Ubuntu Linux."
2674
msgstr "PHP5 es disponible sus Ubuntu Linux."
2676
#: serverguide/C/web-servers.xml:678(para)
2678
"To install PHP5 you can enter the following command in the terminal prompt: "
2680
"<command>sudo apt-get install php5 libapache2-mod-php5</command>\n"
2684
#: serverguide/C/web-servers.xml:687(para)
2686
"You can run PHP5 scripts from command line. To run PHP5 scripts from command "
2687
"line you should install <application>php5-cli</application> package. To "
2688
"install <application>php5-cli</application> you can enter the following "
2689
"command in the terminal prompt: <screen>\n"
2690
"<command>sudo apt-get install php5-cli</command>\n"
2694
#: serverguide/C/web-servers.xml:696(para)
2696
"You can also execute PHP5 scripts without installing PHP5 Apache module. To "
2697
"accomplish this, you should install <application>php5-cgi</application> "
2698
"package. You can run the following command in a terminal prompt to install "
2699
"<application>php5-cgi</application> package: <screen>\n"
2700
"<command>sudo apt-get install php5-cgi</command>\n"
2704
#: serverguide/C/web-servers.xml:706(para)
2706
"To use <application>MySQL</application> with PHP5 you should install "
2707
"<application>php5-mysql</application> package. To install <application>php5-"
2708
"mysql</application> you can enter the following command in the terminal "
2709
"prompt: <screen>\n"
2710
"<command>sudo apt-get install php5-mysql</command>\n"
2714
#: serverguide/C/web-servers.xml:714(para)
2716
"Similarly, to use <application>PostgreSQL</application> with PHP5 you should "
2717
"install <application>php5-pgsql</application> package. To install "
2718
"<application>php5-pgsql</application> you can enter the following command in "
2719
"the terminal prompt: <screen>\n"
2720
"<command>sudo apt-get install php5-pgsql</command>\n"
2724
#: serverguide/C/web-servers.xml:727(para)
2726
"Once you install PHP5, you can run PHP5 scripts from your web browser. If "
2727
"you have installed <application>php5-cli</application> package, you can run "
2728
"PHP5 scripts from your command prompt."
2731
#: serverguide/C/web-servers.xml:734(para)
2733
"By default, the Apache 2 Web server is configured to run PHP5 scripts. In "
2734
"other words, the PHP5 module is enabled in Apache2 Web server automatically "
2735
"when you install the module. Please verify if the files "
2736
"<filename>/etc/apache2/mods-enabled/php5.conf</filename> and "
2737
"<filename>/etc/apache2/mods-enabled/php5.load</filename> exist. If they do "
2738
"not exists, you can enable the module using <command>a2enmod</command> "
2742
#: serverguide/C/web-servers.xml:745(para)
2744
"Once you install PHP5 related packages and enabled PHP5 Apache 2 module, you "
2745
"should restart Apache2 Web server to run PHP5 scripts. You can run the "
2746
"following command at a terminal prompt to restart your web server: "
2747
"<screen><command>sudo /etc/init.d/apache2 restart</command> </screen>"
2750
#: serverguide/C/web-servers.xml:753(title) serverguide/C/mail.xml:320(title) serverguide/C/mail.xml:1569(title) serverguide/C/dns.xml:343(title) serverguide/C/clustering.xml:184(title)
2754
#: serverguide/C/web-servers.xml:754(para)
2756
"To verify your installation, you can run following PHP5 phpinfo script:"
2759
#: serverguide/C/web-servers.xml:757(programlisting)
2768
#: serverguide/C/web-servers.xml:762(para)
2770
"You can save the content in a file <filename>phpinfo.php</filename> and "
2771
"place it under <command>DocumentRoot</command> directory of Apache2 Web "
2772
"server. When point your browser to "
2773
"<filename>http://hostname/phpinfo.php</filename>, it would display values of "
2774
"various PHP5 configuration parameters."
2777
#: serverguide/C/web-servers.xml:776(para)
2779
"For more in depth information see <ulink "
2780
"url=\"http://www.php.net/docs.php\">php.net</ulink> documentation."
2783
#: serverguide/C/web-servers.xml:781(para)
2785
"There are a plethora of books on PHP. Two good books from O'Reilly are "
2786
"<ulink url=\"http://oreilly.com/catalog/9780596005603/\">Learning PHP "
2787
"5</ulink> and the <ulink "
2788
"url=\"http://oreilly.com/catalog/9781565926813/\">PHP Cook Book</ulink>."
2791
#: serverguide/C/web-servers.xml:788(para)
2793
"Also, see the <ulink "
2794
"url=\"https://help.ubuntu.com/community/ApacheMySQLPHP\">Apache MySQL PHP "
2795
"Ubuntu Wiki</ulink> page for more information."
2798
#: serverguide/C/web-servers.xml:799(title)
2799
msgid "Squid - Proxy Server"
2800
msgstr "Squid - Servidor mandatari (proxy)"
2802
#: serverguide/C/web-servers.xml:800(para)
2804
"Squid is a full-featured web proxy cache server application which provides "
2805
"proxy and cache services for Hyper Text Transport Protocol (HTTP), File "
2806
"Transfer Protocol (FTP), and other popular network protocols. Squid can "
2807
"implement caching and proxying of Secure Sockets Layer (SSL) requests and "
2808
"caching of Domain Name Server (DNS) lookups, and perform transparent "
2809
"caching. Squid also supports a wide variety of caching protocols, such as "
2810
"Internet Cache Protocol, (ICP) the Hyper Text Caching Protocol, (HTCP) the "
2811
"Cache Array Routing Protocol (CARP), and the Web Cache Coordination "
2815
#: serverguide/C/web-servers.xml:808(para)
2817
"The Squid proxy cache server is an excellent solution to a variety of proxy "
2818
"and caching server needs, and scales from the branch office to enterprise "
2819
"level networks while providing extensive, granular access control mechanisms "
2820
"and monitoring of critical parameters via the Simple Network Management "
2821
"Protocol (SNMP). When selecting a computer system for use as a dedicated "
2822
"Squid proxy, or caching servers, ensure your system is configured with a "
2823
"large amount of physical memory, as Squid maintains an in-memory cache for "
2824
"increased performance."
2827
#: serverguide/C/web-servers.xml:817(para)
2829
"At a terminal prompt, enter the following command to install the Squid "
2833
#: serverguide/C/web-servers.xml:822(command)
2834
msgid "sudo apt-get install squid"
2835
msgstr "sudo apt-get install squid"
2837
#: serverguide/C/web-servers.xml:828(para)
2839
"Squid is configured by editing the directives contained within the "
2840
"<filename>/etc/squid/squid.conf</filename> configuration file. The following "
2841
"examples illustrate some of the directives which may be modified to affect "
2842
"the behavior of the Squid server. For more in-depth configuration of Squid, "
2843
"see the References section."
2846
#: serverguide/C/web-servers.xml:834(para)
2848
"Prior to editing the configuration file, you should make a copy of the "
2849
"original file and protect it from writing so you will have the original "
2850
"settings as a reference, and to re-use as necessary."
2853
#: serverguide/C/web-servers.xml:837(para)
2855
"Copy the <filename>/etc/squid/squid.conf</filename> file and protect it from "
2856
"writing with the following commands entered at a terminal prompt:"
2859
#: serverguide/C/web-servers.xml:842(command)
2860
msgid "sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original"
2861
msgstr "sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original"
2863
#: serverguide/C/web-servers.xml:843(command)
2864
msgid "sudo chmod a-w /etc/squid/squid.conf.original"
2865
msgstr "sudo chmod a-w /etc/squid/squid.conf.original"
2867
#: serverguide/C/web-servers.xml:849(para)
2869
"To set your Squid server to listen on TCP port 8888 instead of the default "
2870
"TCP port 3128, change the http_port directive as such:"
2873
#: serverguide/C/web-servers.xml:853(programlisting)
2882
#: serverguide/C/web-servers.xml:858(para)
2884
"Change the visible_hostname directive in order to give the Squid server a "
2885
"specific hostname. This hostname does not necessarily need to be the "
2886
"computer's hostname. In this example it is set to <emphasis>weezie</emphasis>"
2889
#: serverguide/C/web-servers.xml:862(programlisting)
2893
"visible_hostname weezie\n"
2896
"visible_hostname weezie\n"
2898
#: serverguide/C/web-servers.xml:867(para)
2900
"Using Squid's access control, you may configure use of Internet services "
2901
"proxied by Squid to be available only users with certain Internet Protocol "
2902
"(IP) addresses. For example, we will illustrate access by users of the "
2903
"192.168.42.0/24 subnetwork only:"
2906
#: serverguide/C/web-servers.xml:872(para) serverguide/C/web-servers.xml:892(para)
2908
"Add the following to the <emphasis role=\"bold\">bottom</emphasis> of the "
2909
"ACL section of your <filename>/etc/squid/squid.conf</filename> file:"
2912
#: serverguide/C/web-servers.xml:875(programlisting)
2916
"acl fortytwo_network src 192.168.42.0/24\n"
2919
"acl fortytwo_network src 192.168.42.0/24\n"
2921
#: serverguide/C/web-servers.xml:878(para) serverguide/C/web-servers.xml:899(para)
2923
"Then, add the following to the <emphasis role=\"bold\">top</emphasis> of the "
2924
"http_access section of your <filename>/etc/squid/squid.conf</filename> file:"
2927
#: serverguide/C/web-servers.xml:882(programlisting)
2931
"http_access allow fortytwo_network\n"
2934
"http_access allow fortytwo_network\n"
2936
#: serverguide/C/web-servers.xml:887(para)
2938
"Using the excellent access control features of Squid, you may configure use "
2939
"of Internet services proxied by Squid to be available only during normal "
2940
"business hours. For example, we'll illustrate access by employees of a "
2941
"business which is operating between 9:00AM and 5:00PM, Monday through "
2942
"Friday, and which uses the 10.1.42.0/42 subnetwork:"
2945
#: serverguide/C/web-servers.xml:895(programlisting)
2949
"acl biz_network src 10.1.42.0/24\n"
2950
"acl biz_hours time M T W T F 9:00-17:00\n"
2953
"acl biz_network src 10.1.42.0/24\n"
2954
"acl biz_hours time M T W T F 9:00-17:00\n"
2956
#: serverguide/C/web-servers.xml:903(programlisting)
2960
"http_access allow biz_network biz_hours\n"
2963
"http_access allow biz_network biz_hours\n"
2965
#: serverguide/C/web-servers.xml:910(para)
2967
"After making changes to the <filename>/etc/squid/squid.conf</filename> file, "
2968
"save the file and restart the <application>squid</application> server "
2969
"application to effect the changes using the following command entered at a "
2973
#: serverguide/C/web-servers.xml:917(command)
2974
msgid "sudo /etc/init.d/squid restart"
2975
msgstr "sudo /etc/init.d/squid restart"
2977
#: serverguide/C/web-servers.xml:924(ulink)
2978
msgid "Squid Website"
2979
msgstr "Site internet de Squid"
2981
#: serverguide/C/web-servers.xml:926(para)
2983
"<ulink url=\"https://help.ubuntu.com/community/Squid\">Ubuntu Wiki "
2984
"Squid</ulink> page."
2987
#: serverguide/C/web-servers.xml:933(title)
2988
msgid "Ruby on Rails"
2989
msgstr "Ruby on Rails"
2991
#: serverguide/C/web-servers.xml:934(para)
2993
"Ruby on Rails is an open source web framework for developing database backed "
2994
"web applications. It is optimized for sustainable productivity of the "
2995
"programmer since it lets the programmer to write code by favouring "
2996
"convention over configuration."
2999
#: serverguide/C/web-servers.xml:941(para)
3001
"Before installing <application>Rails</application> you should install "
3002
"<application>Apache</application> and <application>MySQL</application>. To "
3003
"install the <application>Apache</application> package, please refer to <xref "
3004
"linkend=\"httpd\"/>. For instructions on installing "
3005
"<application>MySQL</application> refer to <xref linkend=\"mysql\"/>."
3008
#: serverguide/C/web-servers.xml:949(para)
3010
"Once you have <application>Apache</application> and "
3011
"<application>MySQL</application> packages installed, you are ready to "
3012
"install <application>Ruby on Rails</application> package."
3015
#: serverguide/C/web-servers.xml:956(para)
3017
"To install the <application>Ruby</application> base packages and "
3018
"<application>Ruby on Rails</application>, you can enter the following "
3019
"command in the terminal prompt:"
3022
#: serverguide/C/web-servers.xml:962(command)
3023
msgid "sudo apt-get install rails"
3024
msgstr "sudo apt-get install rails"
3026
#: serverguide/C/web-servers.xml:968(para)
3028
"Modify the <filename>/etc/apache2/sites-available/default</filename> "
3029
"configuration file to setup your domains."
3032
#: serverguide/C/web-servers.xml:972(para)
3034
"The first thing to change is the <emphasis>DocumentRoot</emphasis> directive:"
3037
#: serverguide/C/web-servers.xml:976(programlisting)
3041
"DocumentRoot /path/to/rails/application/public\n"
3044
"DocumentRoot /path/to/rails/application/public\n"
3046
#: serverguide/C/web-servers.xml:979(para)
3048
"Next, change the <Directory \"/path/to/rails/application/public\"> "
3052
#: serverguide/C/web-servers.xml:983(programlisting)
3056
"<Directory \"/path/to/rails/application/public\">\n"
3057
" Options Indexes FollowSymLinks MultiViews ExecCGI\n"
3058
" AllowOverride All\n"
3059
" Order allow,deny\n"
3061
" AddHandler cgi-script .cgi\n"
3062
"</Directory>\n"
3065
"<Directory \"/path/to/rails/application/public\">\n"
3066
"Options Indexes FollowSymLinks MultiViews ExecCGI\n"
3067
"AllowOverride All\n"
3068
"Order allow,deny\n"
3070
"AddHandler cgi-script .cgi\n"
3071
"</Directory>\n"
3073
#: serverguide/C/web-servers.xml:993(para)
3075
"You should also enable the <application>mod_rewrite</application> module for "
3076
"Apache. To enable <application>mod_rewrite</application> module, please "
3077
"enter the following command in a terminal prompt:"
3080
#: serverguide/C/web-servers.xml:999(command)
3081
msgid "sudo a2enmod rewrite"
3082
msgstr "sudo a2enmod rewrite"
3084
#: serverguide/C/web-servers.xml:1002(para)
3086
"Finally you will need to change the ownership of the "
3087
"<filename>/path/to/rails/application/public</filename> and "
3088
"<filename>/path/to/rails/application/tmp</filename> directories to the user "
3089
"used to run the <application>Apache</application> process:"
3092
#: serverguide/C/web-servers.xml:1008(command)
3093
msgid "sudo chown -R www-data:www-data /path/to/rails/application/public"
3094
msgstr "sudo chown -R www-data:www-data /path/to/rails/application/public"
3096
#: serverguide/C/web-servers.xml:1009(command)
3097
msgid "sudo chown -R www-data:www-data /path/to/rails/application/tmp"
3098
msgstr "sudo chown -R www-data:www-data /path/to/rails/application/tmp"
3100
#: serverguide/C/web-servers.xml:1012(para)
3102
"That's it! Now you have your Server ready for your <application>Ruby on "
3103
"Rails</application> applications."
3106
#: serverguide/C/web-servers.xml:1021(para)
3108
"See the <ulink url=\"http://rubyonrails.org/\">Ruby on Rails</ulink> website "
3109
"for more information."
3112
#: serverguide/C/web-servers.xml:1026(para)
3114
"Also <ulink url=\"http://pragprog.com/titles/rails3/agile-web-development-"
3115
"with-rails-third-edition\">Agile Development with Rails</ulink> is a great "
3119
#: serverguide/C/web-servers.xml:1032(para)
3121
"Another place for more information is the <ulink "
3122
"url=\"https://help.ubuntu.com/community/RubyOnRails\">Ruby on Rails Ubuntu "
3123
"Wiki</ulink> page."
3126
#: serverguide/C/web-servers.xml:1043(title)
3127
msgid "Apache Tomcat"
3128
msgstr "Apache Tomcat"
3130
#: serverguide/C/web-servers.xml:1044(para)
3132
"Apache Tomcat is a web container that allows you to serve Java Servlets and "
3133
"JSP (Java Server Pages) web applications."
3136
#: serverguide/C/web-servers.xml:1046(para)
3138
"The <application>Tomcat 6.0</application> packages in Ubuntu support two "
3139
"different ways of running Tomcat. You can install them as a classic unique "
3140
"system-wide instance, that will be started at boot time and will run as the "
3141
"tomcat6 unpriviledged user. But you can also deploy private instances that "
3142
"will run with your own user rights, and that you should start and stop by "
3143
"yourself. This second way is particularly useful in a development server "
3144
"context where multiple users need to test on their own private Tomcat "
3148
#: serverguide/C/web-servers.xml:1056(title)
3149
msgid "System-wide installation"
3150
msgstr "Installacion per tot lo sistèma"
3152
#: serverguide/C/web-servers.xml:1057(para)
3154
"To install the <application>Tomcat</application> server, you can enter the "
3155
"following command in the terminal prompt:"
3158
#: serverguide/C/web-servers.xml:1060(command)
3159
msgid "sudo apt-get install tomcat6"
3160
msgstr "sudo apt-get install tomcat6"
3162
#: serverguide/C/web-servers.xml:1062(para)
3164
"This will install a Tomcat server with just a default ROOT webapp that "
3165
"displays a minimal \"It works\" page by default."
3168
#: serverguide/C/web-servers.xml:1068(para)
3170
"Tomcat configuration files can be found in "
3171
"<filename>/etc/tomcat6</filename>. Only a few common configuration tweaks "
3172
"will be described here, please see <ulink "
3173
"url=\"http://tomcat.apache.org/tomcat-6.0-doc/index.html\">Tomcat 6.0 "
3174
"documentation</ulink> for more."
3177
#: serverguide/C/web-servers.xml:1074(title)
3178
msgid "Changing default ports"
3179
msgstr "Modificacion dels pòrts per defaut"
3181
#: serverguide/C/web-servers.xml:1075(para)
3183
"By default Tomcat 6.0 runs a HTTP connector on port 8080 and an AJP "
3184
"connector on port 8009. You might want to change those default ports to "
3185
"avoid conflict with another server on the system. This is done by changing "
3186
"the following lines in <filename>/etc/tomcat6/server.xml</filename>:"
3189
#: serverguide/C/web-servers.xml:1080(programlisting)
3193
"<Connector port=\"8080\" protocol=\"HTTP/1.1\" \n"
3194
" connectionTimeout=\"20000\" \n"
3195
" redirectPort=\"8443\" />\n"
3197
"<Connector port=\"8009\" protocol=\"AJP/1.3\" redirectPort=\"8443\" "
3201
"<Connector port=\"8080\" protocol=\"HTTP/1.1\" \n"
3202
"connectionTimeout=\"20000\" \n"
3203
"redirectPort=\"8443\" />\n"
3205
"<Connector port=\"8009\" protocol=\"AJP/1.3\" redirectPort=\"8443\" "
3208
#: serverguide/C/web-servers.xml:1089(title)
3209
msgid "Changing JVM used"
3210
msgstr "Modificacion de la maquina virtuala Java utilizada"
3212
#: serverguide/C/web-servers.xml:1090(para)
3214
"By default Tomcat will run preferably with OpenJDK-6, then try Sun's JVM, "
3215
"then try some other JVMs. If you have various JVMs installed, you can set "
3216
"which should be used by setting JAVA_HOME in "
3217
"<filename>/etc/default/tomcat6</filename>:"
3220
#: serverguide/C/web-servers.xml:1094(programlisting)
3224
"JAVA_HOME=/usr/lib/jvm/java-6-sun\n"
3227
"JAVA_HOME=/usr/lib/jvm/java-6-sun\n"
3229
#: serverguide/C/web-servers.xml:1099(title)
3230
msgid "Declaring users and roles"
3231
msgstr "Declaracion dels utilizaires e dels ròtles"
3233
#: serverguide/C/web-servers.xml:1100(para)
3235
"Usernames, passwords and roles (groups) can be defined centrally in a "
3236
"Servlet container. In Tomcat 6.0 this is done in the "
3237
"<filename>/etc/tomcat6/tomcat-users.xml</filename> file:"
3240
#: serverguide/C/web-servers.xml:1103(programlisting)
3244
"<role rolename=\"admin\"/>\n"
3245
"<user username=\"tomcat\" password=\"s3cret\" roles=\"admin\"/>\n"
3248
"<role rolename=\"admin\"/>\n"
3249
"<user username=\"tomcat\" password=\"s3cret\" roles=\"admin\"/>\n"
3251
#: serverguide/C/web-servers.xml:1111(title)
3252
msgid "Using Tomcat standard webapps"
3253
msgstr "Utilizacions de las aplicacions Web estandardas de Tomcat"
3255
#: serverguide/C/web-servers.xml:1112(para)
3257
"Tomcat is shipped with webapps that you can install for documentation, "
3258
"administration or demo purposes."
3261
#: serverguide/C/web-servers.xml:1115(title)
3262
msgid "Tomcat documentation"
3263
msgstr "Documentacion Tomcat"
3265
#: serverguide/C/web-servers.xml:1116(para)
3267
"The <application>tomcat6-docs</application> package contains Tomcat 6.0 "
3268
"documentation, packaged as a webapp that you can access by default at "
3269
"http://yourserver:8080/docs. You can install it by entering the following "
3270
"command in the terminal prompt:"
3273
#: serverguide/C/web-servers.xml:1121(command)
3274
msgid "sudo apt-get install tomcat6-docs"
3275
msgstr "sudo apt-get install tomcat6-docs"
3277
#: serverguide/C/web-servers.xml:1125(title)
3278
msgid "Tomcat administration webapps"
3279
msgstr "Las aplicacions Web d'administracion per Tomcat"
3281
#: serverguide/C/web-servers.xml:1126(para)
3283
"The <application>tomcat6-admin</application> package contains two webapps "
3284
"that can be used to administer the Tomcat server using a web interface. You "
3285
"can install them by entering the following command in the terminal prompt:"
3288
#: serverguide/C/web-servers.xml:1131(command)
3289
msgid "sudo apt-get install tomcat6-admin"
3290
msgstr "sudo apt-get install tomcat6-admin"
3292
#: serverguide/C/web-servers.xml:1133(para)
3294
"The first one is the <emphasis>manager</emphasis> webapp, which you can "
3295
"access by default at http://yourserver:8080/manager/html. It is primarily "
3296
"used to get server status and restart webapps."
3299
#: serverguide/C/web-servers.xml:1136(para)
3301
"Access to the <emphasis>manager</emphasis> application is protected by "
3302
"default: you need to define a user with the role \"manager\" in "
3303
"<filename>/etc/tomcat6/tomcat-users.xml</filename> before you can access it."
3306
#: serverguide/C/web-servers.xml:1140(para)
3308
"The second one is the <emphasis>host-manager</emphasis> webapp, which you "
3309
"can access by default at http://yourserver:8080/host-manager/html. It can be "
3310
"used to create virtual hosts dynamically."
3313
#: serverguide/C/web-servers.xml:1144(para)
3315
"Access to the <emphasis>host-manager</emphasis> application is also "
3316
"protected by default: you need to define a user with the role \"admin\" in "
3317
"<filename>/etc/tomcat6/tomcat-users.xml</filename> before you can access it."
3320
#: serverguide/C/web-servers.xml:1149(para)
3322
"For security reasons, the tomcat6 user cannot write to the "
3323
"<filename>/etc/tomcat6</filename> directory by default. Some features in "
3324
"these admin webapps (application deployment, virtual host creation) need "
3325
"write access to that directory. If you want to use these features execute "
3326
"the following, to give users in the tomcat6 group the necessary rights:"
3329
#: serverguide/C/web-servers.xml:1156(command)
3330
msgid "sudo chgrp -R tomcat6 /etc/tomcat6"
3331
msgstr "sudo chgrp -R tomcat6 /etc/tomcat6"
3333
#: serverguide/C/web-servers.xml:1157(command)
3334
msgid "sudo chmod -R g+w /etc/tomcat6"
3335
msgstr "sudo chmod -R g+w /etc/tomcat6"
3337
#: serverguide/C/web-servers.xml:1162(title)
3338
msgid "Tomcat examples webapps"
3339
msgstr "Exemples d'aplicacions Web Tomcat"
3341
#: serverguide/C/web-servers.xml:1163(para)
3343
"The <application>tomcat6-examples</application> package contains two webapps "
3344
"that can be used to test or demonstrate Servlets and JSP features, which you "
3345
"can access them by default at http://yourserver:8080/examples. You can "
3346
"install them by entering the following command in the terminal prompt:"
3349
#: serverguide/C/web-servers.xml:1169(command)
3350
msgid "sudo apt-get install tomcat6-examples"
3351
msgstr "sudo apt-get install tomcat6-examples"
3353
#: serverguide/C/web-servers.xml:1175(title)
3354
msgid "Using private instances"
3355
msgstr "Utilizacion de las instàncias privadas"
3357
#: serverguide/C/web-servers.xml:1176(para)
3359
"Tomcat is heavily used in development and testing scenarios where using a "
3360
"single system-wide instance doesn't meet the requirements of multiple users "
3361
"on a single system. The Tomcat 6.0 packages in Ubuntu come with tools to "
3362
"help deploy your own user-oriented instances, allowing every user on a "
3363
"system to run (without root rights) separate private instances while still "
3364
"using the system-installed libraries."
3367
#: serverguide/C/web-servers.xml:1183(para)
3369
"It is possible to run the system-wide instance and the private instances in "
3370
"parallel, as long as they do not use the same TCP ports."
3373
#: serverguide/C/web-servers.xml:1187(title)
3374
msgid "Installing private instance support"
3375
msgstr "Installacion de la gestion de las instaàncias privadas"
3377
#: serverguide/C/web-servers.xml:1188(para)
3379
"You can install everything necessary to run private instances by entering "
3380
"the following command in the terminal prompt:"
3383
#: serverguide/C/web-servers.xml:1191(command)
3384
msgid "sudo apt-get install tomcat6-user"
3385
msgstr "sudo apt-get install tomcat6-user"
3387
#: serverguide/C/web-servers.xml:1195(title)
3388
msgid "Creating a private instance"
3389
msgstr "Creacion d'una instància privada"
3391
#: serverguide/C/web-servers.xml:1196(para)
3393
"You can create a private instance directory by entering the following "
3394
"command in the terminal prompt:"
3397
#: serverguide/C/web-servers.xml:1199(command)
3398
msgid "tomcat6-instance-create my-instance"
3399
msgstr "tomcat6-instance-create my-instance"
3401
#: serverguide/C/web-servers.xml:1201(para)
3403
"This will create a new <filename>my-instance</filename> directory with all "
3404
"the necessary subdirectories and scripts. You can for example install your "
3405
"common libraries in the <filename>lib/</filename> subdirectory and deploy "
3406
"your webapps in the <filename>webapps/</filename> subdirectory. No webapps "
3407
"are deployed by default."
3410
#: serverguide/C/web-servers.xml:1209(title)
3411
msgid "Configuring your private instance"
3412
msgstr "Configuracion de vòstra instància privada"
3414
#: serverguide/C/web-servers.xml:1210(para)
3416
"You will find the classic Tomcat configuration files for your private "
3417
"instance in the <filename>conf/</filename> subdirectory. You should for "
3418
"example certainly edit the <filename>conf/server.xml</filename> file to "
3419
"change the default ports used by your private Tomcat instance to avoid "
3420
"conflict with other instances that might be running."
3423
#: serverguide/C/web-servers.xml:1218(title)
3424
msgid "Starting/stopping your private instance"
3427
#: serverguide/C/web-servers.xml:1219(para)
3429
"You can start your private instance by entering the following command in the "
3430
"terminal prompt (supposing your instance is located in the <filename>my-"
3431
"instance</filename> directory):"
3434
#: serverguide/C/web-servers.xml:1223(command)
3435
msgid "my-instance/bin/startup.sh"
3436
msgstr "my-instance/bin/startup.sh"
3438
#: serverguide/C/web-servers.xml:1225(para)
3440
"You should check the <filename>logs/</filename> subdirectory for any error. "
3441
"If you have a <emphasis>java.net.BindException: Address already in "
3442
"use<null>:8080</emphasis> error, it means that the port you're using "
3443
"is already taken and that you should change it."
3446
#: serverguide/C/web-servers.xml:1230(para)
3448
"You can stop your instance by entering the following command in the terminal "
3449
"prompt (supposing your instance is located in the <filename>my-"
3450
"instance</filename> directory):"
3453
#: serverguide/C/web-servers.xml:1234(command)
3454
msgid "my-instance/bin/shutdown.sh"
3455
msgstr "my-instance/bin/shutdown.sh"
3457
#: serverguide/C/web-servers.xml:1243(para)
3459
"See the <ulink url=\"http://tomcat.apache.org/\">Apache Tomcat</ulink> "
3460
"website for more information."
3463
#: serverguide/C/web-servers.xml:1248(para)
3465
"<ulink url=\"http://oreilly.com/catalog/9780596003180/\">Tomcat: The "
3466
"Definitive Guide</ulink> is a good resource for building web applications "
3470
#: serverguide/C/web-servers.xml:1254(para)
3472
"For additional books see the <ulink "
3473
"url=\"http://wiki.apache.org/tomcat/Tomcat/Books\">Tomcat Books</ulink> list "
3477
#: serverguide/C/web-servers.xml:1259(para)
3479
"Also, see the<ulink "
3480
"url=\"https://help.ubuntu.com/community/ApacheTomcat5\">Ubuntu Wiki Apache "
3481
"Tomcat</ulink> page."
3484
#: serverguide/C/vpn.xml:13(title)
3488
#: serverguide/C/vpn.xml:15(para)
3490
"A Virtual Private Network, or <emphasis>VPN</emphasis>, is an encrypted "
3491
"network connection between two or more networks. There are several ways to "
3492
"create a VPN using software as well as dedicated hardware appliances. This "
3493
"chapter will cover installing and configuring "
3494
"<application>OpenVPN</application> to create a VPN between two servers."
3497
#: serverguide/C/vpn.xml:23(title)
3501
#: serverguide/C/vpn.xml:25(para)
3503
"OpenVPN uses Public Key Infrastructure (PKI) to encrypt VPN traffic between "
3504
"nodes. A simple way of setting up a VPN with OpenVPN is to connect the "
3505
"clients through a bridge interface on the VPN server. This guide will assume "
3506
"that one VPN node, the server in this case, has a bridge interface "
3507
"configured. For more information on setting up a bridge see <xref "
3508
"linkend=\"bridging\"/>."
3511
#: serverguide/C/vpn.xml:35(para)
3512
msgid "To install <application>openvpn</application> in a terminal enter:"
3515
#: serverguide/C/vpn.xml:41(command) serverguide/C/vpn.xml:257(command)
3516
msgid "sudo apt-get install openvpn"
3519
#: serverguide/C/vpn.xml:45(title)
3520
msgid "Server Certificates"
3523
#: serverguide/C/vpn.xml:47(para)
3525
"Now that the <application>openvpn</application> package is installed, the "
3526
"certificates for the VPN server need to be created."
3529
#: serverguide/C/vpn.xml:52(para)
3531
"First, copy the <filename>easy-rsa</filename> directory to "
3532
"<filename>/etc/openvpn</filename>. This will ensure that any changes to the "
3533
"scripts will not be lost when the package is updated. You will also need to "
3534
"adjust permissions in the <filename>easy-rsa</filename> directory to allow "
3535
"the current user permission to create files. From a terminal enter:"
3538
#: serverguide/C/vpn.xml:59(command)
3539
msgid "sudo mkdir /etc/openvpn/easy-rsa/"
3542
#: serverguide/C/vpn.xml:60(command)
3544
"sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-"
3548
#: serverguide/C/vpn.xml:61(command)
3549
msgid "sudo chown -R $USER /etc/openvpn/easy-rsa/"
3552
#: serverguide/C/vpn.xml:64(para)
3554
"Next, edit <filename>/etc/openvpn/easy-rsa/vars</filename> adjusting the "
3555
"following to your environment:"
3558
#: serverguide/C/vpn.xml:68(programlisting)
3562
"export KEY_COUNTRY=\"US\"\n"
3563
"export KEY_PROVINCE=\"NC\"\n"
3564
"export KEY_CITY=\"Winston-Salem\"\n"
3565
"export KEY_ORG=\"Example Company\"\n"
3566
"export KEY_EMAIL=\"steve@example.com\"\n"
3569
#: serverguide/C/vpn.xml:76(para)
3570
msgid "Enter the following to create the server certificates:"
3573
#: serverguide/C/vpn.xml:81(command) serverguide/C/vpn.xml:102(command)
3574
msgid "cd /etc/openvpn/easy-rsa/"
3577
#: serverguide/C/vpn.xml:82(command) serverguide/C/vpn.xml:103(command)
3581
#: serverguide/C/vpn.xml:83(command)
3585
#: serverguide/C/vpn.xml:84(command)
3589
#: serverguide/C/vpn.xml:85(command)
3590
msgid "./pkitool --initca"
3593
#: serverguide/C/vpn.xml:86(command)
3594
msgid "./pkitool --server server"
3597
#: serverguide/C/vpn.xml:87(command)
3601
#: serverguide/C/vpn.xml:88(command)
3602
msgid "openvpn --genkey --secret ta.key"
3605
#: serverguide/C/vpn.xml:89(command)
3606
msgid "sudo cp server.crt server.key ca.crt dh1024.pem ta.key /etc/openvpn/"
3609
#: serverguide/C/vpn.xml:94(title)
3610
msgid "Client Certificates"
3613
#: serverguide/C/vpn.xml:96(para)
3615
"The VPN client will also need a certificate to authenticate itself to the "
3616
"server. To create the certificate, enter the following in a terminal:"
3619
#: serverguide/C/vpn.xml:104(command)
3620
msgid "./pkitool hostname"
3623
#: serverguide/C/vpn.xml:108(para)
3625
"Replace <emphasis>hostname</emphasis> with the actual hostname of the "
3626
"machine connecting to the VPN."
3629
#: serverguide/C/vpn.xml:113(para)
3630
msgid "Copy the following files to the client:"
3633
#: serverguide/C/vpn.xml:118(para)
3634
msgid "/etc/openvpn/ca.crt"
3637
#: serverguide/C/vpn.xml:119(para)
3638
msgid "/etc/openvpn/easy-rsa/keys/hostname.crt"
3641
#: serverguide/C/vpn.xml:120(para)
3642
msgid "/etc/openvpn/easy-rsa/keys/hostname.key"
3645
#: serverguide/C/vpn.xml:121(para)
3646
msgid "/etc/openvpn/ta.key"
3649
#: serverguide/C/vpn.xml:125(para)
3651
"Remember to adjust the above file names for your client machine's "
3652
"<emphasis>hostname</emphasis>."
3655
#: serverguide/C/vpn.xml:130(para)
3657
"It is best to use a secure method to copy the certificate and key files. The "
3658
"<application>scp</application> utility is a good choice, but copying the "
3659
"files to removable media then to the client, also works well."
3662
#: serverguide/C/vpn.xml:141(title) serverguide/C/vcs.xml:107(title)
3663
msgid "Server Configuration"
3666
#: serverguide/C/vpn.xml:143(para)
3668
"Now configure the <application>openvpn</application> server by creating "
3669
"<filename>/etc/openvpn/server.conf</filename> from the example file. In a "
3673
#: serverguide/C/vpn.xml:149(command)
3675
"sudo cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz "
3679
#: serverguide/C/vpn.xml:150(command)
3680
msgid "sudo gzip -d /etc/openvpn/server.conf.gz"
3683
#: serverguide/C/vpn.xml:153(para)
3685
"Edit <filename>/etc/openvpn/server.conf</filename> changing the following "
3689
#: serverguide/C/vpn.xml:157(programlisting)
3693
"local 172.18.100.101\n"
3695
"up \"/etc/openvpn/up.sh br0\"\n"
3696
"down \"/etc/openvpn/down.sh br0\"\n"
3697
";server 10.8.0.0 255.255.255.0\n"
3698
"server-bridge 172.18.100.101 255.255.255.0 172.18.100.105 172.18.100.200\n"
3699
"push \"route 172.18.100.1 255.255.255.0\"\n"
3700
"push \"dhcp-option DNS 172.18.100.20\"\n"
3701
"push \"dhcp-option DOMAIN example.com\"\n"
3702
"tls-auth ta.key 0 # This file is secret\n"
3707
#: serverguide/C/vpn.xml:174(para)
3709
"<emphasis>local</emphasis>: is the IP address of the bridge interface."
3712
#: serverguide/C/vpn.xml:179(para)
3714
"<emphasis>server-bridge</emphasis>: needed when the configuration uses "
3715
"bridging. The <emphasis>172.18.100.101 255.255.255.0</emphasis> portion is "
3716
"the bridge interface and mask. The IP range <emphasis>172.18.100.105 "
3717
"172.18.100.200</emphasis> is the range of IP addresses that will be assigned "
3721
#: serverguide/C/vpn.xml:186(para)
3723
"<emphasis>push</emphasis>: are directives to add networking options for "
3727
#: serverguide/C/vpn.xml:191(para)
3729
"<emphasis>user and group</emphasis>: configure which user and group the "
3730
"<application>openvpn</application> daemon executes as."
3733
#: serverguide/C/vpn.xml:198(para)
3735
"Replace all IP addresses and domain names above with those of your network."
3738
#: serverguide/C/vpn.xml:203(para)
3740
"Next, create a couple of helper scripts to add the <emphasis>tap</emphasis> "
3741
"interface to the bridge. Create <filename>/etc/openvpn/up.sh</filename>:"
3744
#: serverguide/C/vpn.xml:207(programlisting)
3753
"/sbin/ifconfig $DEV mtu $MTU promisc up\n"
3754
"/usr/sbin/brctl addif $BR $DEV\n"
3757
#: serverguide/C/vpn.xml:217(para)
3758
msgid "And <filename>/etc/openvpn/down.sh</filename>:"
3761
#: serverguide/C/vpn.xml:221(programlisting)
3770
"/usr/sbin/brctl delif $BR $DEV\n"
3771
"/sbin/ifconfig $DEV down\n"
3774
#: serverguide/C/vpn.xml:231(para)
3775
msgid "Then make them executable:"
3778
#: serverguide/C/vpn.xml:236(command)
3779
msgid "sudo chmod 755 /etc/openvpn/down.sh"
3782
#: serverguide/C/vpn.xml:237(command)
3783
msgid "sudo chmod 755 /etc/openvpn/up.sh"
3786
#: serverguide/C/vpn.xml:240(para)
3788
"After configuring the server, restart <application>openvpn</application> by "
3792
#: serverguide/C/vpn.xml:245(command) serverguide/C/vpn.xml:293(command)
3793
msgid "sudo /etc/init.d/openvpn restart"
3796
#: serverguide/C/vpn.xml:250(title)
3797
msgid "Client Configuration"
3800
#: serverguide/C/vpn.xml:252(para)
3801
msgid "First, install <application>openvpn</application> on the client:"
3804
#: serverguide/C/vpn.xml:260(para)
3806
"Then with the server configured and the client certificates copied to the "
3807
"<filename>/etc/openvpn/</filename> directory, create a client configuration "
3808
"file by copying the example. In a terminal on the client machine enter:"
3811
#: serverguide/C/vpn.xml:266(command)
3813
"sudo cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf "
3817
#: serverguide/C/vpn.xml:269(para)
3819
"Now edit <filename>/etc/openvpn/client.conf</filename> changing the "
3820
"following options:"
3823
#: serverguide/C/vpn.xml:273(programlisting)
3828
"remote vpn.example.com 1194\n"
3829
"cert hostname.crt\n"
3830
"key hostname.key\n"
3831
"tls-auth ta.key 1\n"
3834
#: serverguide/C/vpn.xml:282(para)
3836
"Replace <emphasis>vpn.example.com</emphasis> with the hostname of your VPN "
3837
"server, and <emphasis>hostname.*</emphasis> with the actual certificate and "
3841
#: serverguide/C/vpn.xml:288(para)
3842
msgid "Finally, restart <application>openvpn</application>:"
3845
#: serverguide/C/vpn.xml:296(para)
3846
msgid "You should now be able to connect to the remote LAN through the VPN."
3849
#: serverguide/C/vpn.xml:307(para)
3851
"See the <ulink url=\"http://openvpn.net/\">OpenVPN</ulink> website for "
3852
"additional information."
3855
#: serverguide/C/vpn.xml:312(para)
3857
"Also, Pakt's <ulink url=\"http://www.packtpub.com/openvpn/book\">OpenVPN: "
3858
"Building and Integrating Virtual Private Networks</ulink> is a good resource."
3861
#: serverguide/C/vpn.xml:318(para)
3863
"Another source of further information is the <ulink "
3864
"url=\"https://help.ubuntu.com/community/OpenVPN\">Ubuntu Wiki "
3865
"OpenVPN</ulink> page."
3868
#: serverguide/C/virtualization.xml:13(title)
3869
msgid "Virtualization"
3870
msgstr "Virtualizacion"
3872
#: serverguide/C/virtualization.xml:14(para)
3874
"Virtualization is being adopted in many different environments and "
3875
"situations. If you are a developer, virtualization can provide you with a "
3876
"contained environment where you can safely do almost any sort of development "
3877
"safe from messing up your main working environment. If you are a systems "
3878
"administrator, you can use virtualization to more easily separate your "
3879
"services and move them around based on demand."
3882
#: serverguide/C/virtualization.xml:20(para)
3884
"The default virtualization technology supported in Ubuntu is "
3885
"<application>KVM</application>, a technology that takes advantage of "
3886
"virtualization extensions built into Intel and AMD hardware. For hardware "
3887
"without virtualization extensions <application>Xen</application> and "
3888
"<application>Qemu</application> are popular solutions."
3891
#: serverguide/C/virtualization.xml:27(title)
3895
#: serverguide/C/virtualization.xml:28(para)
3897
"The <application>libvirt</application> library is used to interface with "
3898
"different virtualization technologies. Before getting started with "
3899
"<application>libvirt</application> it is best to make sure your hardware "
3900
"supports the necessary virtualization extensions for "
3901
"<application>KVM</application>. Enter the following from a terminal prompt:"
3904
#: serverguide/C/virtualization.xml:35(command)
3908
#: serverguide/C/virtualization.xml:37(para)
3910
"A message will be printed informing you if your CPU "
3911
"<emphasis>does</emphasis> or <emphasis>does not</emphasis> support hardware "
3915
#: serverguide/C/virtualization.xml:41(para)
3917
"On most computer whose processor supports virtualization, it is necessary to "
3918
"activate an option in the BIOS to enable it."
3921
#: serverguide/C/virtualization.xml:47(title)
3922
msgid "Virtual Networking"
3923
msgstr "Virtualizacion de la ret"
3925
#: serverguide/C/virtualization.xml:49(para)
3927
"There are a few different ways to allow a virtual machine access to the "
3928
"external network. The default virtual network configuration is "
3929
"<emphasis>usermode</emphasis> networking, which uses the SLIRP protocol and "
3930
"traffic is NATed through the host interface to the outside network."
3933
#: serverguide/C/virtualization.xml:54(para)
3935
"To enable external hosts to directly access services on virtual machines a "
3936
"<emphasis>bridge</emphasis> needs to be configured. This allows the virtual "
3937
"interfaces to connect to the outside network through the physical interface, "
3938
"making them appear as normal hosts to the rest of the network. For "
3939
"information on setting up a bridge see <xref linkend=\"bridging\"/>."
3942
#: serverguide/C/virtualization.xml:63(para)
3943
msgid "To install the necessary packages, from a terminal prompt enter:"
3944
msgstr "Per installar los paquets necessaris, picatz dins un terminal :"
3946
#: serverguide/C/virtualization.xml:67(command)
3947
msgid "sudo apt-get install kvm libvirt-bin"
3948
msgstr "sudo apt-get install kvm libvirt-bin"
3950
#: serverguide/C/virtualization.xml:69(para)
3952
"After installing <application>libvirt-bin</application>, the user used to "
3953
"manage virtual machines will need to be added to the "
3954
"<emphasis>libvirtd</emphasis> group. Doing so will grant the user access to "
3955
"the advanced networking options."
3958
#: serverguide/C/virtualization.xml:73(para)
3959
msgid "In a terminal enter:"
3960
msgstr "Dins un terminal picatz :"
3962
#: serverguide/C/virtualization.xml:77(command)
3963
msgid "sudo adduser $USER libvirtd"
3964
msgstr "sudo adduser $USER libvirtd"
3966
#: serverguide/C/virtualization.xml:80(para)
3968
"If the user chosen is the current user, you will need to log out and back in "
3969
"for the new group membership to take effect."
3972
#: serverguide/C/virtualization.xml:84(para)
3974
"You are now ready to install a <emphasis>Guest</emphasis> operating system. "
3975
"Installing a virtual machine follows the same process as installing the "
3976
"operating system directly on the hardware. You either need a way to automate "
3977
"the installation, or a keyboard and monitor will need to be attached to the "
3981
#: serverguide/C/virtualization.xml:89(para)
3983
"In the case of virtual machines a Graphical User Interface (GUI) is "
3984
"analogous to using a physical keyboard and mouse. Instead of installing a "
3985
"GUI the <application>virt-viewer</application> application can be used to "
3986
"connect to a virtual machine's console using <application>VNC</application>. "
3987
"See <xref linkend=\"libvirt-virt-viewer\"/> for more information."
3990
#: serverguide/C/virtualization.xml:94(para)
3992
"There are several ways to automate the Ubuntu installation process, for "
3993
"example using preseeds, kickstart, etc. Refer to the <ulink "
3994
"url=\"https://help.ubuntu.com/10.04 LTS/installation-guide/\">Ubuntu "
3995
"Installation Guide</ulink> for details."
3998
#: serverguide/C/virtualization.xml:98(para)
4000
"Yet another way to install an Ubuntu virtual machine is to use "
4001
"<application>ubuntu-vm-builder</application>. <application>ubuntu-vm-"
4002
"builder</application> allows you to setup advanced partitions, execute "
4003
"custom post-install scripts, etc. For details see <xref linkend=\"jeos-and-"
4007
#: serverguide/C/virtualization.xml:104(title)
4008
msgid "virt-install"
4009
msgstr "virt-install"
4011
#: serverguide/C/virtualization.xml:105(para)
4013
"<application>virt-install</application> is part of the <application>python-"
4014
"virtinst</application> package. To install it, from a terminal prompt enter:"
4017
#: serverguide/C/virtualization.xml:109(command)
4018
msgid "sudo apt-get install python-virtinst"
4019
msgstr "sudo apt-get install python-virtinst"
4021
#: serverguide/C/virtualization.xml:111(para)
4023
"There are several options available when using <application>virt-"
4024
"install</application>. For example:"
4027
#: serverguide/C/virtualization.xml:115(command)
4029
"sudo virt-install -n web_devel -r 256 -f web_devel.img \\ -s 4 -c jeos.iso --"
4030
"accelerate \\ --connect=qemu:///system --vnc \\ --noautoconsole -v"
4032
"sudo virt-install -n web_devel -r 256 -f web_devel.img \\ -s 4 -c jeos.iso --"
4033
"accelerate \\ --connect=qemu:///system --vnc \\ --noautoconsole -v"
4035
#: serverguide/C/virtualization.xml:122(para)
4037
"<emphasis>-n web_devel:</emphasis> the name of the new virtual machine will "
4038
"be <emphasis>web_devel</emphasis> in this example."
4041
#: serverguide/C/virtualization.xml:127(para)
4043
"<emphasis>-r 256:</emphasis> specifies the amount of memory the virtual "
4047
#: serverguide/C/virtualization.xml:132(para)
4049
"<emphasis>-f web_devel.img:</emphasis> indicates the path to the virtual "
4050
"disk which can be a file, partition, or logical volume. In this example a "
4051
"file named <filename>web_devel.img</filename>."
4054
#: serverguide/C/virtualization.xml:138(para)
4055
msgid "<emphasis>-s 4:</emphasis> the size of the virtual disk."
4056
msgstr "<emphasis>-s 4 :</emphasis> la talha del disc virtual."
4058
#: serverguide/C/virtualization.xml:143(para)
4060
"<emphasis>-c jeos.iso:</emphasis> file to be used as a virtual CDROM. The "
4061
"file can be either an ISO file or the path to the host's CDROM device."
4064
#: serverguide/C/virtualization.xml:149(para)
4066
"<emphasis>--accelerate:</emphasis> enables the kernel's acceleration "
4070
#: serverguide/C/virtualization.xml:154(para)
4072
"<emphasis>--vnc:</emphasis> exports the guest's virtual console using VNC."
4075
#: serverguide/C/virtualization.xml:159(para)
4077
"<emphasis>--noautoconsole:</emphasis> will not automatically connect to the "
4078
"virtual machine's console."
4081
#: serverguide/C/virtualization.xml:164(para)
4082
msgid "<emphasis>-v:</emphasis> creates a fully virtualized guest."
4085
#: serverguide/C/virtualization.xml:169(para)
4087
"After launching <application>virt-install</application> you can connect to "
4088
"the virtual machine's console either locally using a GUI or with the "
4089
"<application>virt-viewer</application> utility."
4092
#: serverguide/C/virtualization.xml:175(title)
4096
#: serverguide/C/virtualization.xml:176(para)
4098
"The <application>virt-clone</application> application can be used to copy "
4099
"one virtual machine to another. For example:"
4102
#: serverguide/C/virtualization.xml:180(command)
4104
"sudo virt-clone -o web_devel -n database_devel -f "
4105
"/path/to/database_devel.img --connect=qemu:///system"
4108
#: serverguide/C/virtualization.xml:184(para)
4109
msgid "<emphasis>-o:</emphasis> original virtual machine."
4112
#: serverguide/C/virtualization.xml:189(para)
4113
msgid "<emphasis>-n:</emphasis> name of the new virtual machine."
4116
#: serverguide/C/virtualization.xml:194(para)
4118
"<emphasis>-f:</emphasis> path to the file, logical volume, or partition to "
4119
"be used by the new virtual machine."
4122
#: serverguide/C/virtualization.xml:199(para)
4124
"<emphasis>--connect:</emphasis> specifies which hypervisor to connect to."
4127
#: serverguide/C/virtualization.xml:204(para)
4129
"Also, use <emphasis>-d</emphasis> or <emphasis>--debug</emphasis> option to "
4130
"help troubleshoot problems with <application>virt-clone</application>."
4133
#: serverguide/C/virtualization.xml:209(para)
4135
"Replace <emphasis>web_devel</emphasis> and "
4136
"<emphasis>database_devel</emphasis> with appropriate virtual machine names."
4139
#: serverguide/C/virtualization.xml:215(title)
4140
msgid "Virtual Machine Management"
4143
#: serverguide/C/virtualization.xml:217(title)
4147
#: serverguide/C/virtualization.xml:218(para)
4149
"There are several utilities available to manage virtual machines and "
4150
"<application>libvirt</application>. The <application>virsh</application> "
4151
"utility can be used from the command line. Some examples:"
4154
#: serverguide/C/virtualization.xml:224(para)
4155
msgid "To list running virtual machines:"
4158
#: serverguide/C/virtualization.xml:228(command)
4159
msgid "virsh -c qemu:///system list"
4160
msgstr "virsh -c qemu:///system list"
4162
#: serverguide/C/virtualization.xml:232(para)
4163
msgid "To start a virtual machine:"
4164
msgstr "Per amodar una maquina virtuala :"
4166
#: serverguide/C/virtualization.xml:236(command)
4167
msgid "virsh -c qemu:///system start web_devel"
4168
msgstr "virsh -c qemu:///system start web_devel"
4170
#: serverguide/C/virtualization.xml:240(para)
4171
msgid "Similarly, to start a virtual machine at boot:"
4174
#: serverguide/C/virtualization.xml:244(command)
4175
msgid "virsh -c qemu:///system autostart web_devel"
4176
msgstr "virsh -c qemu:///system autostart web_devel"
4178
#: serverguide/C/virtualization.xml:248(para)
4179
msgid "Reboot a virtual machine with:"
4182
#: serverguide/C/virtualization.xml:252(command)
4183
msgid "virsh -c qemu:///system reboot web_devel"
4184
msgstr "virsh -c qemu:///system reboot web_devel"
4186
#: serverguide/C/virtualization.xml:256(para)
4188
"The <emphasis>state</emphasis> of virtual machines can be saved to a file in "
4189
"order to be restored later. The following will save the virtual machine "
4190
"state into a file named according to the date:"
4193
#: serverguide/C/virtualization.xml:261(command)
4194
msgid "virsh -c qemu:///system save web_devel web_devel-022708.state"
4195
msgstr "virsh -c qemu:///system save web_devel web_devel-022708.state"
4197
#: serverguide/C/virtualization.xml:263(para)
4198
msgid "Once saved the virtual machine will no longer be running."
4201
#: serverguide/C/virtualization.xml:268(para)
4202
msgid "A saved virtual machine can be restored using:"
4205
#: serverguide/C/virtualization.xml:272(command)
4206
msgid "virsh -c qemu:///system restore web_devel-022708.state"
4209
#: serverguide/C/virtualization.xml:276(para)
4210
msgid "To shutdown a virtual machine do:"
4211
msgstr "Per arrestar una maquina virtuala :"
4213
#: serverguide/C/virtualization.xml:280(command)
4214
msgid "virsh -c qemu:///system shutdown web_devel"
4215
msgstr "virsh -c qemu:///system shutdown web_devel"
4217
#: serverguide/C/virtualization.xml:284(para)
4218
msgid "A CDROM device can be mounted in a virtual machine by entering:"
4221
#: serverguide/C/virtualization.xml:288(command)
4222
msgid "virsh -c qemu:///system attach-disk web_devel /dev/cdrom /media/cdrom"
4224
"virsh -c qemu:///system attach-disk web_devel /dev/cdrom /media/cdrom"
4226
#: serverguide/C/virtualization.xml:293(para)
4228
"In the above examples replace <emphasis>web_devel</emphasis> with the "
4229
"appropriate virtual machine name, and <filename>web_devel-"
4230
"022708.state</filename> with a descriptive file name."
4233
#: serverguide/C/virtualization.xml:300(title)
4234
msgid "Virtual Machine Manager"
4235
msgstr "Gestionari de maquina virtuala"
4237
#: serverguide/C/virtualization.xml:301(para)
4239
"The <application>virt-manager</application> package contains a graphical "
4240
"utility to manage local and remote virtual machines. To install virt-manager "
4244
#: serverguide/C/virtualization.xml:306(command)
4245
msgid "sudo apt-get install virt-manager"
4246
msgstr "sudo apt-get install virt-manager"
4248
#: serverguide/C/virtualization.xml:308(para)
4250
"Since <application>virt-manager</application> requires a Graphical User "
4251
"Interface (GUI) environment it is recommended to be installed on a "
4252
"workstation or test machine instead of a production server. To connect to "
4253
"the local <application>libvirt</application> service enter:"
4256
#: serverguide/C/virtualization.xml:314(command)
4257
msgid "virt-manager -c qemu:///system"
4258
msgstr "virt-manager -c qemu:///system"
4260
#: serverguide/C/virtualization.xml:316(para)
4262
"You can connect to the <application>libvirt</application> service running on "
4263
"another host by entering the following in a terminal prompt:"
4266
#: serverguide/C/virtualization.xml:320(command)
4267
msgid "virt-manager -c qemu+ssh://virtnode1.mydomain.com/system"
4268
msgstr "virt-manager -c qemu+ssh://virtnode1.mydomain.com/system"
4270
#: serverguide/C/virtualization.xml:323(para)
4272
"The above example assumes that <application>SSH</application> connectivity "
4273
"between the management system and virtnode1.mydomain.com has already been "
4274
"configured, and uses SSH keys for authentication. SSH "
4275
"<emphasis>keys</emphasis> are needed because "
4276
"<application>libvirt</application> sends the password prompt to another "
4277
"process. For details on configuring <application>SSH</application> see <xref "
4278
"linkend=\"openssh-server\"/>"
4281
#: serverguide/C/virtualization.xml:333(title)
4282
msgid "Virtual Machine Viewer"
4283
msgstr "Afichador de maquina virtuala"
4285
#: serverguide/C/virtualization.xml:334(para)
4287
"The <application>virt-viewer</application> application allows you to connect "
4288
"to a virtual machine's console. <application>virt-viewer</application> does "
4289
"require a Graphical User Interface (GUI) to interface with the virtual "
4293
#: serverguide/C/virtualization.xml:338(para)
4295
"To install <application>virt-viewer</application> from a terminal enter:"
4298
#: serverguide/C/virtualization.xml:342(command)
4299
msgid "sudo apt-get install virt-viewer"
4300
msgstr "sudo apt-get install virt-viewer"
4302
#: serverguide/C/virtualization.xml:344(para)
4304
"Once a virtual machine is installed and running you can connect to the "
4305
"virtual machine's console by using:"
4308
#: serverguide/C/virtualization.xml:348(command)
4309
msgid "virt-viewer -c qemu:///system web_devel"
4310
msgstr "virt-viewer -c qemu:///system web_devel"
4312
#: serverguide/C/virtualization.xml:350(para)
4314
"Similar to <application>virt-manager</application>, <application>virt-"
4315
"viewer</application> can connect to a remote host using "
4316
"<emphasis>SSH</emphasis> with key authentication, as well:"
4319
#: serverguide/C/virtualization.xml:355(command)
4320
msgid "virt-viewer -c qemu+ssh://virtnode1.mydomain.com/system web_devel"
4321
msgstr "virt-viewer -c qemu+ssh://virtnode1.mydomain.com/system web_devel"
4323
#: serverguide/C/virtualization.xml:357(para)
4325
"Be sure to replace <emphasis role=\"italic\">web_devel</emphasis> with the "
4326
"appropriate virtual machine name."
4329
#: serverguide/C/virtualization.xml:360(para)
4331
"If configured to use a <emphasis>bridged</emphasis> network interface you "
4332
"can also setup <application>SSH</application> access to the virtual machine. "
4333
"See <xref linkend=\"openssh-server\"/> and <xref linkend=\"bridging\"/> for "
4337
#: serverguide/C/virtualization.xml:369(para)
4339
"See the <ulink url=\"http://kvm.qumranet.com/kvmwiki\">KVM</ulink> home page "
4343
#: serverguide/C/virtualization.xml:374(para)
4345
"For more information on <application>libvirt</application> see the <ulink "
4346
"url=\"http://libvirt.org/\">libvirt home page</ulink>"
4349
#: serverguide/C/virtualization.xml:379(para)
4351
"The <ulink url=\"http://virt-manager.et.redhat.com/\">Virtual Machine "
4352
"Manager</ulink> site has more information on <application>virt-"
4353
"manager</application> development."
4356
#: serverguide/C/virtualization.xml:385(para)
4358
"Also, stop by the <emphasis>#ubuntu-virt</emphasis> IRC channel on <ulink "
4359
"url=\"http://freenode.net/\">freenode</ulink> to discuss virtualization "
4360
"technology in Ubuntu."
4363
#: serverguide/C/virtualization.xml:391(para)
4365
"Another good resource is the <ulink "
4366
"url=\"https://help.ubuntu.com/community/KVM\">Ubuntu Wiki KVM</ulink> page."
4369
#: serverguide/C/virtualization.xml:399(title)
4370
msgid "JeOS and vmbuilder"
4371
msgstr "JeOS e vmbuilder"
4373
#: serverguide/C/virtualization.xml:405(title)
4374
msgid "What is JeOS"
4375
msgstr "Qu'es aquò JeOS ?"
4377
#: serverguide/C/virtualization.xml:407(para)
4379
"Ubuntu <emphasis>JeOS</emphasis> (pronounced \"Juice\") is an efficient "
4380
"variant of the Ubuntu Server operating system, configured specifically for "
4381
"virtual appliances. No longer available as a CD-ROM ISO for download, but "
4382
"only as an option either:"
4385
#: serverguide/C/virtualization.xml:414(para)
4387
"While installing from the Server Edition ISO (pressing "
4388
"<emphasis>F4</emphasis> on the first screen will allow you to pick \"Minimal "
4389
"installation\", which is the package selection equivalent to JeOS)."
4392
#: serverguide/C/virtualization.xml:420(para)
4393
msgid "Or to be built using Ubuntu's vmbuilder, which is described here."
4396
#: serverguide/C/virtualization.xml:426(para)
4398
"JeOS is a specialized installation of Ubuntu Server Edition with a tuned "
4399
"kernel that only contains the base elements needed to run within a "
4400
"virtualized environment."
4403
#: serverguide/C/virtualization.xml:431(para)
4405
"Ubuntu JeOS has been tuned to take advantage of key performance technologies "
4406
"in the latest virtualization products from VMware. This combination of "
4407
"reduced size and optimized performance ensures that Ubuntu JeOS Edition "
4408
"delivers a highly efficient use of server resources in large virtual "
4412
#: serverguide/C/virtualization.xml:437(para)
4414
"Without unnecessary drivers, and only the minimal required packages, ISVs "
4415
"can configure their supporting OS exactly as they require. They have the "
4416
"peace of mind that updates, whether for security or enhancement reasons, "
4417
"will be limited to the bare minimum of what is required in their specific "
4418
"environment. In turn, users deploying virtual appliances built on top of "
4419
"JeOS will have to go through fewer updates and therefore less maintenance "
4420
"than they would have had to with a standard full installation of a server."
4423
#: serverguide/C/virtualization.xml:446(title)
4424
msgid "What is vmbuilder"
4425
msgstr "Qu'es aquò vmbuilder ?"
4427
#: serverguide/C/virtualization.xml:448(para)
4429
"With vmbuilder, there is no need to download a JeOS ISO anymore. vmbuilder "
4430
"will fetch the various package and build a virtual machine tailored for your "
4431
"needs in about a minute. vmbuilder is a script that automates the process of "
4432
"creating a ready to use Linux based VM. The currently supported hypervisors "
4436
#: serverguide/C/virtualization.xml:454(para)
4438
"You can pass command line options to add extra packages, remove packages, "
4439
"choose which version of Ubuntu, which mirror etc. On recent hardware with "
4440
"plenty of RAM, tmpdir in <filename>/dev/shm</filename> or using a tmpfs, and "
4441
"a local mirror, you can bootstrap a VM in less than a minute."
4444
#: serverguide/C/virtualization.xml:460(para)
4446
"First introduced as a shell script in Ubuntu 8.04 LTS, <application>ubuntu-"
4447
"vm-builder</application> started with little emphasis as a hack to help "
4448
"developers test their new code in a virtual machine without having to "
4449
"restart from scratch each time. As a few Ubuntu administrators started to "
4450
"notice this script, a few of them went on improving it and adapting it for "
4451
"so many use case that Soren Hansen (the author of the script and Ubuntu "
4452
"virtualization specialist, not the golf player) decided to rewrite it from "
4453
"scratch for Intrepid as a python script with a few new design goals:"
4456
#: serverguide/C/virtualization.xml:470(para)
4457
msgid "Develop it so that it can be reused by other distributions."
4460
#: serverguide/C/virtualization.xml:475(para)
4462
"Use a plugin mechanisms for all virtualization interactions so that others "
4463
"can easily add logic for other virtualization environments."
4466
#: serverguide/C/virtualization.xml:480(para)
4468
"Provide an easy to maintain web interface as an option to the command line "
4472
#: serverguide/C/virtualization.xml:486(para)
4473
msgid "But the general principles and commands remain the same."
4476
#: serverguide/C/virtualization.xml:493(title)
4477
msgid "Initial Setup"
4478
msgstr "Configuracion iniciala"
4480
#: serverguide/C/virtualization.xml:495(para)
4482
"It is assumed that you have installed and configured "
4483
"<application>libvirt</application> and <application>KVM</application> "
4484
"locally on the machine you are using. For details on how to perform this, "
4488
#: serverguide/C/virtualization.xml:507(para)
4490
"The <ulink url=\"https://help.ubuntu.com/community/KVM\">KVM</ulink> Wiki "
4493
"La pagina Wiki de <ulink "
4494
"url=\"https://help.ubuntu.com/community/KVM\">KVM</ulink>"
4496
#: serverguide/C/virtualization.xml:513(para)
4498
"We also assume that you know how to use a text based text editor such as "
4499
"nano or vi. If you have not used any of them before, you can get an overview "
4500
"of the various text editors available by reading the <ulink "
4501
"url=\"https://help.ubuntu.com/community/PowerUsersTextEditors\">PowerUsersTex"
4502
"tEditors</ulink> page. This tutorial has been done on KVM, but the general "
4503
"principle should remain on other virtualization technologies."
4506
#: serverguide/C/virtualization.xml:521(title)
4507
msgid "Install vmbuilder"
4508
msgstr "Installatz vmbuilder"
4510
#: serverguide/C/virtualization.xml:523(para)
4512
"The name of the package that we need to install is <application>python-vm-"
4513
"builder</application>. In a terminal prompt enter:"
4516
#: serverguide/C/virtualization.xml:528(command)
4517
msgid "sudo apt-get install python-vm-builder"
4518
msgstr "sudo apt-get install python-vm-builder"
4520
#: serverguide/C/virtualization.xml:532(para)
4522
"If you are running Hardy, you can still perform most of this using the older "
4523
"version of the package named <application>ubuntu-vm-builder</application>, "
4524
"there are only a few changes to the syntax of the tool."
4527
#: serverguide/C/virtualization.xml:541(title)
4528
msgid "Defining Your Virtual Machine"
4529
msgstr "Definissètz Vòstra Maquina Virtuala"
4531
#: serverguide/C/virtualization.xml:543(para)
4533
"Defining a virtual machine with Ubuntu's vmbuilder is quite simple, but here "
4534
"are a few thing to consider:"
4537
#: serverguide/C/virtualization.xml:549(para)
4539
"If you plan on shipping a virtual appliance, do not assume that the end-user "
4540
"will know how to extend disk size to fit their need, so either plan for a "
4541
"large virtual disk to allow for your appliance to grow, or explain fairly "
4542
"well in your documentation how to allocate more space. It might actually be "
4543
"a good idea to store data on some separate external storage."
4546
#: serverguide/C/virtualization.xml:556(para)
4548
"Given that RAM is much easier to allocate in a VM, RAM size should be set to "
4549
"whatever you think is a safe minimum for your appliance."
4552
#: serverguide/C/virtualization.xml:562(para)
4554
"The <application>vmbuilder</application> command has 2 main parameters: the "
4555
"<emphasis>virtualization technology (hypervisor)</emphasis> and the targeted "
4556
"<emphasis>distribution</emphasis>. Optional parameters are quite numerous "
4557
"and can be found using the following command:"
4560
#: serverguide/C/virtualization.xml:568(command)
4561
msgid "vmbuilder --help"
4562
msgstr "vmbuilder --help"
4564
#: serverguide/C/virtualization.xml:572(title)
4565
msgid "Base Parameters"
4566
msgstr "Paramètres de basa"
4568
#: serverguide/C/virtualization.xml:574(para)
4570
"As this example is based on <application>KVM</application> and Ubuntu 10.04 "
4571
"LTS (Lucid Lynx), and we are likely to rebuild the same virtual machine "
4572
"multiple time, we'll invoke vmbuilder with the following first parameters:"
4575
#: serverguide/C/virtualization.xml:580(command)
4577
"sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o --"
4578
"libvirt qemu:///system"
4581
#: serverguide/C/virtualization.xml:583(para)
4583
"The <emphasis>--suite</emphasis> defines the Ubuntu release, the <emphasis>--"
4584
"flavour</emphasis> specifies that we want to use the virtual kernel (that's "
4585
"the one used to build a JeOS image), the <emphasis>--arch</emphasis> tells "
4586
"that we want to use a 32 bit machine, the <emphasis>-o</emphasis> tells "
4587
"vmbuilder to overwrite the previous version of the VM and the <emphasis>--"
4588
"libvirt</emphasis> tells to inform the local virtualization environment to "
4589
"add the resulting VM to the list of available machines."
4592
#: serverguide/C/virtualization.xml:591(para)
4596
#: serverguide/C/virtualization.xml:597(para)
4598
"Because of the nature of operations performed by vmbuilder, it needs to have "
4599
"root privilege, hence the use of sudo."
4602
#: serverguide/C/virtualization.xml:602(para)
4604
"If your virtual machine needs to use more than 3Gb of ram, you should build "
4605
"a 64 bit machine (--arch amd64)."
4608
#: serverguide/C/virtualization.xml:607(para)
4610
"Until Ubuntu 8.10, the virtual kernel was only built for 32 bit "
4611
"architecture, so if you want to define an amd64 machine on Hardy, you should "
4612
"use <emphasis>--flavour</emphasis> server instead."
4615
#: serverguide/C/virtualization.xml:615(title)
4616
msgid "JeOS Installation Parameters"
4617
msgstr "Paramètres d'installacion de JeOS"
4619
#: serverguide/C/virtualization.xml:618(title)
4620
msgid "JeOS Networking"
4623
#: serverguide/C/virtualization.xml:621(title)
4624
msgid "Assigning a fixed IP address"
4625
msgstr "Attribuir una adreça IP fixa"
4627
#: serverguide/C/virtualization.xml:623(para)
4629
"As a virtual appliance that may be deployed on various very different "
4630
"networks, it is very difficult to know what the actual network will look "
4631
"like. In order to simplify configuration, it is a good idea to take an "
4632
"approach similar to what network hardware vendors usually do, namely "
4633
"assigning an initial fixed IP address to the appliance in a private class "
4634
"network that you will provide in your documentation. An address in the range "
4635
"192.168.0.0/255 is usually a good choice."
4638
#: serverguide/C/virtualization.xml:630(para)
4639
msgid "To do this we'll use the following parameters:"
4642
#: serverguide/C/virtualization.xml:636(para)
4644
"<emphasis>--ip ADDRESS</emphasis>: IP address in dotted form (defaults to "
4645
"dhcp if not specified)"
4648
#: serverguide/C/virtualization.xml:641(para)
4650
"<emphasis>--mask VALUE</emphasis>: IP mask in dotted form (default: "
4654
#: serverguide/C/virtualization.xml:646(para)
4655
msgid "<emphasis>--net VALUE</emphasis>: IP net address (default: X.X.X.0)"
4658
#: serverguide/C/virtualization.xml:651(para)
4659
msgid "<emphasis>--bcast VALUE</emphasis>: IP broadcast (default: X.X.X.255)"
4662
#: serverguide/C/virtualization.xml:656(para)
4663
msgid "<emphasis>--gw ADDRESS</emphasis>: Gateway address (default: X.X.X.1)"
4666
#: serverguide/C/virtualization.xml:661(para)
4668
"<emphasis>--dns ADDRESS</emphasis>: Name server address (default: X.X.X.1)"
4671
#: serverguide/C/virtualization.xml:667(para)
4673
"We assume for now that default values are good enough, so the resulting "
4674
"invocation becomes:"
4677
#: serverguide/C/virtualization.xml:672(command)
4679
"sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o --"
4680
"libvirt qemu:///system --ip 192.168.0.100"
4683
#: serverguide/C/virtualization.xml:677(title)
4684
msgid "Modifying the libvirt Template to use Bridging"
4687
#: serverguide/C/virtualization.xml:679(para)
4689
"Because our appliance will be likely to need to be accessed by remote hosts, "
4690
"we need to configure libvirt so that the appliance uses bridge networking. "
4691
"To do this we use vmbuilder template mechanism to modify the default one."
4694
#: serverguide/C/virtualization.xml:684(para)
4696
"In our working directory we create the template hierarchy and copy the "
4700
#: serverguide/C/virtualization.xml:689(command)
4701
msgid "mkdir -p VMBuilder/plugins/libvirt/templates"
4704
#: serverguide/C/virtualization.xml:690(command)
4705
msgid "cp /etc/vmbuilder/libvirt/* VMBuilder/plugins/libvirt/templates/"
4708
#: serverguide/C/virtualization.xml:693(para)
4711
"<filename>VMBuilder/plugins/libvirt/templates/libvirtxml.tmpl</filename> to "
4715
#: serverguide/C/virtualization.xml:697(programlisting)
4719
" <interface type='network'>\n"
4720
" <source network='default'/>\n"
4721
" </interface>\n"
4724
#: serverguide/C/virtualization.xml:703(para)
4728
#: serverguide/C/virtualization.xml:707(programlisting)
4732
" <interface type='bridge'>\n"
4733
" <source bridge='br0'/>\n"
4734
" </interface>\n"
4737
#: serverguide/C/virtualization.xml:717(title) serverguide/C/installation.xml:459(title)
4738
msgid "Partitioning"
4741
#: serverguide/C/virtualization.xml:719(para)
4743
"Partitioning of the virtual appliance will have to take into consideration "
4744
"what you are planning to do with is. Because most appliances want to have a "
4745
"separate storage for data, having a separate <filename>/var</filename> would "
4749
#: serverguide/C/virtualization.xml:724(para)
4751
"In order to do this vmbuilder provides us with <emphasis>--part</emphasis>:"
4754
#: serverguide/C/virtualization.xml:728(programlisting)
4759
" Allows you to specify a partition table in a partition file, located at "
4760
"PATH. Each line of the partition file should specify\n"
4762
" mountpoint size\n"
4763
" where size is in megabytes. You can have up to 4 virtual disks, a new "
4764
"disk starts on a\n"
4765
" line with ’---’. ie :\n"
4774
#: serverguide/C/virtualization.xml:743(para)
4776
"In our case we will define a text file name "
4777
"<filename>vmbuilder.partition</filename> which will contain the following:"
4780
#: serverguide/C/virtualization.xml:747(programlisting)
4790
#: serverguide/C/virtualization.xml:755(para)
4792
"Note that as we are using virtual disk images, the actual sizes that we put "
4793
"here are maximum sizes for these volumes."
4796
#: serverguide/C/virtualization.xml:760(para)
4797
msgid "Our command line now looks like:"
4800
#: serverguide/C/virtualization.xml:765(command)
4802
"sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 \\ -o -"
4803
"-libvirt qemu:///system --ip 192.168.0.100 --part vmbuilder.partition"
4806
#: serverguide/C/virtualization.xml:770(para)
4808
"Using a \"\\\" in a command will allow long command strings to wrap to the "
4812
#: serverguide/C/virtualization.xml:777(title)
4813
msgid "User and Password"
4816
#: serverguide/C/virtualization.xml:779(para)
4818
"Again setting up a virtual appliance, you will need to provide a default "
4819
"user and password that is generic so that you can include it in your "
4820
"documentation. We will see later on in this tutorial how we will provide "
4821
"some security by defining a script that will be run the first time a user "
4822
"actually logs in the appliance, that will, among other things, ask him to "
4823
"change his password. In this example I will use <emphasis>'user'</emphasis> "
4824
"as my user name, and <emphasis>'default'</emphasis> as the password."
4827
#: serverguide/C/virtualization.xml:787(para)
4828
msgid "To do this we use the following optional parameters:"
4831
#: serverguide/C/virtualization.xml:793(para)
4833
"<emphasis>--user USERNAME:</emphasis> Sets the name of the user to be added. "
4837
#: serverguide/C/virtualization.xml:798(para)
4839
"<emphasis>--name FULLNAME:</emphasis> Sets the full name of the user to be "
4840
"added. Default: Ubuntu."
4843
#: serverguide/C/virtualization.xml:803(para)
4845
"<emphasis>--pass PASSWORD:</emphasis> Sets the password for the user. "
4849
#: serverguide/C/virtualization.xml:809(para)
4850
msgid "Our resulting command line becomes:"
4853
#: serverguide/C/virtualization.xml:814(command)
4855
"sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 \\ -o -"
4856
"-libvirt qemu:///system --ip 192.168.0.100 --part vmbuilder.partition \\ --"
4857
"user user --name user --pass default"
4860
#: serverguide/C/virtualization.xml:822(title)
4861
msgid "Installing Required Packages"
4864
#: serverguide/C/virtualization.xml:824(para)
4866
"In this example we will be installing a package "
4867
"<application>(Limesurvey)</application> that accesses a "
4868
"<application>MySQL</application> database and has a web interface. We will "
4869
"therefore require our OS to provide us with:"
4872
#: serverguide/C/virtualization.xml:831(para)
4876
#: serverguide/C/virtualization.xml:832(para)
4880
#: serverguide/C/virtualization.xml:833(para) serverguide/C/databases.xml:19(trademark) serverguide/C/databases.xml:31(title)
4884
#: serverguide/C/virtualization.xml:834(para) serverguide/C/remote-administration.xml:20(title)
4885
msgid "OpenSSH Server"
4888
#: serverguide/C/virtualization.xml:835(para)
4889
msgid "Limesurvey (as an example application that we have packaged)"
4892
#: serverguide/C/virtualization.xml:838(para)
4894
"This is done using vmbuilder by specifying the --addpkg option multiple "
4898
#: serverguide/C/virtualization.xml:842(programlisting)
4903
" Install PKG into the guest (can be specfied multiple times)\n"
4906
#: serverguide/C/virtualization.xml:847(para)
4908
"However, due to the way vmbuilder operates, packages that have to ask "
4909
"questions to the user during the post install phase are not supported and "
4910
"should instead be installed while interactivity can occur. This is the case "
4911
"of Limesurvey, which we will have to install later, once the user logs in."
4914
#: serverguide/C/virtualization.xml:853(para)
4916
"Other packages that ask simple debconf question, such as <application>mysql-"
4917
"server</application> asking to set a password, the package can be installed "
4918
"immediately, but we will have to reconfigure it the first time the user logs "
4922
#: serverguide/C/virtualization.xml:859(para)
4924
"If some packages that we need to install are not in main, we need to enable "
4925
"the additional repositories using --comp and --ppa:"
4928
#: serverguide/C/virtualization.xml:863(programlisting)
4932
"--components COMP1,COMP2,...,COMPN\n"
4933
" A comma separated list of distro components to include (e.g. "
4934
"main,universe). This defaults\n"
4936
"--ppa=PPA Add ppa belonging to PPA to the vm's sources.list.\n"
4939
#: serverguide/C/virtualization.xml:870(para)
4941
"Limesurvey not being part of the archive at the moment, we'll specify it's "
4942
"PPA (personal package archive) address so that it is added to the VM "
4943
"<filename>/etc/apt/source.list</filename>, so we add the following options "
4944
"to the command line:"
4947
#: serverguide/C/virtualization.xml:876(command)
4949
"--addpkg apache2 --addpkg apache2-mpm-prefork --addpkg apache2-utils --"
4950
"addpkg apache2.2-common \\ --addpkg dbconfig-common --addpkg libapache2-mod-"
4951
"php5 --addpkg mysql-client --addpkg php5-cli \\ --addpkg php5-gd --addpkg "
4952
"php5-ldap --addpkg php5-mysql --addpkg wwwconfig-common \\ --addpkg mysql-"
4953
"server --ppa nijaba"
4956
#: serverguide/C/virtualization.xml:883(title)
4960
#: serverguide/C/virtualization.xml:885(para)
4962
"Another convenient tool that we want to have on our appliance is OpenSSH, as "
4963
"it will allow our admins to access the appliance remotely. However, pushing "
4964
"in the wild an appliance with a pre-installed OpenSSH server is a big "
4965
"security risk as all these server will share the same secret key, making it "
4966
"very easy for hackers to target our appliance with all the tools they need "
4967
"to crack it open in a breeze. As for the user password, we will instead rely "
4968
"on a script that will install OpenSSH the first time a user logs in so that "
4969
"the key generated will be different for each appliance. For this we'll use a "
4970
"<emphasis>--firstboot</emphasis> script, as it does not need any user "
4974
#: serverguide/C/virtualization.xml:897(title)
4975
msgid "Speed Considerations"
4978
#: serverguide/C/virtualization.xml:900(title)
4979
msgid "Package Caching"
4982
#: serverguide/C/virtualization.xml:902(para)
4984
"When vmbuilder creates builds your system, it has to go fetch each one of "
4985
"the packages that composes it over the network to one of the official "
4986
"repositories, which, depending on your internet connection speed and the "
4987
"load of the mirror, can have a big impact on the actual build time. In order "
4988
"to reduce this, it is recommended to either have a local repository (which "
4989
"can be created using <application>apt-mirror</application>) or using a "
4990
"caching proxy such as <application>apt-proxy</application>. The later option "
4991
"being much simpler to implement and requiring less disk space, it is the one "
4992
"we will pick in this tutorial. To install it, simply type:"
4995
#: serverguide/C/virtualization.xml:912(command)
4996
msgid "sudo apt-get install apt-proxy"
4999
#: serverguide/C/virtualization.xml:915(para)
5001
"Once this is complete, your (empty) proxy is ready for use on "
5002
"http://mirroraddress:9999 and will find ubuntu repository under /ubuntu. For "
5003
"vmbuilder to use it, we'll have to use the <emphasis>--mirror</emphasis> "
5007
#: serverguide/C/virtualization.xml:920(programlisting)
5011
"--mirror=URL Use Ubuntu mirror at URL instead of the default, which\n"
5012
" is http://archive.ubuntu.com/ubuntu for official\n"
5013
" arches and http://ports.ubuntu.com/ubuntu-ports\n"
5017
#: serverguide/C/virtualization.xml:927(para)
5018
msgid "So we add to the command line:"
5021
#: serverguide/C/virtualization.xml:932(command)
5022
msgid "--mirror http://mirroraddress:9999/ubuntu"
5025
#: serverguide/C/virtualization.xml:936(para)
5027
"The mirror address specified here will also be used in the "
5028
"<filename>/etc/apt/sources.list</filename> of the newly created guest, so it "
5029
"is useful to specify here an address that can be resolved by the guest or to "
5030
"plan on reseting this address later on, such as in a <emphasis>--"
5031
"firstboot</emphasis> script."
5034
#: serverguide/C/virtualization.xml:945(title)
5035
msgid "Install a Local Mirror"
5038
#: serverguide/C/virtualization.xml:947(para)
5040
"If we are in a larger environment, it may make sense to setup a local mirror "
5041
"of the Ubuntu repositories. The package apt-mirror provides you with a "
5042
"script that will handle the mirroring for you. You should plan on having "
5043
"about 20 gigabyte of free space per supported release and architecture."
5046
#: serverguide/C/virtualization.xml:953(para)
5048
"By default, <application>apt-mirror</application> uses the configuration "
5049
"file in <filename>/etc/apt/mirror.list</filename>. As it is set up, it will "
5050
"replicate only the architecture of the local machine. If you would like to "
5051
"support other architectures on your mirror, simply duplicate the lines "
5052
"starting with “deb”, replacing the deb keyword by /deb-{arch} where arch can "
5053
"be i386, amd64, etc... For example, on an amd64 machine, to have the i386 "
5054
"archives as well, you will have:"
5057
#: serverguide/C/virtualization.xml:960(programlisting)
5061
"deb http://archive.ubuntu.com/ubuntu lucid main restricted universe "
5063
"/deb-i386 http://archive.ubuntu.com/ubuntu lucid main restricted universe "
5066
"deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe "
5068
"/deb-i386 http://archive.ubuntu.com/ubuntu lucid-updates main restricted "
5069
"universe multiverse \n"
5071
"deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted "
5072
"universe multiverse \n"
5073
"/deb-i386 http://archive.ubuntu.com/ubuntu lucid-backports main restricted "
5074
"universe multiverse \n"
5076
"deb http://security.ubuntu.com/ubuntu lucid-security main restricted "
5077
"universe multiverse \n"
5078
"/deb-i386 http://security.ubuntu.com/ubuntu lucid-security main restricted "
5079
"universe multiverse \n"
5081
"deb http://archive.ubuntu.com/ubuntu lucid main/debian-installer "
5082
"restricted/debian-installer universe/debian-installer multiverse/debian-"
5084
"/deb-i386 http://archive.ubuntu.com/ubuntu lucid main/debian-installer "
5085
"restricted/debian-installer universe/debian-installer multiverse/debian-"
5089
#: serverguide/C/virtualization.xml:977(para)
5091
"Notice that the source packages are not mirrored as they are seldom used "
5092
"compared to the binaries and they do take a lot more space, but they can be "
5093
"easily added to the list."
5096
#: serverguide/C/virtualization.xml:982(para)
5098
"Once the mirror has finished replicating (and this can be quite long), you "
5099
"need to configure Apache so that your mirror files (in "
5100
"<filename>/var/spool/apt-mirror</filename> if you did not change the "
5101
"default), are published by your Apache server. For more information on "
5102
"Apache see <xref linkend=\"httpd\"/>."
5105
#: serverguide/C/virtualization.xml:991(title)
5106
msgid "Installing in a RAM Disk"
5109
#: serverguide/C/virtualization.xml:993(para)
5111
"As you can easily imagine, writing to RAM is a <emphasis>LOT</emphasis> "
5112
"faster than writing to disk. If you have some free memory, letting vmbuilder "
5113
"perform its operation in a RAMdisk will help a lot and the option <emphasis>-"
5114
"-tmpfs</emphasis> will help you do just that:"
5117
#: serverguide/C/virtualization.xml:999(programlisting)
5121
"--tmpfs OPTS Use a tmpfs as the working directory, specifying its\n"
5122
" size or \"-\" to use tmpfs default (suid,dev,size=1G).\n"
5125
#: serverguide/C/virtualization.xml:1004(para)
5127
"So adding <command>--tmpfs -</command> sounds like a very good idea if you "
5128
"have 1G of free ram."
5131
#: serverguide/C/virtualization.xml:1011(title)
5132
msgid "Package the Application"
5135
#: serverguide/C/virtualization.xml:1013(para)
5136
msgid "Two option are available to us:"
5139
#: serverguide/C/virtualization.xml:1019(para)
5141
"The recommended method to do so is to make a <emphasis>Debian</emphasis> "
5142
"package. Since this is outside of the scope of this tutorial, we will not "
5143
"perform this here and invite the reader to read the documentation on how to "
5144
"do this in the <ulink url=\"https://wiki.ubuntu.com/PackagingGuide\">Ubuntu "
5145
"Packaging Guide</ulink>. In this case it is also a good idea to setup a "
5146
"repository for your package so that updates can be conveniently pulled from "
5147
"it. See the <ulink url=\"http://www.debian-"
5148
"administration.org/articles/286\">Debian Administration</ulink> article for "
5149
"a tutorial on this."
5152
#: serverguide/C/virtualization.xml:1028(para)
5154
"Manually install the application under <filename>/opt</filename> as "
5155
"recommended by the <ulink url=\"http://www.pathname.com/fhs/\">FHS "
5156
"guidelines</ulink>."
5159
#: serverguide/C/virtualization.xml:1035(para)
5161
"In our case we'll use <application>Limesurvey</application> as example web "
5162
"application for which we wish to provide a virtual appliance. As noted "
5163
"before, we've made a version of the package available in a PPA (Personal "
5167
#: serverguide/C/virtualization.xml:1042(title)
5168
msgid "Finishing Install"
5171
#: serverguide/C/virtualization.xml:1045(title)
5175
#: serverguide/C/virtualization.xml:1047(para)
5177
"As we mentioned earlier, the first time the machine boots we'll need to "
5178
"install <application>openssh-server</application> so that the key generated "
5179
"for it is unique for each machine. To do this, we'll write a script called "
5180
"<filename>boot.sh</filename> as follows:"
5183
#: serverguide/C/virtualization.xml:1053(programlisting)
5187
"# This script will run the first time the virtual machine boots\n"
5188
"# It is ran as root.\n"
5191
"apt-get install -qqy --force-yes openssh-server\n"
5194
#: serverguide/C/virtualization.xml:1061(para)
5196
"And we add the <command>--firstboot boot.sh</command> option to our command "
5200
#: serverguide/C/virtualization.xml:1067(title)
5204
#: serverguide/C/virtualization.xml:1069(para)
5206
"Mysql and Limesurvey needing some user interaction during their setup, we'll "
5207
"set them up the first time a user logs in using a script named login.sh. "
5208
"We'll also use this script to let the user specify:"
5211
#: serverguide/C/virtualization.xml:1075(para)
5212
msgid "His own password"
5215
#: serverguide/C/virtualization.xml:1076(para)
5216
msgid "Define the keyboard and other locale info he wants to use"
5219
#: serverguide/C/virtualization.xml:1079(para)
5220
msgid "So we'll define <filename>login.sh</filename> as follows:"
5223
#: serverguide/C/virtualization.xml:1083(programlisting)
5227
"# This script is ran the first time a user logs in\n"
5229
"echo \"Your appliance is about to be finished to be set up.\"\n"
5230
"echo \"In order to do it, we'll need to ask you a few questions,\"\n"
5231
"echo \"starting by changing your user password.\"\n"
5235
"#give the opportunity to change the keyboard\n"
5236
"sudo dpkg-reconfigure console-setup\n"
5238
"#configure the mysql server root password\n"
5239
"sudo dpkg-reconfigure mysql-server-5.0\n"
5241
"#install limesurvey\n"
5242
"sudo apt-get install -qqy --force-yes limesurvey\n"
5244
"echo \"Your appliance is now configured. To use it point your\"\n"
5245
"echo \"browser to http://serverip/limesurvey/admin\"\n"
5248
#: serverguide/C/virtualization.xml:1105(para)
5250
"And we add the <command>--firstlogin login.sh</command> option to our "
5254
#: serverguide/C/virtualization.xml:1112(title)
5255
msgid "Useful Additions"
5258
#: serverguide/C/virtualization.xml:1115(title)
5259
msgid "Configuring Automatic Updates"
5262
#: serverguide/C/virtualization.xml:1117(para)
5264
"To have your system be configured to update itself on a regular basis, we "
5265
"will just install <application>unattended-upgrades</application>, so we add "
5266
"the following option to our command line:"
5269
#: serverguide/C/virtualization.xml:1123(command)
5270
msgid "--addpkg unattended-upgrades"
5273
#: serverguide/C/virtualization.xml:1126(para)
5275
"As we have put our application package in a PPA, the process will update not "
5276
"only the system, but also the application each time we update the version in "
5280
#: serverguide/C/virtualization.xml:1133(title)
5281
msgid "ACPI Event Handling"
5284
#: serverguide/C/virtualization.xml:1135(para)
5286
"For your virtual machine to be able to handle restart and shutdown events it "
5287
"is being sent, it is a good idea to install the acpid package as well. To do "
5288
"this we just add the following option:"
5291
#: serverguide/C/virtualization.xml:1141(command)
5292
msgid "--addpkg acpid"
5295
#: serverguide/C/virtualization.xml:1147(title)
5296
msgid "Final Command"
5299
#: serverguide/C/virtualization.xml:1149(para)
5300
msgid "Here is the command with all the options discussed above:"
5303
#: serverguide/C/virtualization.xml:1154(command)
5305
"sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o \\ -"
5306
"-libvirt qemu:///system --ip 192.168.0.100 --part vmbuilder.partition --user "
5307
"user \\ --name user --pass default --addpkg apache2 --addpkg apache2-mpm-"
5308
"prefork \\ --addpkg apache2-utils --addpkg apache2.2-common --addpkg "
5309
"dbconfig-common \\ --addpkg libapache2-mod-php5 --addpkg mysql-client --"
5310
"addpkg php5-cli \\ --addpkg php5-gd --addpkg php5-ldap --addpkg php5-mysql --"
5311
"addpkg wwwconfig-common \\ --addpkg mysql-server --addpkg unattended-"
5312
"upgrades --addpkg acpid --ppa nijaba \\ --mirror "
5313
"http://mirroraddress:9999/ubuntu --tmpfs - --firstboot boot.sh \\ --"
5314
"firstlogin login.sh es"
5317
#: serverguide/C/virtualization.xml:1169(para)
5319
"If you are interested in learning more, have questions or suggestions, "
5320
"please contact the Ubuntu Server Team at:"
5323
#: serverguide/C/virtualization.xml:1174(para)
5324
msgid "IRC: #ubuntu-server on freenode"
5327
#: serverguide/C/virtualization.xml:1179(para)
5329
"Mailing list: <ulink url=\"https://lists.ubuntu.com/mailman/listinfo/ubuntu-"
5330
"server\">ubuntu-server at lists.ubuntu.com</ulink>"
5333
#: serverguide/C/virtualization.xml:1184(para)
5335
"Also, see the <ulink "
5336
"url=\"https://help.ubuntu.com/community/JeOSVMBuilder\">JeOSVMBuilder Ubuntu "
5337
"Wiki</ulink> page."
5340
#: serverguide/C/virtualization.xml:1192(title)
5344
#: serverguide/C/virtualization.xml:1195(title) serverguide/C/network-auth.xml:2026(title) serverguide/C/monitoring.xml:15(title) serverguide/C/lamp-applications.xml:17(title) serverguide/C/installation.xml:928(title) serverguide/C/dns.xml:64(title) serverguide/C/chat.xml:17(title) serverguide/C/backups.xml:541(title)
5348
#: serverguide/C/virtualization.xml:1197(para)
5350
"This tutorial covers <application>UEC</application> installation from the "
5351
"Ubuntu 10.04 LTS Server Edition CD, and assumes a basic network topology, "
5352
"with a single system serving as the <emphasis>\"all-in-one "
5353
"controller\"</emphasis>, and one or more nodes attached."
5356
#: serverguide/C/virtualization.xml:1202(para)
5358
"From this Tutorial you will learn how to install, configure, register and "
5359
"perform several operations on a basic <application>UEC</application> setup "
5360
"that results in a cloud with a one controller <emphasis>\"front-"
5361
"end\"</emphasis> and one or several node(s) for running Virtual Machine (VM) "
5362
"instances. You will also use examples to help get you started using your own "
5363
"private compute cloud."
5366
#: serverguide/C/virtualization.xml:1210(title)
5367
msgid "Prerequisites"
5370
#: serverguide/C/virtualization.xml:1212(para)
5372
"To deploy a minimal cloud infrastructure, you’ll need at least "
5373
"<emphasis>two</emphasis> dedicated systems:"
5376
#: serverguide/C/virtualization.xml:1218(para)
5377
msgid "A front end."
5380
#: serverguide/C/virtualization.xml:1223(para)
5381
msgid "One or more node(s)."
5384
#: serverguide/C/virtualization.xml:1229(para)
5386
"The following are recommendations, rather than fixed requirements. However, "
5387
"our experience in developing this documentation indicated the following "
5391
#: serverguide/C/virtualization.xml:1234(title)
5392
msgid "Front End Requirements"
5395
#: serverguide/C/virtualization.xml:1236(para)
5396
msgid "Use the following table for a system that will run one or more of:"
5399
#: serverguide/C/virtualization.xml:1241(para)
5400
msgid "Cloud Controller (CLC)"
5403
#: serverguide/C/virtualization.xml:1242(para)
5404
msgid "Cluster Controller (CC)"
5407
#: serverguide/C/virtualization.xml:1243(para)
5408
msgid "Walrus (the S3-like storage service)"
5411
#: serverguide/C/virtualization.xml:1244(para)
5412
msgid "Storage Controller (SC)"
5415
#: serverguide/C/virtualization.xml:1248(title)
5416
msgid "UEC Front End Requirements"
5419
#: serverguide/C/virtualization.xml:1256(para) serverguide/C/virtualization.xml:1318(para)
5423
#: serverguide/C/virtualization.xml:1257(para) serverguide/C/virtualization.xml:1319(para)
5427
#: serverguide/C/virtualization.xml:1258(para) serverguide/C/virtualization.xml:1320(para)
5431
#: serverguide/C/virtualization.xml:1259(para) serverguide/C/virtualization.xml:1321(para)
5435
#: serverguide/C/virtualization.xml:1264(para) serverguide/C/virtualization.xml:1326(para)
5439
#: serverguide/C/virtualization.xml:1265(para)
5443
#: serverguide/C/virtualization.xml:1266(para)
5447
#: serverguide/C/virtualization.xml:1267(para)
5449
"For an <emphasis>all-in-one</emphasis> front end, it helps to have at least "
5450
"a dual core processor."
5453
#: serverguide/C/virtualization.xml:1270(para) serverguide/C/virtualization.xml:1332(para)
5457
#: serverguide/C/virtualization.xml:1271(para)
5461
#: serverguide/C/virtualization.xml:1272(para)
5465
#: serverguide/C/virtualization.xml:1273(para)
5466
msgid "The Java web front end benefits from lots of available memory."
5469
#: serverguide/C/virtualization.xml:1276(para) serverguide/C/virtualization.xml:1338(para)
5473
#: serverguide/C/virtualization.xml:1277(para) serverguide/C/virtualization.xml:1339(para)
5474
msgid "5400 RPM IDE"
5477
#: serverguide/C/virtualization.xml:1278(para)
5478
msgid "7200 RPM SATA"
5481
#: serverguide/C/virtualization.xml:1279(para)
5483
"Slower disks will work, but will yield much longer instance startup times."
5486
#: serverguide/C/virtualization.xml:1282(para) serverguide/C/virtualization.xml:1344(para)
5490
#: serverguide/C/virtualization.xml:1283(para) serverguide/C/virtualization.xml:1345(para)
5494
#: serverguide/C/virtualization.xml:1284(para)
5498
#: serverguide/C/virtualization.xml:1285(para)
5500
"40GB is only enough space for only a single image, cache, etc., Eucalyptus "
5501
"does not like to run out of disk space."
5504
#: serverguide/C/virtualization.xml:1288(para) serverguide/C/virtualization.xml:1350(para) serverguide/C/network-config.xml:13(title)
5508
#: serverguide/C/virtualization.xml:1289(para) serverguide/C/virtualization.xml:1351(para)
5512
#: serverguide/C/virtualization.xml:1290(para) serverguide/C/virtualization.xml:1352(para)
5516
#: serverguide/C/virtualization.xml:1291(para) serverguide/C/virtualization.xml:1353(para)
5518
"Machine images are hundreds of MB, and need to be copied over the network to "
5522
#: serverguide/C/virtualization.xml:1299(title)
5523
msgid "Node Requirements"
5526
#: serverguide/C/virtualization.xml:1301(para)
5527
msgid "The other system(s) are <emphasis>nodes</emphasis>, which will run::"
5530
#: serverguide/C/virtualization.xml:1306(para)
5531
msgid "the Node Controller (NC)"
5534
#: serverguide/C/virtualization.xml:1310(title)
5535
msgid "UEC Node Requirements"
5538
#: serverguide/C/virtualization.xml:1327(para)
5539
msgid "VT Extensions"
5542
#: serverguide/C/virtualization.xml:1328(para)
5543
msgid "VT, 64-bit, Multicore"
5546
#: serverguide/C/virtualization.xml:1329(para)
5548
"64-bit can run both i386, and amd64 instances; by default, Eucalyptus will "
5549
"only run 1 VM per CPU core on a Node."
5552
#: serverguide/C/virtualization.xml:1333(para)
5556
#: serverguide/C/virtualization.xml:1334(para)
5560
#: serverguide/C/virtualization.xml:1335(para)
5561
msgid "Additional memory means more, and larger guests."
5564
#: serverguide/C/virtualization.xml:1340(para)
5565
msgid "7200 RPM SATA or SCSI"
5568
#: serverguide/C/virtualization.xml:1341(para)
5570
"Eucalyptus nodes are disk-intensive; I/O wait will likely be the performance "
5574
#: serverguide/C/virtualization.xml:1346(para)
5578
#: serverguide/C/virtualization.xml:1347(para)
5580
"Images will be cached locally, Eucalyptus does not like to run out of disk "
5584
#: serverguide/C/virtualization.xml:1363(title)
5585
msgid "Installing the Cloud/Cluster/Storage/Walrus Front End Server"
5588
#: serverguide/C/virtualization.xml:1367(para)
5589
msgid "Download the Ubuntu 10.04 LTS Server ISO file, and burn it to a CD."
5592
#: serverguide/C/virtualization.xml:1372(para) serverguide/C/virtualization.xml:1418(para)
5594
"When you boot, select <emphasis>“Install Ubuntu Enterprise Cloud”</emphasis>."
5597
#: serverguide/C/virtualization.xml:1377(para)
5599
"When asked whether you want a <emphasis>“Cluster”</emphasis> or a "
5600
"<emphasis>“Node”</emphasis> install, select <emphasis>“Cluster”</emphasis>."
5603
#: serverguide/C/virtualization.xml:1383(para)
5605
"It will ask two other cloud-specific questions during the course of the "
5609
#: serverguide/C/virtualization.xml:1388(para)
5610
msgid "Name of your cluster."
5613
#: serverguide/C/virtualization.xml:1391(para)
5614
msgid "e.g. <emphasis>cluster1</emphasis>."
5617
#: serverguide/C/virtualization.xml:1394(para)
5619
"A range of public IP addresses on the LAN that the cloud can allocate to "
5623
#: serverguide/C/virtualization.xml:1397(para)
5624
msgid "e.g. <emphasis>192.168.1.200-192.168.1.249</emphasis>."
5627
#: serverguide/C/virtualization.xml:1405(title)
5628
msgid "Installing the Node Controller(s)"
5631
#: serverguide/C/virtualization.xml:1407(para)
5633
"The node controller install is even simpler. Just make sure that you are "
5634
"connected to the network on which the cloud/cluster controller is already "
5638
#: serverguide/C/virtualization.xml:1413(para)
5639
msgid "Boot from the same ISO on the node(s)."
5642
#: serverguide/C/virtualization.xml:1423(para)
5643
msgid "Select <emphasis>“Install Ubuntu Enterprise Cloud”</emphasis>."
5646
#: serverguide/C/virtualization.xml:1428(para)
5648
"It should detect the Cluster and preselect <emphasis>“Node”</emphasis> "
5652
#: serverguide/C/virtualization.xml:1433(para)
5653
msgid "Confirm the partitioning scheme."
5656
#: serverguide/C/virtualization.xml:1438(para)
5658
"The rest of the installation should proceed uninterrupted; complete the "
5659
"installation and reboot the node."
5662
#: serverguide/C/virtualization.xml:1446(title)
5663
msgid "Register the Node(s)"
5666
#: serverguide/C/virtualization.xml:1448(para)
5668
"Nodes are the physical systems within <application>UEC</application> that "
5669
"actually run the virtual machine instances of the cloud."
5672
#: serverguide/C/virtualization.xml:1452(para)
5674
"Once one or more Ubuntu Server node(s) are installed and running the "
5675
"<application>eucalyptus-nc</application> service, log onto the "
5676
"<emphasis>Cloud Controller (CLC)</emphasis> and run:"
5679
#: serverguide/C/virtualization.xml:1458(command)
5680
msgid "sudo euca_conf --no-rsync --discover-nodes"
5683
#: serverguide/C/virtualization.xml:1461(para)
5685
"This will discover the systems on the network running the "
5686
"<application>eucalyptus-nc</application> service, and the administrator can "
5687
"confirm the registration of each node by its IP address."
5690
#: serverguide/C/virtualization.xml:1467(para)
5692
"If you get prompted for passwords, or receive errors from scp, you may need "
5693
"to revisit the key synchronization instructions at <ulink "
5694
"url=\"https://help.ubuntu.com/community/UEC/NodeInstallation\">UEC/NodeInstal"
5698
#: serverguide/C/virtualization.xml:1475(title)
5699
msgid "Obtain Credentials"
5702
#: serverguide/C/virtualization.xml:1477(para)
5704
"After installing and booting the <emphasis>Cloud Controller</emphasis>, "
5705
"users of the cloud will need to retrieve their credentials. This can be done "
5706
"either through a web browser, or at the command line."
5709
#: serverguide/C/virtualization.xml:1483(title)
5710
msgid "From a Web Browser"
5713
#: serverguide/C/virtualization.xml:1487(para)
5715
"From your web browser (either remotely or on your Ubuntu server) access the "
5719
#: serverguide/C/virtualization.xml:1490(programlisting) serverguide/C/virtualization.xml:1743(programlisting)
5723
"https://<cloud-controller-ip-address>:8443/\n"
5726
#: serverguide/C/virtualization.xml:1495(para)
5728
"You must use a secure connection, so make sure you use \"https\" not "
5729
"\"http\" in your URL. You will get a security certificate warning. You will "
5730
"have to add an exception to view the page. If you do not accept it you will "
5731
"not be able to view the Eucalyptus configuration page."
5734
#: serverguide/C/virtualization.xml:1503(para)
5736
"Use username <emphasis>'admin'</emphasis> and password "
5737
"<emphasis>'admin'</emphasis> for the first time login (you will be prompted "
5738
"to change your password)."
5741
#: serverguide/C/virtualization.xml:1509(para)
5743
"Then follow the on-screen instructions to update the admin password and "
5747
#: serverguide/C/virtualization.xml:1514(para)
5749
"Once the first time configuration process is completed, click the "
5750
"<emphasis>'credentials'</emphasis> tab located in the top-left portion of "
5754
#: serverguide/C/virtualization.xml:1520(para)
5756
"Click the <emphasis>'Download Credentials'</emphasis> button to get your "
5760
#: serverguide/C/virtualization.xml:1525(para)
5761
msgid "Save them to <filename>~/.euca</filename>."
5764
#: serverguide/C/virtualization.xml:1530(para)
5766
"Unzip the downloaded zip file into a safe location "
5767
"(<filename>~/.euca</filename>)."
5770
#: serverguide/C/virtualization.xml:1534(command)
5771
msgid "unzip -d ~/.euca mycreds.zip"
5774
#: serverguide/C/virtualization.xml:1541(title)
5775
msgid "From a Command Line"
5778
#: serverguide/C/virtualization.xml:1545(para)
5780
"Alternatively, if you are on the command line of the <emphasis>Cloud "
5781
"Controller</emphasis>, you can run:"
5784
#: serverguide/C/virtualization.xml:1549(command)
5785
msgid "mkdir -p ~/.euca"
5788
#: serverguide/C/virtualization.xml:1550(command)
5789
msgid "chmod 700 ~/.euca"
5792
#: serverguide/C/virtualization.xml:1551(command)
5796
#: serverguide/C/virtualization.xml:1552(command)
5797
msgid "sudo euca_conf --get-credentials mycreds.zip"
5800
#: serverguide/C/virtualization.xml:1553(command)
5801
msgid "unzip mycreds.zip"
5804
#: serverguide/C/virtualization.xml:1554(command)
5808
#: serverguide/C/virtualization.xml:1561(title)
5809
msgid "Extracting and Using Your Credentials"
5812
#: serverguide/C/virtualization.xml:1563(para)
5814
"Now you will need to setup EC2 API and AMI tools on your server using X.509 "
5818
#: serverguide/C/virtualization.xml:1569(para)
5820
"Source the included <emphasis>\"eucarc\"</emphasis> file to set up your "
5821
"Eucalyptus environment:"
5824
#: serverguide/C/virtualization.xml:1573(command) serverguide/C/virtualization.xml:1600(command)
5825
msgid ". ~/.euca/eucarc"
5828
#: serverguide/C/virtualization.xml:1577(para)
5830
"You may additionally wish to add this command to your "
5831
"<filename>~/.bashrc</filename> file so that your Eucalyptus environment is "
5832
"set up automatically when you log in. Eucalyptus treats this set of "
5833
"credentials as <emphasis>'administrator'</emphasis> credentials that allow "
5834
"the holder global privileges across the cloud. As such, they should be "
5835
"protected in the same way that other elevated-priority access is protected "
5836
"(e.g. should not be made visible to the general user population)."
5839
#: serverguide/C/virtualization.xml:1584(command)
5841
"echo \"[ -r ~/.euca/eucarc ] && . ~/.euca/eucarc\" >> ~/.bashrc"
5844
#: serverguide/C/virtualization.xml:1588(para)
5845
msgid "Install the required cloud user tools:"
5848
#: serverguide/C/virtualization.xml:1592(command)
5849
msgid "sudo apt-get install euca2ools"
5852
#: serverguide/C/virtualization.xml:1596(para)
5854
"To validate that everything is working correctly, get the local cluster "
5855
"availability details:"
5858
#: serverguide/C/virtualization.xml:1601(command)
5859
msgid "euca-describe-availability-zones verbose"
5862
#: serverguide/C/virtualization.xml:1602(computeroutput)
5865
"AVAILABILITYZONE myowncloud 192.168.1.1\n"
5866
"AVAILABILITYZONE |- vm types free / max cpu ram disk\n"
5867
"AVAILABILITYZONE |- m1.small 0004 / 0004 1 128 2\n"
5868
"AVAILABILITYZONE |- c1.medium 0004 / 0004 1 256 5\n"
5869
"AVAILABILITYZONE |- m1.large 0002 / 0002 2 512 10\n"
5870
"AVAILABILITYZONE |- m1.xlarge 0002 / 0002 2 1024 20\n"
5871
"AVAILABILITYZONE |- c1.xlarge 0001 / 0001 4 2048 20"
5874
#: serverguide/C/virtualization.xml:1612(para)
5875
msgid "Your output from the above command will vary."
5878
#: serverguide/C/virtualization.xml:1622(title)
5879
msgid "Running an Image"
5882
#: serverguide/C/virtualization.xml:1624(para)
5883
msgid "There are multiple ways to instantiate an image in UEC:"
5886
#: serverguide/C/virtualization.xml:1629(para)
5887
msgid "Use the command line."
5890
#: serverguide/C/virtualization.xml:1630(para)
5892
"Use one of the UEC compatible management tools such as "
5893
"<emphasis>Landscape</emphasis>."
5896
#: serverguide/C/virtualization.xml:1632(para)
5899
"url=\"https://help.ubuntu.com/community/UEC/ElasticFox\">ElasticFox</ulink> "
5900
"extension to Firefox."
5903
#: serverguide/C/virtualization.xml:1638(para)
5904
msgid "Here we will describe the process from the command line:"
5907
#: serverguide/C/virtualization.xml:1644(para)
5909
"Before running an instance of your image, you should first create a "
5910
"<emphasis>keypair</emphasis> (ssh key) that you can use to log into your "
5911
"instance as root, once it boots. The key is stored, so you will only have to "
5915
#: serverguide/C/virtualization.xml:1648(para)
5916
msgid "Run the following command:"
5919
#: serverguide/C/virtualization.xml:1651(programlisting)
5923
"if [ ! -e ~/.euca/mykey.priv ]; then\n"
5924
" touch ~/.euca/mykey.priv\n"
5925
" chmod 0600 ~/.euca/mykey.priv\n"
5926
" euca-add-keypair mykey > ~/.euca/mykey.priv\n"
5930
#: serverguide/C/virtualization.xml:1659(para)
5932
"You can call your key whatever you like (in this example, the key is called "
5933
"<emphasis>'mykey'</emphasis>), but remember what it is called. If you "
5934
"forget, you can always run <command>euca-describe-keypairs</command> to get "
5935
"a list of created keys stored in the system."
5938
#: serverguide/C/virtualization.xml:1666(para)
5939
msgid "You must also allow access to port 22 in your instances:"
5942
#: serverguide/C/virtualization.xml:1670(command)
5943
msgid "euca-describe-groups"
5946
#: serverguide/C/virtualization.xml:1671(command)
5947
msgid "euca-authorize default -P tcp -p 22 -s 0.0.0.0/0"
5950
#: serverguide/C/virtualization.xml:1675(para)
5951
msgid "Next, you can create instances of your registered image:"
5954
#: serverguide/C/virtualization.xml:1679(command)
5955
msgid "euca-run-instances $EMI -k mykey -t c1.medium"
5958
#: serverguide/C/virtualization.xml:1682(para)
5960
"If you receive an error regarding <emphasis>image_id</emphasis>, you may "
5961
"find it by viewing Images page or click <emphasis>\"How to Run\"</emphasis> "
5962
"on the <emphasis>Store</emphasis> page to see the sample command."
5965
#: serverguide/C/virtualization.xml:1689(para)
5967
"The first time you run an instance, the system will be setting up caches for "
5968
"the image from which it will be created. This can often take some time the "
5969
"first time an instance is run given that VM images are usually quite large."
5972
#: serverguide/C/virtualization.xml:1693(para)
5973
msgid "To monitor the state of your instance, run:"
5976
#: serverguide/C/virtualization.xml:1697(command)
5977
msgid "watch -n5 euca-describe-instances"
5980
#: serverguide/C/virtualization.xml:1699(para)
5982
"In the output, you should see information about the instance, including its "
5983
"state. While first-time caching is being performed, the instance's state "
5984
"will be <emphasis>'pending'</emphasis>."
5987
#: serverguide/C/virtualization.xml:1705(para)
5989
"When the instance is fully started, the above state will become "
5990
"<emphasis>'running'</emphasis>. Look at the IP address assigned to your "
5991
"instance in the output, then connect to it:"
5994
#: serverguide/C/virtualization.xml:1710(command)
5996
"IPADDR=$(euca-describe-instances | grep $EMI | grep running | tail -n1 | awk "
6000
#: serverguide/C/virtualization.xml:1711(command)
6001
msgid "ssh -i ~/.euca/mykey.priv ubuntu@$IPADDR"
6004
#: serverguide/C/virtualization.xml:1715(para)
6006
"And when you are done with this instance, exit your SSH connection, then "
6007
"terminate your instance:"
6010
#: serverguide/C/virtualization.xml:1719(command)
6012
"INSTANCEID=$(euca-describe-instances | grep $EMI | grep running | tail -n1 | "
6016
#: serverguide/C/virtualization.xml:1720(command)
6017
msgid "euca-terminate-instances $INSTANCEID"
6020
#: serverguide/C/virtualization.xml:1727(title)
6021
msgid "Install an Image from the Store"
6024
#: serverguide/C/virtualization.xml:1729(para)
6026
"The following is by far the simplest way to install an image. However, "
6027
"advanced users may be interested in learning how to <ulink "
6028
"url=\"https://help.ubuntu.com/community/UEC/BundlingImages\">Bundle their "
6029
"own image</ulink>."
6032
#: serverguide/C/virtualization.xml:1734(para)
6034
"The simplest way to add an image to <application>UEC</application> is to "
6035
"install it from the Image Store on the UEC web interface."
6038
#: serverguide/C/virtualization.xml:1740(para)
6040
"Access the web interface at the following URL (Make sure you specify https):"
6043
#: serverguide/C/virtualization.xml:1748(para)
6045
"Enter your login and password (if requested, as you may still be logged in "
6049
#: serverguide/C/virtualization.xml:1753(para)
6050
msgid "Click on the <emphasis>Store</emphasis> tab."
6053
#: serverguide/C/virtualization.xml:1758(para)
6054
msgid "Browse available images."
6057
#: serverguide/C/virtualization.xml:1763(para)
6058
msgid "Click on <emphasis>install</emphasis> for the image you want."
6061
#: serverguide/C/virtualization.xml:1769(para)
6063
"Once the image has been downloaded and installed, you can click on "
6064
"<emphasis>\"How to run?\"</emphasis> that will be displayed below the image "
6065
"button to view the command to execute to instantiate (start) this image. The "
6066
"image will also appear on the list given on the <emphasis>Image</emphasis> "
6070
#: serverguide/C/virtualization.xml:1777(title) serverguide/C/dns.xml:619(title)
6071
msgid "More Information"
6074
#: serverguide/C/virtualization.xml:1779(para)
6076
"How to use the <ulink "
6077
"url=\"https://help.ubuntu.com/community/UEC/StorageController\">Storage "
6078
"Controller</ulink>"
6081
#: serverguide/C/virtualization.xml:1783(para)
6082
msgid "Controlling eucalyptus services:"
6085
#: serverguide/C/virtualization.xml:1788(para)
6087
"sudo service eucalyptus [start|stop|restart] (on the CLC/CC/SC/Walrus side)"
6090
#: serverguide/C/virtualization.xml:1789(para)
6091
msgid "sudo service eucalyptus-nc [start|stop|restart] (on the Node side)"
6094
#: serverguide/C/virtualization.xml:1792(para)
6095
msgid "Locations of some important files:"
6098
#: serverguide/C/virtualization.xml:1799(emphasis)
6102
#: serverguide/C/virtualization.xml:1802(para)
6103
msgid "/var/log/eucalyptus"
6106
#: serverguide/C/virtualization.xml:1807(emphasis)
6107
msgid "Configuration files:"
6110
#: serverguide/C/virtualization.xml:1810(para)
6111
msgid "/etc/eucalyptus"
6114
#: serverguide/C/virtualization.xml:1815(emphasis)
6118
#: serverguide/C/virtualization.xml:1818(para)
6119
msgid "/var/lib/eucalyptus/db"
6122
#: serverguide/C/virtualization.xml:1823(emphasis)
6126
#: serverguide/C/virtualization.xml:1826(para)
6127
msgid "/var/lib/eucalyptus"
6130
#: serverguide/C/virtualization.xml:1827(para)
6131
msgid "/var/lib/eucalyptus/.ssh"
6134
#: serverguide/C/virtualization.xml:1833(para)
6136
"Don't forget to source your <filename>~/.euca/eucarc</filename> before "
6137
"running the client tools."
6140
#: serverguide/C/virtualization.xml:1844(para)
6142
"For information on loading instances see the <ulink "
6143
"url=\"https://help.ubuntu.com/community/Eucalyptus\">Eucalyptus Wiki</ulink> "
6147
#: serverguide/C/virtualization.xml:1849(para)
6149
"<ulink url=\"http://open.eucalyptus.com/\">Eucalyptus Project Site (forums, "
6150
"documentation, downloads)</ulink>."
6153
#: serverguide/C/virtualization.xml:1854(para)
6155
"<ulink url=\"https://launchpad.net/eucalyptus/\">Eucalyptus on Launchpad "
6156
"(bugs, code)</ulink>."
6159
#: serverguide/C/virtualization.xml:1859(para)
6162
"url=\"http://open.eucalyptus.com/wiki/EucalyptusTroubleshooting_v1.5\">Eucaly"
6163
"ptus Troubleshooting (1.5)</ulink>."
6166
#: serverguide/C/virtualization.xml:1864(para)
6168
"<ulink url=\"http://support.rightscale.com/2._References/02-"
6169
"Cloud_Infrastructures/Eucalyptus/03-"
6170
"Administration_Guide/Register_with_RightScale\"> Register your cloud with "
6171
"RightScale</ulink>."
6174
#: serverguide/C/virtualization.xml:1870(para)
6176
"You can also find help in the <emphasis>#ubuntu-virt</emphasis>, "
6177
"<emphasis>#eucalyptus</emphasis>, and <emphasis>#ubuntu-server</emphasis> "
6178
"IRC channels on <ulink url=\"http://freenode.net\">Freenode</ulink>."
6181
#: serverguide/C/virtualization.xml:1879(title)
6185
#: serverguide/C/virtualization.xml:1881(para)
6187
"The Ubuntu Enterprise Cloud documentation uses terminology that might be "
6188
"unfamiliar to some readers. This page is intended to provide a glossary of "
6189
"such terms and acronyms."
6192
#: serverguide/C/virtualization.xml:1888(para)
6194
"<emphasis>Cloud</emphasis> - A federated set of physical machines that offer "
6195
"computing resources through virtual machines, provisioned and recollected "
6199
#: serverguide/C/virtualization.xml:1894(para)
6201
"<emphasis>Cloud Controller (CLC)</emphasis> - Eucalyptus component that "
6202
"provides the web UI (an https server on port 8443), and implements the "
6203
"Amazon EC2 API. There should be only one Cloud Controller in an installation "
6204
"of UEC. This service is provided by the Ubuntu <application>eucalyptus-"
6205
"cloud</application> package."
6208
#: serverguide/C/virtualization.xml:1901(para)
6210
"<emphasis>Cluster</emphasis> - A collection of nodes, associated with a "
6211
"Cluster Controller. There can be more than one Cluster in an installation of "
6212
"UEC. Clusters are sometimes physically separate sets of nodes. (e.g. floor1, "
6216
#: serverguide/C/virtualization.xml:1907(para)
6218
"<emphasis>Cluster Controller (CC)</emphasis> - Eucalyptus component that "
6219
"manages collections of node resources. This service is provided by the "
6220
"Ubuntu <application>eucalyptus-cc</application> package."
6223
#: serverguide/C/virtualization.xml:1913(para)
6224
msgid "<emphasis>EBS</emphasis> - Elastic Block Storage."
6227
#: serverguide/C/virtualization.xml:1918(para)
6229
"<emphasis>EC2</emphasis> - Elastic Compute Cloud. Amazon's pay-by-the-hour, "
6230
"pay-by-the-gigabyte public cloud computing offering."
6233
#: serverguide/C/virtualization.xml:1923(para)
6234
msgid "<emphasis>EKI</emphasis> - Eucalyptus Kernel Image."
6237
#: serverguide/C/virtualization.xml:1928(para)
6238
msgid "<emphasis>EMI</emphasis> - Eucalyptus Machine Image."
6241
#: serverguide/C/virtualization.xml:1933(para)
6242
msgid "<emphasis>ERI</emphasis> - Eucalyptus Ramdisk Image."
6245
#: serverguide/C/virtualization.xml:1938(para)
6247
"<emphasis>Eucalyptus</emphasis> - Elastic Utility Computing Architecture for "
6248
"Linking Your Programs To Useful Systems. An open source project originally "
6249
"from the University of California at Santa Barbara, now supported by "
6250
"Eucalyptus Systems, a Canonical Partner."
6253
#: serverguide/C/virtualization.xml:1945(para)
6255
"<emphasis>Front-end</emphasis> - Physical machine hosting one (or more) of "
6256
"the high level Eucalyptus components (cloud, walrus, storage controller, "
6257
"cluster controller)."
6260
#: serverguide/C/virtualization.xml:1951(para)
6262
"<emphasis>Node</emphasis> - A node is a physical machine that's capable of "
6263
"running virtual machines, running a node controller. Within Ubuntu, this "
6264
"generally means that the CPU has VT extensions, and can run the KVM "
6268
#: serverguide/C/virtualization.xml:1957(para)
6270
"<emphasis>Node Controller (NC)</emphasis> - Eucalyptus component that runs "
6271
"on nodes which host the virtual machines that comprise the cloud. This "
6272
"service is provided by the Ubuntu package <application>eucalyptus-"
6276
#: serverguide/C/virtualization.xml:1963(para)
6278
"<emphasis>S3</emphasis> - Simple Storage Service. Amazon's pay-by-the-"
6279
"gigabyte persistent storage solution for EC2."
6282
#: serverguide/C/virtualization.xml:1968(para)
6284
"<emphasis>Storage Controller (SC)</emphasis> - Eucalyptus component that "
6285
"manages dynamic block storage services (EBS). Each 'cluster' in a Eucalyptus "
6286
"installation can have its own Storage Controller. This component is provided "
6287
"by the <application>eucalyptus-sc</application> package."
6290
#: serverguide/C/virtualization.xml:1975(para)
6292
"<emphasis>UEC</emphasis> - Ubuntu Enterprise Cloud. Ubuntu's cloud computing "
6293
"solution, based on Eucalyptus."
6296
#: serverguide/C/virtualization.xml:1980(para)
6297
msgid "<emphasis>VM</emphasis> - Virtual Machine."
6300
#: serverguide/C/virtualization.xml:1985(para)
6302
"<emphasis>VT</emphasis> - Virtualization Technology. An optional feature of "
6303
"some modern CPUs, allowing for accelerated virtual machine hosting."
6306
#: serverguide/C/virtualization.xml:1990(para)
6308
"<emphasis>Walrus</emphasis> - Eucalyptus component that implements the "
6309
"Amazon S3 API, used for storing VM images and user storage using S3 bucket "
6310
"put/get abstractions."
6313
#: serverguide/C/virtualization.xml:2000(title)
6317
#: serverguide/C/virtualization.xml:2002(para)
6319
"<application>OpenNebula</application> allows virtual machines to be placed "
6320
"and re-placed dynamically on a pool of physical resources. This allows a "
6321
"virtual machine to be hosted from any location available."
6324
#: serverguide/C/virtualization.xml:2007(para)
6326
"This section will detail configuring an OpenNebula cluster using three "
6327
"machines: one <emphasis>Front-End</emphasis> host, and two <emphasis>Compute "
6328
"Nodes</emphasis> used to run the virtual machines. The Compute Nodes will "
6329
"also need a bridge configured to allow the virtual machines access to the "
6330
"local network. For details see <xref linkend=\"bridging\"/>."
6333
#: serverguide/C/virtualization.xml:2016(para)
6334
msgid "First, from a terminal on the Front-End enter:"
6337
#: serverguide/C/virtualization.xml:2021(command)
6338
msgid "sudo apt-get install opennebula"
6341
#: serverguide/C/virtualization.xml:2024(para)
6342
msgid "On each Compute Node install:"
6345
#: serverguide/C/virtualization.xml:2029(command)
6346
msgid "sudo apt-get install opennebula-node"
6349
#: serverguide/C/virtualization.xml:2032(para)
6351
"In order to copy SSH keys, the <emphasis>oneadmin</emphasis> user will need "
6352
"to have a password. On each machine execute:"
6355
#: serverguide/C/virtualization.xml:2037(command)
6356
msgid "sudo passwd oneadmin"
6359
#: serverguide/C/virtualization.xml:2040(para)
6361
"Next, copy the <emphasis>oneadmin</emphasis> user's SSH key to the Compute "
6362
"Nodes, and to the Front-End's <filename>authorized_keys</filename> file:"
6365
#: serverguide/C/virtualization.xml:2045(command)
6367
"sudo scp /var/lib/one/.ssh/id_rsa.pub "
6368
"oneadmin@node01:/var/lib/one/.ssh/authorized_keys"
6371
#: serverguide/C/virtualization.xml:2046(command)
6373
"sudo scp /var/lib/one/.ssh/id_rsa.pub "
6374
"oneadmin@node02:/var/lib/one/.ssh/authorized_keys"
6377
#: serverguide/C/virtualization.xml:2047(command)
6379
"sudo sh -c \"cat /var/lib/one/.ssh/id_rsa.pub >> "
6380
"/var/lib/one/.ssh/authorized_keys\""
6383
#: serverguide/C/virtualization.xml:2050(para)
6385
"The SSH key for the Compute Nodes needs to be added to the "
6386
"<filename>/etc/ssh/ssh_known_hosts</filename> file on the Front-End host. To "
6387
"accomplish this <application>ssh</application> to each Compute Node as a "
6388
"user other than <emphasis>oneadmin</emphasis>. Then exit from the SSH "
6389
"session, and execute the following to copy the SSH key from "
6390
"<filename>~/.ssh/known_hosts</filename> to "
6391
"<filename>/etc/ssh/ssh_known_hosts</filename>:"
6394
#: serverguide/C/virtualization.xml:2057(command)
6396
"sudo sh -c \"ssh-keygen -f .ssh/known_hosts -F node01 1>> "
6397
"/etc/ssh/ssh_known_hosts\""
6400
#: serverguide/C/virtualization.xml:2058(command)
6402
"sudo sh -c \"ssh-keygen -f .ssh/known_hosts -F node02 1>> "
6403
"/etc/ssh/ssh_known_hosts\""
6406
#: serverguide/C/virtualization.xml:2062(para)
6408
"Replace <emphasis>node01</emphasis> and <emphasis>node02</emphasis> with the "
6409
"appropriate host names."
6412
#: serverguide/C/virtualization.xml:2067(para)
6414
"This allows the <emphasis>oneadmin</emphasis> to use "
6415
"<application>scp</application>, without a password or manual intervention, "
6416
"to deploy an image to the Compute Nodes."
6419
#: serverguide/C/virtualization.xml:2072(para)
6421
"On the Front-End create a directory to store the VM images, giving the "
6422
"<emphasis>oneadmin</emphasis> user access to the directory:"
6425
#: serverguide/C/virtualization.xml:2077(command)
6426
msgid "sudo mkdir /var/lib/one/images"
6429
#: serverguide/C/virtualization.xml:2078(command)
6430
msgid "sudo chown oneadmin /var/lib/one/images/"
6433
#: serverguide/C/virtualization.xml:2081(para)
6435
"Finally, copy a virtual machine disk file into "
6436
"<filename>/var/lib/one/images</filename>. You can create an Ubuntu virtual "
6437
"machine using <application>vmbuilder</application>, see <xref linkend=\"jeos-"
6438
"and-vmbuilder\"/> for details."
6441
#: serverguide/C/virtualization.xml:2090(para)
6443
"The <emphasis>OpenNebula Cluster</emphasis> is now ready to be configured, "
6444
"and virtual machines added to the cluster."
6447
#: serverguide/C/virtualization.xml:2094(para)
6448
msgid "From a terminal prompt enter:"
6451
#: serverguide/C/virtualization.xml:2099(command)
6452
msgid "onehost create node01 im_kvm vmm_kvm tm_ssh"
6455
#: serverguide/C/virtualization.xml:2100(command)
6456
msgid "onehost create node02 im_kvm vmm_kvm tm_ssh"
6459
#: serverguide/C/virtualization.xml:2103(para)
6461
"Next, create a <emphasis>Virtual Network</emphasis> template file named "
6462
"<filename>vnet01.template</filename>:"
6465
#: serverguide/C/virtualization.xml:2107(programlisting)
6472
"NETWORK_SIZE = C\n"
6473
"NETWORK_ADDRESS = 192.168.0.0\n"
6476
#: serverguide/C/virtualization.xml:2116(para)
6478
"Be sure to change <emphasis>192.168.0.0</emphasis> to your local network."
6481
#: serverguide/C/virtualization.xml:2121(para)
6483
"Using the <application>onevnet</application> utility, add the virtual "
6484
"network to OpenNebula:"
6487
#: serverguide/C/virtualization.xml:2126(command)
6488
msgid "onevnet create vnet01.template"
6491
#: serverguide/C/virtualization.xml:2129(para)
6493
"Now create a <emphasis>VM Template</emphasis> file named "
6494
"<filename>vm01.template</filename>:"
6497
#: serverguide/C/virtualization.xml:2133(programlisting)
6505
"OS = [ BOOT = hd ]\n"
6508
" source = \"/var/lib/one/images/vm01.qcow2\",\n"
6509
" target = \"hda\",\n"
6510
" readonly = \"no\" ]\n"
6512
"NIC = [ NETWORK=\"LAN\" ]\n"
6514
"GRAPHICS = [type=\"vnc\",listen=\"127.0.0.1\",port=\"-1\"]\n"
6517
#: serverguide/C/virtualization.xml:2150(para)
6518
msgid "Start the virtual machine using <application>onevm</application>:"
6521
#: serverguide/C/virtualization.xml:2155(command)
6522
msgid "onevm submit vm01.template"
6525
#: serverguide/C/virtualization.xml:2158(para)
6527
"Use the <application>onevm list</application> option to view information "
6528
"about virtual machines. Also, the <application>onevm show vm01</application> "
6529
"option will display more details about a specific virtual machine."
6532
#: serverguide/C/virtualization.xml:2169(para)
6535
"url=\"http://www.opennebula.org/doku.php?id=start\">OpenNebula website</ulink"
6536
"> for more information."
6539
#: serverguide/C/virtualization.xml:2174(para)
6541
"You can also find help in the <emphasis>#ubuntu-virt</emphasis> and "
6542
"<emphasis>#ubuntu-server</emphasis> IRC channels on <ulink "
6543
"url=\"http://freenode.net\">Freenode</ulink>."
6546
#: serverguide/C/virtualization.xml:2180(para)
6549
"url=\"https://help.ubuntu.com/community/OpenNebula\">OpenNebula Ubuntu "
6550
"Wiki</ulink> page has more details."
6553
#: serverguide/C/vcs.xml:13(title)
6554
msgid "Version Control System"
6557
#: serverguide/C/vcs.xml:14(para)
6559
"Version control is the art of managing changes to information. It has long "
6560
"been a critical tool for programmers, who typically spend their time making "
6561
"small changes to software and then undoing those changes the next day. But "
6562
"the usefulness of version control software extends far beyond the bounds of "
6563
"the software development world. Anywhere you can find people using computers "
6564
"to manage information that changes often, there is room for version control."
6567
#: serverguide/C/vcs.xml:17(title)
6571
#: serverguide/C/vcs.xml:18(para)
6573
"Bazaar is a new version control system sponsored by Canonical, the "
6574
"commercial company behind Ubuntu. Unlike Subversion and CVS that only "
6575
"support a central repository model, Bazaar also supports "
6576
"<emphasis>distributed version control</emphasis>, giving people the ability "
6577
"to collaborate more efficiently. In particular, Bazaar is designed to "
6578
"maximize the level of community participation in open source projects."
6581
#: serverguide/C/vcs.xml:29(para)
6583
"At a terminal prompt, enter the following command to install "
6584
"<application>bzr</application>: <screen>\n"
6585
"<command>sudo apt-get install bzr</command>\n"
6589
#: serverguide/C/vcs.xml:40(para)
6591
"To introduce yourself to <application>bzr</application>, use the "
6592
"<emphasis>whoami</emphasis> command like this: <screen>\n"
6593
"<command>$ bzr whoami 'Joe Doe <joe.doe@gmail.com>'</command>\n"
6597
#: serverguide/C/vcs.xml:49(title)
6598
msgid "Learning Bazaar"
6601
#: serverguide/C/vcs.xml:50(para)
6603
"Bazaar comes with bundled documentation installed into "
6604
"<application>/usr/share/doc/bzr/html</application> by default. The tutorial "
6605
"is a good place to start. The <application>bzr</application> command also "
6606
"comes with built-in help: <screen>\n"
6607
"<command>$ bzr help</command>\n"
6611
#: serverguide/C/vcs.xml:60(para)
6613
"To learn more about the <emphasis>foo</emphasis> command: <screen>\n"
6614
"<command>$ bzr help foo</command>\n"
6618
#: serverguide/C/vcs.xml:68(title)
6619
msgid "Launchpad Integration"
6622
#: serverguide/C/vcs.xml:69(para)
6624
"While highly useful as a stand-alone system, Bazaar has good, optional "
6625
"integration with <ulink url=\"https://launchpad.net/\">Launchpad</ulink>, "
6626
"the collaborative development system used by Canonical and the broader open "
6627
"source community to manage and extend Ubuntu itself. For information on how "
6628
"Bazaar can be used with Launchpad to collaborate on open source projects, "
6629
"see <ulink url=\"http://bazaar-vcs.org/LaunchpadIntegration/\"> "
6630
"http://bazaar-vcs.org/LaunchpadIntegration</ulink>."
6633
#: serverguide/C/vcs.xml:81(title)
6637
#: serverguide/C/vcs.xml:82(para)
6639
"Subversion is an open source version control system. Using Subversion, you "
6640
"can record the history of source files and documents. It manages files and "
6641
"directories over time. A tree of files is placed into a central repository. "
6642
"The repository is much like an ordinary file server, except that it "
6643
"remembers every change ever made to files and directories."
6646
#: serverguide/C/vcs.xml:87(para)
6648
"To access Subversion repository using the HTTP protocol, you must install "
6649
"and configure a web server. Apache2 is proven to work with Subversion. "
6650
"Please refer to the HTTP subsection in the Apache2 section to install and "
6651
"configure Apache2. To access the Subversion repository using the HTTPS "
6652
"protocol, you must install and configure a digital certificate in your "
6653
"Apache 2 web server. Please refer to the HTTPS subsection in the Apache2 "
6654
"section to install and configure the digital certificate."
6657
#: serverguide/C/vcs.xml:96(para)
6659
"To install Subversion, run the following command from a terminal prompt:"
6662
#: serverguide/C/vcs.xml:101(command)
6663
msgid "sudo apt-get install subversion libapache2-svn"
6666
#: serverguide/C/vcs.xml:108(para)
6668
"This step assumes you have installed above mentioned packages on your "
6669
"system. This section explains how to create a Subversion repository and "
6670
"access the project."
6673
#: serverguide/C/vcs.xml:111(title)
6674
msgid "Create Subversion Repository"
6677
#: serverguide/C/vcs.xml:112(para)
6679
"The Subversion repository can be created using the following command from a "
6683
#: serverguide/C/vcs.xml:116(command)
6684
msgid "svnadmin create /path/to/repos/project"
6687
#: serverguide/C/vcs.xml:121(title)
6688
msgid "Importing Files"
6691
#: serverguide/C/vcs.xml:122(para)
6693
"Once you create the repository you can <emphasis>import</emphasis> files "
6694
"into the repository. To import a directory, enter the following from a "
6695
"terminal prompt: <screen>\n"
6696
"<command>svn import /path/to/import/directory "
6697
"file:///path/to/repos/project</command>\n"
6701
#: serverguide/C/vcs.xml:134(title) serverguide/C/vcs.xml:139(title)
6702
msgid "Access Methods"
6705
#: serverguide/C/vcs.xml:135(para)
6707
"Subversion repositories can be accessed (checked out) through many different "
6708
"methods --on local disk, or through various network protocols. A repository "
6709
"location, however, is always a URL. The table describes how different URL "
6710
"schemes map to the available access methods."
6713
#: serverguide/C/vcs.xml:146(para)
6717
#: serverguide/C/vcs.xml:147(para)
6718
msgid "Access Method"
6721
#: serverguide/C/vcs.xml:152(para)
6725
#: serverguide/C/vcs.xml:153(para)
6726
msgid "direct repository access (on local disk)"
6729
#: serverguide/C/vcs.xml:156(para)
6733
#: serverguide/C/vcs.xml:157(para)
6734
msgid "Access via WebDAV protocol to Subversion-aware Apache2 web server"
6737
#: serverguide/C/vcs.xml:160(para)
6741
#: serverguide/C/vcs.xml:161(para)
6742
msgid "Same as http://, but with SSL encryption"
6745
#: serverguide/C/vcs.xml:164(para)
6749
#: serverguide/C/vcs.xml:165(para)
6750
msgid "Access via custom protocol to an svnserve server"
6753
#: serverguide/C/vcs.xml:168(para)
6757
#: serverguide/C/vcs.xml:169(para)
6758
msgid "Same as svn://, but through an SSH tunnel"
6761
#: serverguide/C/vcs.xml:175(para)
6763
"In this section, we will see how to configure Subversion for all these "
6764
"access methods. Here, we cover the basics. For more advanced usage details, "
6765
"refer to the <ulink url=\"http://svnbook.red-bean.com/\">svn book</ulink>."
6768
#: serverguide/C/vcs.xml:182(title)
6769
msgid "Direct repository access (file://)"
6772
#: serverguide/C/vcs.xml:183(para)
6774
"This is the simplest of all access methods. It does not require any "
6775
"Subversion server process to be running. This access method is used to "
6776
"access Subversion from the same machine. The syntax of the command, entered "
6777
"at a terminal prompt, is as follows:"
6780
#: serverguide/C/vcs.xml:190(command)
6781
msgid "svn co file:///path/to/repos/project"
6784
#: serverguide/C/vcs.xml:193(para)
6788
#: serverguide/C/vcs.xml:196(command)
6789
msgid "svn co file://localhost/path/to/repos/project"
6792
#: serverguide/C/vcs.xml:200(para)
6794
"If you do not specify the hostname, there are three forward slashes (///) -- "
6795
"two for the protocol (file, in this case) plus the leading slash in the "
6796
"path. If you specify the hostname, you must use two forward slashes (//)."
6799
#: serverguide/C/vcs.xml:202(para)
6801
"The repository permissions depend on filesystem permissions. If the user has "
6802
"read/write permission, he can checkout from and commit to the repository."
6805
#: serverguide/C/vcs.xml:205(title)
6806
msgid "Access via WebDAV protocol (http://)"
6809
#: serverguide/C/vcs.xml:206(para)
6811
"To access the Subversion repository via WebDAV protocol, you must configure "
6812
"your Apache 2 web server. Add the following snippet between the "
6813
"<emphasis><VirtualHost></emphasis> and "
6814
"<emphasis></VirtualHost></emphasis> elements in "
6815
"<filename>/etc/apache2/sites-available/default</filename>, or another "
6819
#: serverguide/C/vcs.xml:212(programlisting)
6823
" <Location /svn>\n"
6825
" SVNPath /home/svn\n"
6827
" AuthName \"Your repository name\"\n"
6828
" AuthUserFile /etc/subversion/passwd\n"
6829
" Require valid-user\n"
6830
" </Location> \n"
6833
#: serverguide/C/vcs.xml:223(para)
6835
"The above configuration snippet assumes that Subversion repositories are "
6836
"created under <filename>/home/svn/</filename> directory using "
6837
"<command>svnadmin</command> command. They can be accessible using "
6838
"<command>http://hostname/svn/repos_name</command> url."
6841
#: serverguide/C/vcs.xml:229(para)
6843
"To import or commit files to your Subversion repository over HTTP, the "
6844
"repository should be owned by the HTTP user. In Ubuntu systems, normally the "
6845
"HTTP user is <command>www-data</command>. To change the ownership of the "
6846
"repository files enter the following command from terminal prompt:"
6849
#: serverguide/C/vcs.xml:238(command)
6850
msgid "sudo chown -R www-data:www-data /path/to/repos"
6853
#: serverguide/C/vcs.xml:241(para)
6855
"By changing the ownership of repository as <command>www-data</command> you "
6856
"will not be able to import or commit files into the repository by running "
6857
"<command>svn import file:///</command> command as any user other than "
6858
"<command>www-data</command>."
6861
#: serverguide/C/vcs.xml:250(para)
6863
"Next, you must create the <filename>/etc/subversion/passwd</filename> file "
6864
"that will contain user authentication details. To create a file issue the "
6865
"following command at a command prompt (which will create the file and add "
6869
#: serverguide/C/vcs.xml:256(command)
6870
msgid "sudo htpasswd -c /etc/subversion/passwd user_name"
6873
#: serverguide/C/vcs.xml:259(para)
6875
"To add additional users omit the <emphasis>\"-c\"</emphasis> option as this "
6876
"option replaces the old file. Instead use this form:"
6879
#: serverguide/C/vcs.xml:264(command)
6880
msgid "sudo htpasswd /etc/subversion/password user_name"
6883
#: serverguide/C/vcs.xml:268(para)
6885
"This command will prompt you to enter the password. Once you enter the "
6886
"password, the user is added. Now, to access the repository you can run the "
6887
"following command:"
6890
#: serverguide/C/vcs.xml:269(command)
6891
msgid "svn co http://servername/svn"
6894
#: serverguide/C/vcs.xml:271(para)
6896
"The password is transmitted as plain text. If you are worried about password "
6897
"snooping, you are advised to use SSL encryption. For details, please refer "
6901
#: serverguide/C/vcs.xml:277(title)
6902
msgid "Access via WebDAV protocol with SSL encryption (https://)"
6905
#: serverguide/C/vcs.xml:278(para)
6907
"Accessing Subversion repository via WebDAV protocol with SSL encryption "
6908
"(https://) is similar to http:// except that you must install and configure "
6909
"the digital certificate in your Apache2 web server. To use SSL with "
6910
"Subversion add the above Apache2 configuration to "
6911
"<filename>/etc/apache2/sites-available/default-ssl</filename>. For more "
6912
"information on setting up Apache2 with SSL see <xref linkend=\"https-"
6913
"configuration\"/>."
6916
#: serverguide/C/vcs.xml:287(para)
6918
"You can install a digital certificate issued by a signing authority. "
6919
"Alternatively, you can install your own self-signed certificate."
6922
#: serverguide/C/vcs.xml:292(para)
6924
"This step assumes you have installed and configured a digital certificate in "
6925
"your Apache 2 web server. Now, to access the Subversion repository, please "
6926
"refer to the above section! The access methods are exactly the same, except "
6927
"the protocol. You must use https:// to access the Subversion repository."
6930
#: serverguide/C/vcs.xml:302(title)
6931
msgid "Access via custom protocol (svn://)"
6934
#: serverguide/C/vcs.xml:303(para)
6936
"Once the Subversion repository is created, you can configure the access "
6937
"control. You can edit the <filename> "
6938
"/path/to/repos/project/conf/svnserve.conf</filename> file to configure the "
6939
"access control. For example, to set up authentication, you can uncomment the "
6940
"following lines in the configuration file:"
6943
#: serverguide/C/vcs.xml:310(programlisting)
6947
"# password-db = passwd"
6950
#: serverguide/C/vcs.xml:313(para)
6952
"After uncommenting the above lines, you can maintain the user list in the "
6953
"passwd file. So, edit the file <filename>passwd </filename> in the same "
6954
"directory and add the new user. The syntax is as follows:"
6957
#: serverguide/C/vcs.xml:319(programlisting)
6959
msgid "username = password"
6962
#: serverguide/C/vcs.xml:320(para)
6963
msgid "For more details, please refer to the file."
6966
#: serverguide/C/vcs.xml:324(para)
6968
"Now, to access Subversion via the svn:// custom protocol, either from the "
6969
"same machine or a different machine, you can run svnserver using svnserve "
6970
"command. The syntax is as follows:"
6973
#: serverguide/C/vcs.xml:329(programlisting)
6976
"$ svnserve -d --foreground -r /path/to/repos\n"
6977
"# -d -- daemon mode\n"
6978
"# --foreground -- run in foreground (useful for debugging)\n"
6979
"# -r -- root of directory to serve\n"
6981
"For more usage details, please refer to:\n"
6985
#: serverguide/C/vcs.xml:337(para)
6987
"Once you run this command, Subversion starts listening on default port "
6988
"(3690). To access the project repository, you must run the following command "
6989
"from a terminal prompt:"
6992
#: serverguide/C/vcs.xml:340(command)
6993
msgid "svn co svn://hostname/project project --username user_name"
6996
#: serverguide/C/vcs.xml:343(para)
6998
"Based on server configuration, it prompts for password. Once you are "
6999
"authenticated, it checks out the code from Subversion repository. To "
7000
"synchronize the project repository with the local copy, you can run the "
7001
"<command>update</command> sub-command. The syntax of the command, entered at "
7002
"a terminal prompt, is as follows:"
7005
#: serverguide/C/vcs.xml:351(command)
7006
msgid "cd project_dir ; svn update"
7009
#: serverguide/C/vcs.xml:354(para)
7011
"For more details about using each Subversion sub-command, you can refer to "
7012
"the manual. For example, to learn more about the co (checkout) command, "
7013
"please run the following command from a terminal prompt:"
7016
#: serverguide/C/vcs.xml:358(command)
7020
#: serverguide/C/vcs.xml:362(title)
7021
msgid "Access via custom protocol with SSL encryption (svn+ssh://)"
7024
#: serverguide/C/vcs.xml:363(para)
7026
"The configuration and server process is same as in the svn:// method. For "
7027
"details, please refer to the above section. This step assumes you have "
7028
"followed the above step and started the Subversion server using "
7029
"<application>svnserve</application> command."
7032
#: serverguide/C/vcs.xml:369(para)
7034
"It is also assumed that the ssh server is running on that machine and that "
7035
"it is allowing incoming connections. To confirm, please try to login to that "
7036
"machine using ssh. If you can login, everything is perfect. If you cannot "
7037
"login, please address it before continuing further."
7040
#: serverguide/C/vcs.xml:375(para)
7042
"The svn+ssh:// protocol is used to access the Subversion repository using "
7043
"SSL encryption. The data transfer is encrypted using this method. To access "
7044
"the project repository (for example with a checkout), you must use the "
7045
"following command syntax:"
7048
#: serverguide/C/vcs.xml:382(command)
7049
msgid "svn co svn+ssh://hostname/var/svn/repos/project"
7052
#: serverguide/C/vcs.xml:386(para)
7054
"You must use the full path (/path/to/repos/project) to access the Subversion "
7055
"repository using this access method."
7058
#: serverguide/C/vcs.xml:389(para)
7060
"Based on server configuration, it prompts for password. You must enter the "
7061
"password you use to login via ssh. Once you are authenticated, it checks out "
7062
"the code from the Subversion repository."
7065
#: serverguide/C/vcs.xml:399(title)
7069
#: serverguide/C/vcs.xml:400(para)
7071
"CVS is a version control system. You can use it to record the history of "
7075
#: serverguide/C/vcs.xml:406(para)
7077
"To install <application>CVS</application>, run the following command from a "
7078
"terminal prompt: <screen>\n"
7079
"<command>sudo apt-get install cvs</command>\n"
7080
"</screen> After you install <application>cvs</application>, you should "
7081
"install <application>xinetd</application> to start/stop the cvs server. At "
7082
"the prompt, enter the following command to install "
7083
"<application>xinetd</application>: <screen>\n"
7084
"<command>sudo apt-get install xinetd</command>\n"
7088
#: serverguide/C/vcs.xml:439(programlisting)
7092
"service cvspserver\n"
7095
" socket_type = stream\n"
7099
" type = UNLISTED\n"
7100
" server = /usr/bin/cvs\n"
7101
" server_args = -f --allow-root /var/lib/cvs pserver\n"
7106
#: serverguide/C/vcs.xml:455(para)
7108
"Be sure to edit the repository if you have changed the default repository "
7109
"(<application>/var/lib/cvs</application>) directory."
7112
#: serverguide/C/vcs.xml:424(para)
7114
"Once you install cvs, the repository will be automatically initialized. By "
7115
"default, the repository resides under the "
7116
"<application>/var/lib/cvs</application> directory. You can change this path "
7117
"by running following command: <screen>\n"
7118
"<command>cvs -d /your/new/cvs/repo init</command>\n"
7119
"</screen> Once the initial repository is set up, you can configure "
7120
"<application>xinetd</application> to start the CVS server. You can copy the "
7121
"following lines to the <filename> /etc/xinetd.d/cvspserver</filename> file. "
7122
"<placeholder-1/><placeholder-2/> Once you have configured "
7123
"<application>xinetd</application> you can start the cvs server by running "
7124
"following command: <screen>\n"
7125
"<command>sudo /etc/init.d/xinetd restart</command>\n"
7129
#: serverguide/C/vcs.xml:468(para)
7131
"You can confirm that the CVS server is running by issuing the following "
7135
#: serverguide/C/vcs.xml:475(command)
7136
msgid "sudo netstat -tap | grep cvs"
7139
#: serverguide/C/vcs.xml:479(para) serverguide/C/databases.xml:65(para)
7141
"When you run this command, you should see the following line or something "
7145
#: serverguide/C/vcs.xml:484(programlisting)
7149
"tcp 0 0 *:cvspserver *:* LISTEN \n"
7152
#: serverguide/C/vcs.xml:488(para)
7154
"From here you can continue to add users, add new projects, and manage the "
7158
#: serverguide/C/vcs.xml:493(para)
7160
"CVS allows the user to add users independently of the underlying OS "
7161
"installation. Probably the easiest way is to use the Linux Users for CVS, "
7162
"although it has potential security issues. Please refer to the CVS manual "
7166
#: serverguide/C/vcs.xml:503(title)
7167
msgid "Add Projects"
7170
#: serverguide/C/vcs.xml:515(para)
7172
"You can use the CVSROOT environment variable to store the CVS root "
7173
"directory. Once you export the CVSROOT environment variable, you can avoid "
7174
"using -d option in the above cvs command."
7177
#: serverguide/C/vcs.xml:527(para)
7179
"When you add a new project, the CVS user you use must have write access to "
7180
"the CVS repository (<application>/var/lib/cvs</application>). By default, "
7181
"the <application>src</application> group has write access to the CVS "
7182
"repository. So, you can add the user to this group, and he can then add and "
7183
"manage projects in the CVS repository."
7186
#: serverguide/C/vcs.xml:504(para)
7188
"This section explains how to add new project to the CVS repository. Create "
7189
"the directory and add necessary document and source files to the directory. "
7190
"Now, run the following command to add this project to CVS repository: "
7192
"<command>cd your/project</command>\n"
7193
"<command>cvs -d :pserver:username@hostname.com:/var/lib/cvs import -m "
7194
"\"Importing my project to CVS repository\" . new_project start</command>\n"
7195
"</screen><placeholder-1/> The string <emphasis>new_project</emphasis> is a "
7196
"vendor tag, and <emphasis>start</emphasis> is a release tag. They serve no "
7197
"purpose in this context, but since CVS requires them, they must be present. "
7201
#: serverguide/C/vcs.xml:540(ulink)
7202
msgid "Bazaar Home Page"
7205
#: serverguide/C/vcs.xml:541(ulink)
7209
#: serverguide/C/vcs.xml:542(ulink)
7210
msgid "Subversion Home Page"
7213
#: serverguide/C/vcs.xml:543(ulink)
7214
msgid "Subversion Book"
7217
#: serverguide/C/vcs.xml:545(ulink)
7221
#: serverguide/C/vcs.xml:546(ulink)
7222
msgid "Easy Bazaar Ubuntu Wiki page"
7225
#: serverguide/C/vcs.xml:547(ulink)
7226
msgid "Ubuntu Wiki Subversion page"
7229
#: serverguide/C/serverguide.xml:3(title) serverguide/C/bookinfo.xml:3(title)
7230
msgid "Credits and License"
7231
msgstr "Mercejaments e licéncia"
7233
#: serverguide/C/serverguide.xml:4(para) serverguide/C/bookinfo.xml:4(para)
7235
"This document is maintained by the Ubuntu documentation team "
7236
"(https://wiki.ubuntu.com/DocumentationTeam). For a list of contributors, see "
7237
"the <ulink url=\"../../libs/C/contributors.xml\">contributors page</ulink>"
7240
#: serverguide/C/serverguide.xml:5(para) serverguide/C/bookinfo.xml:5(para)
7242
"This document is made available under the Creative Commons ShareAlike 2.5 "
7243
"License (CC-BY-SA)."
7246
#: serverguide/C/serverguide.xml:6(para) serverguide/C/bookinfo.xml:6(para)
7248
"You are free to modify, extend, and improve the Ubuntu documentation source "
7249
"code under the terms of this license. All derivative works must be released "
7250
"under this license."
7253
#: serverguide/C/serverguide.xml:8(para) serverguide/C/bookinfo.xml:8(para)
7255
"This documentation is distributed in the hope that it will be useful, but "
7256
"WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY "
7257
"or FITNESS FOR A PARTICULAR PURPOSE AS DESCRIBED IN THE DISCLAIMER."
7260
#: serverguide/C/serverguide.xml:11(para) serverguide/C/bookinfo.xml:11(para)
7262
"A copy of the license is available here: <ulink url=\"/usr/share/ubuntu-"
7263
"docs/libs/C/ccbysa.xml\">Creative Commons ShareAlike License</ulink>."
7266
#: serverguide/C/serverguide.xml:14(year) serverguide/C/bookinfo.xml:14(year)
7270
#: serverguide/C/serverguide.xml:15(ulink) serverguide/C/bookinfo.xml:15(ulink)
7271
msgid "Ubuntu Documentation Project"
7274
#: serverguide/C/serverguide.xml:15(holder) serverguide/C/bookinfo.xml:15(holder)
7275
msgid "Canonical Ltd. and members of the <placeholder-1/>"
7278
#: serverguide/C/serverguide.xml:18(publishername) serverguide/C/bookinfo.xml:18(publishername)
7279
msgid "The Ubuntu Documentation Project"
7282
#: serverguide/C/serverguide.xml:17(para)
7284
"Welcome to the <emphasis>Ubuntu Server Guide</emphasis>! It contains "
7285
"information on how to install and configure various server applications on "
7286
"your Ubuntu system to fit your needs. It is a step-by-step, task-oriented "
7287
"guide for configuring and customizing your system."
7290
#: serverguide/C/security.xml:13(title)
7294
#: serverguide/C/security.xml:14(para)
7296
"Security should always be considered when installing, deploying, and using "
7297
"any type of computer system. Although a fresh installation of Ubuntu is "
7298
"relatively safe for immediate use on the Internet, it is important to have a "
7299
"balanced understanding of your systems security posture based on how it will "
7300
"be used after deployment."
7303
#: serverguide/C/security.xml:17(para)
7305
"This chapter provides an overview of security related topics as they pertain "
7306
"to Ubuntu 10.04 LTS Server Edition, and outlines simple measures you may use "
7307
"to protect your server and network from any number of potential security "
7311
#: serverguide/C/security.xml:21(title)
7312
msgid "User Management"
7315
#: serverguide/C/security.xml:22(para)
7317
"User management is a critical part of maintaining a secure system. "
7318
"Ineffective user and privilege management often lead many systems into being "
7319
"compromised. Therefore, it is important that you understand how you can "
7320
"protect your server through simple and effective user account management "
7324
#: serverguide/C/security.xml:26(title)
7325
msgid "Where is root?"
7328
#: serverguide/C/security.xml:27(para)
7330
"Ubuntu developers made a conscientious decision to disable the "
7331
"administrative root account by default in all Ubuntu installations. This "
7332
"does not mean that the root account has been deleted or that it may not be "
7333
"accessed. It merely has been given a password which matches no possible "
7334
"encrypted value, therefore may not log in directly by itself."
7337
#: serverguide/C/security.xml:30(para)
7339
"Instead, users are encouraged to make use of a tool by the name of "
7340
"<application>sudo</application> to carry out system administrative duties. "
7341
"<application>Sudo</application> allows an authorized user to temporarily "
7342
"elevate their privileges using their own password instead of having to know "
7343
"the password belonging to the root account. This simple yet effective "
7344
"methodology provides accountability for all user actions, and gives the "
7345
"administrator granular control over which actions a user can perform with "
7349
#: serverguide/C/security.xml:35(para)
7351
"If for some reason you wish to enable the root account, simply give it a "
7355
#: serverguide/C/security.xml:39(command)
7359
#: serverguide/C/security.xml:41(para)
7361
"Sudo will prompt you for your password, and then ask you to supply a new "
7362
"password for root as shown below:"
7365
#: serverguide/C/security.xml:44(userinput)
7367
msgid "(enter your own password)"
7370
#: serverguide/C/security.xml:45(userinput)
7372
msgid "(enter a new password for root)"
7375
#: serverguide/C/security.xml:46(userinput)
7377
msgid "(repeat new password for root)"
7380
#: serverguide/C/security.xml:44(computeroutput)
7383
"[sudo] password for username: <placeholder-1/>\n"
7384
"Enter new UNIX password: <placeholder-2/>\n"
7385
"Retype new UNIX password: <placeholder-3/>\n"
7386
"passwd: password updated successfully"
7389
#: serverguide/C/security.xml:51(para)
7390
msgid "To disable the root account, use the following passwd syntax:"
7393
#: serverguide/C/security.xml:55(command)
7394
msgid "sudo passwd -l root"
7397
#: serverguide/C/security.xml:59(para)
7399
"You should read more on <application>Sudo</application> by checking out it's "
7403
#: serverguide/C/security.xml:63(command)
7407
#: serverguide/C/security.xml:67(para)
7409
"By default, the initial user created by the Ubuntu installer is a member of "
7410
"the group \"admin\" which is added to the file "
7411
"<filename>/etc/sudoers</filename> as an authorized sudo user. If you wish to "
7412
"give any other account full root access through "
7413
"<application>sudo</application>, simply add them to the admin group."
7416
#: serverguide/C/security.xml:73(title)
7417
msgid "Adding and Deleting Users"
7420
#: serverguide/C/security.xml:74(para)
7422
"The process for managing local users and groups is straight forward and "
7423
"differs very little from most other GNU/Linux operating systems. Ubuntu and "
7424
"other Debian based distributions, encourage the use of the \"adduser\" "
7425
"package for account management."
7428
#: serverguide/C/security.xml:79(para)
7430
"To add a user account, use the following syntax, and follow the prompts to "
7431
"give the account a password and identifiable characteristics such as a full "
7432
"name, phone number, etc."
7435
#: serverguide/C/security.xml:83(command)
7436
msgid "sudo adduser username"
7439
#: serverguide/C/security.xml:87(para)
7441
"To delete a user account and its primary group, use the following syntax:"
7444
#: serverguide/C/security.xml:91(command)
7445
msgid "sudo deluser username"
7448
#: serverguide/C/security.xml:93(para)
7450
"Deleting an account does not remove their respective home folder. It is up "
7451
"to you whether or not you wish to delete the folder manually or keep it "
7452
"according to your desired retention policies."
7455
#: serverguide/C/security.xml:96(para)
7457
"Remember, any user added later on with the same UID/GID as the previous "
7458
"owner will now have access to this folder if you have not taken the "
7459
"necessary precautions."
7462
#: serverguide/C/security.xml:99(para)
7464
"You may want to change these UID/GID values to something more appropriate, "
7465
"such as the root account, and perhaps even relocate the folder to avoid "
7469
#: serverguide/C/security.xml:103(command)
7470
msgid "sudo chown -R root:root /home/username/"
7473
#: serverguide/C/security.xml:104(command)
7474
msgid "sudo mkdir /home/archived_users/"
7477
#: serverguide/C/security.xml:105(command)
7478
msgid "sudo mv /home/username /home/archived_users/"
7481
#: serverguide/C/security.xml:109(para)
7483
"To temporarily lock or unlock a user account, use the following syntax, "
7487
#: serverguide/C/security.xml:113(command)
7488
msgid "sudo passwd -l username"
7491
#: serverguide/C/security.xml:114(command)
7492
msgid "sudo passwd -u username"
7495
#: serverguide/C/security.xml:118(para)
7497
"To add or delete a personalized group, use the following syntax, "
7501
#: serverguide/C/security.xml:122(command)
7502
msgid "sudo addgroup groupname"
7505
#: serverguide/C/security.xml:123(command)
7506
msgid "sudo delgroup groupname"
7509
#: serverguide/C/security.xml:127(para)
7510
msgid "To add a user to a group, use the following syntax:"
7513
#: serverguide/C/security.xml:131(command)
7514
msgid "sudo adduser username groupname"
7517
#: serverguide/C/security.xml:138(title)
7518
msgid "User Profile Security"
7521
#: serverguide/C/security.xml:139(para)
7523
"When a new user is created, the adduser utility creates a brand new home "
7524
"directory named <filename class=\"directory\">/home/username</filename>, "
7525
"respectively. The default profile is modeled after the contents found in the "
7526
"directory of <filename class=\"directory\">/etc/skel</filename>, which "
7527
"includes all profile basics."
7530
#: serverguide/C/security.xml:142(para)
7532
"If your server will be home to multiple users, you should pay close "
7533
"attention to the user home directory permissions to ensure confidentiality. "
7534
"By default, user home directories in Ubuntu are created with world "
7535
"read/execute permissions. This means that all users can browse and access "
7536
"the contents of other users home directories. This may not be suitable for "
7540
#: serverguide/C/security.xml:147(para)
7542
"To verify your current users home directory permissions, use the following "
7546
#: serverguide/C/security.xml:151(command) serverguide/C/security.xml:183(command)
7547
msgid "ls -ld /home/username"
7550
#: serverguide/C/security.xml:153(para)
7552
"The following output shows that the directory <filename "
7553
"class=\"directory\">/home/username</filename> has world readable permissions:"
7556
#: serverguide/C/security.xml:156(computeroutput)
7558
msgid "drwxr-xr-x 2 username username 4096 2007-10-02 20:03 username"
7561
#: serverguide/C/security.xml:160(para)
7563
"You can remove the world readable permissions using the following syntax:"
7566
#: serverguide/C/security.xml:164(command)
7567
msgid "sudo chmod 0750 /home/username"
7570
#: serverguide/C/security.xml:167(para)
7572
"Some people tend to use the recursive option (-R) indiscriminately which "
7573
"modifies all child folders and files, but this is not necessary, and may "
7574
"yield other undesirable results. The parent directory alone is sufficient "
7575
"for preventing unauthorized access to anything below the parent."
7578
#: serverguide/C/security.xml:171(para)
7580
"A much more efficient approach to the matter would be to modify the "
7581
"<application>adduser</application> global default permissions when creating "
7582
"user home folders. Simply edit the file "
7583
"<filename>/etc/adduser.conf</filename> and modify the "
7584
"<varname>DIR_MODE</varname> variable to something appropriate, so that all "
7585
"new home directories will receive the correct permissions."
7588
#: serverguide/C/security.xml:174(programlisting)
7595
#: serverguide/C/security.xml:179(para)
7597
"After correcting the directory permissions using any of the previously "
7598
"mentioned techniques, verify the results using the following syntax:"
7601
#: serverguide/C/security.xml:185(para)
7603
"The results below show that world readable permissions have been removed:"
7606
#: serverguide/C/security.xml:188(computeroutput)
7608
msgid "drwxr-x--- 2 username username 4096 2007-10-02 20:03 username"
7611
#: serverguide/C/security.xml:195(title)
7612
msgid "Password Policy"
7615
#: serverguide/C/security.xml:196(para)
7617
"A strong password policy is one of the most important aspects of your "
7618
"security posture. Many successful security breaches involve simple brute "
7619
"force and dictionary attacks against weak passwords. If you intend to offer "
7620
"any form of remote access involving your local password system, make sure "
7621
"you adequately address minimum password complexity requirements, maximum "
7622
"password lifetimes, and frequent audits of your authentication systems."
7625
#: serverguide/C/security.xml:200(title)
7626
msgid "Minimum Password Length"
7629
#: serverguide/C/security.xml:201(para)
7631
"By default, Ubuntu requires a minimum password length of 4 characters, as "
7632
"well as some basic entropy checks. These values are controlled in the file "
7633
"<filename>/etc/pam.d/common-password</filename>, which is outlined below."
7636
#: serverguide/C/security.xml:204(programlisting)
7640
"password required pam_unix.so nullok obscure min=4 max=8 md5\n"
7643
#: serverguide/C/security.xml:207(para)
7645
"If you would like to adjust the minimum length to 6 characters, change the "
7646
"appropriate variable to min=6. The modification is outlined below."
7649
#: serverguide/C/security.xml:210(programlisting)
7653
"password required pam_unix.so nullok obscure min=6 max=8 md5\n"
7656
#: serverguide/C/security.xml:214(para)
7658
"The <varname>max=8</varname> variable does not represent the maximum length "
7659
"of a password. It only means that complexity requirements will not be "
7660
"checked on passwords over 8 characters. You may want to look at the "
7661
"<application>libpam-cracklib</application> package for additional password "
7662
"entropy assistance."
7665
#: serverguide/C/security.xml:220(title)
7666
msgid "Password Expiration"
7669
#: serverguide/C/security.xml:221(para)
7671
"When creating user accounts, you should make it a policy to have a minimum "
7672
"and maximum password age forcing users to change their passwords when they "
7676
#: serverguide/C/security.xml:226(para)
7678
"To easily view the current status of a user account, use the following "
7682
#: serverguide/C/security.xml:230(command) serverguide/C/security.xml:263(command)
7683
msgid "sudo chage -l username"
7686
#: serverguide/C/security.xml:232(para)
7688
"The output below shows interesting facts about the user account, namely that "
7689
"there are no policies applied:"
7692
#: serverguide/C/security.xml:235(computeroutput)
7695
"Last password change : Jan 20, 2008\n"
7696
"Password expires : never\n"
7697
"Password inactive : never\n"
7698
"Account expires : never\n"
7699
"Minimum number of days between password change : 0\n"
7700
"Maximum number of days between password change : 99999\n"
7701
"Number of days of warning before password expires : 7"
7704
#: serverguide/C/security.xml:245(para)
7706
"To set any of these values, simply use the following syntax, and follow the "
7707
"interactive prompts:"
7710
#: serverguide/C/security.xml:249(command)
7711
msgid "sudo chage username"
7714
#: serverguide/C/security.xml:251(para)
7716
"The following is also an example of how you can manually change the explicit "
7717
"expiration date (-E) to 01/31/2008, minimum password age (-m) of 5 days, "
7718
"maximum password age (-M) of 90 days, inactivity period (-I) of 5 days after "
7719
"password expiration, and a warning time period (-W) of 14 days before "
7720
"password expiration."
7723
#: serverguide/C/security.xml:255(command)
7724
msgid "sudo chage -E 01/31/2008 -m 5 -M 90 -I 30 -W 14 username"
7727
#: serverguide/C/security.xml:259(para)
7728
msgid "To verify changes, use the same syntax as mentioned previously:"
7731
#: serverguide/C/security.xml:265(para)
7733
"The output below shows the new policies that have been established for the "
7737
#: serverguide/C/security.xml:268(computeroutput)
7740
"Last password change : Jan 20, 2008\n"
7741
"Password expires : Apr 19, 2008\n"
7742
"Password inactive : May 19, 2008\n"
7743
"Account expires : Jan 31, 2008\n"
7744
"Minimum number of days between password change : 5\n"
7745
"Maximum number of days between password change : 90\n"
7746
"Number of days of warning before password expires : 14"
7749
#: serverguide/C/security.xml:284(title)
7750
msgid "Other Security Considerations"
7753
#: serverguide/C/security.xml:285(para)
7755
"Many applications use alternate authentication mechanisms that can be easily "
7756
"overlooked by even experienced system administrators. Therefore, it is "
7757
"important to understand and control how users authenticate and gain access "
7758
"to services and applications on your server."
7761
#: serverguide/C/security.xml:290(title)
7762
msgid "SSH Access by Disabled Users"
7765
#: serverguide/C/security.xml:291(para)
7767
"Simply disabling/locking a user account will not prevent a user from logging "
7768
"into your server remotely if they have previously set up RSA public key "
7769
"authentication. They will still be able to gain shell access to the server, "
7770
"without the need for any password. Remember to check the users home "
7771
"directory for files that will allow for this type of authenticated SSH "
7772
"access. e.g. <filename>/home/username/.ssh/authorized_keys</filename>."
7775
#: serverguide/C/security.xml:294(para)
7777
"Remove or rename the directory <filename "
7778
"class=\"directory\">.ssh/</filename> in the user's home folder to prevent "
7779
"further SSH authentication capabilities."
7782
#: serverguide/C/security.xml:297(para)
7784
"Be sure to check for any established SSH connections by the disabled user, "
7785
"as it is possible they may have existing inbound or outbound connections. "
7786
"Kill any that are found."
7789
#: serverguide/C/security.xml:300(para)
7791
"Restrict SSH access to only user accounts that should have it. For example, "
7792
"you may create a group called \"sshlogin\" and add the group name as the "
7793
"value associated with the <varname>AllowGroups</varname> variable located in "
7794
"the file <filename>/etc/ssh/sshd_config</filename>."
7797
#: serverguide/C/security.xml:303(programlisting)
7801
"AllowGroups sshlogin\n"
7804
#: serverguide/C/security.xml:306(para)
7806
"Then add your permitted SSH users to the group \"sshlogin\", and restart the "
7810
#: serverguide/C/security.xml:310(command)
7811
msgid "sudo adduser username sshlogin"
7814
#: serverguide/C/security.xml:311(command) serverguide/C/remote-administration.xml:150(command)
7815
msgid "sudo /etc/init.d/ssh restart"
7818
#: serverguide/C/security.xml:315(title)
7819
msgid "External User Database Authentication"
7822
#: serverguide/C/security.xml:316(para)
7824
"Most enterprise networks require centralized authentication and access "
7825
"controls for all system resources. If you have configured your server to "
7826
"authenticate users against external databases, be sure to disable the user "
7827
"accounts both externally and locally, this way you ensure that local "
7828
"fallback authentication is not possible."
7831
#: serverguide/C/security.xml:325(title)
7832
msgid "Console Security"
7835
#: serverguide/C/security.xml:326(para)
7837
"As with any other security barrier you put in place to protect your server, "
7838
"it is pretty tough to defend against untold damage caused by someone with "
7839
"physical access to your environment, for example, theft of hard drives, "
7840
"power or service disruption and so on. Therefore, console security should be "
7841
"addressed merely as one component of your overall physical security "
7842
"strategy. A locked \"screen door\" may deter a casual criminal, or at the "
7843
"very least slow down a determined one, so it is still advisable to perform "
7844
"basic precautions with regard to console security."
7847
#: serverguide/C/security.xml:329(para)
7849
"The following instructions will help defend your server against issues that "
7850
"could otherwise yield very serious consequences."
7853
#: serverguide/C/security.xml:334(title)
7854
msgid "Disable Ctrl+Alt+Delete"
7857
#: serverguide/C/security.xml:335(para)
7859
"First and foremost, anyone that has physical access to the keyboard can "
7861
"<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Delete</keycap></k"
7862
"eycombo> key combination to reboot the server without having to log on. "
7863
"Sure, someone could simply unplug the power source, but you should still "
7864
"prevent the use of this key combination on a production server. This forces "
7865
"an attacker to take more drastic measures to reboot the server, and will "
7866
"prevent accidental reboots at the same time."
7869
#: serverguide/C/security.xml:340(para)
7871
"To disable the reboot action taken by pressing the "
7872
"<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Delete</keycap></k"
7873
"eycombo> key combination, comment out the following line in the file "
7874
"<filename>/etc/init/control-alt-delete.conf</filename>."
7877
#: serverguide/C/security.xml:343(programlisting)
7881
"#exec shutdown -r now \"Control-Alt-Delete pressed\"\n"
7884
#: serverguide/C/security.xml:352(title)
7888
#: serverguide/C/security.xml:355(para)
7890
"The Linux kernel includes the <emphasis>Netfilter</emphasis> subsystem, "
7891
"which is used to manipulate or decide the fate of network traffic headed "
7892
"into or through your server. All modern Linux firewall solutions use this "
7893
"system for packet filtering."
7896
#: serverguide/C/security.xml:360(para)
7898
"The kernel's packet filtering system would be of little use to "
7899
"administrators without a userspace interface to manage it. This is the "
7900
"purpose of iptables. When a packet reaches your server, it will be handed "
7901
"off to the Netfilter subsystem for acceptance, manipulation, or rejection "
7902
"based on the rules supplied to it from userspace via iptables. Thus, "
7903
"iptables is all you need to manage your firewall if you're familiar with it, "
7904
"but many frontends are available to simplify the task."
7907
#: serverguide/C/security.xml:370(title)
7908
msgid "ufw - Uncomplicated Firewall"
7911
#: serverguide/C/security.xml:371(para)
7913
"The default firewall configuration tool for Ubuntu is "
7914
"<application>ufw</application>. Developed to ease iptables firewall "
7915
"configuration, <application>ufw</application> provides a user friendly way "
7916
"to create an IPv4 or IPv6 host-based firewall."
7919
#: serverguide/C/security.xml:375(para)
7921
"<application>ufw</application> by default is initially disabled. From the "
7922
"<application>ufw</application> man page:"
7925
#: serverguide/C/security.xml:379(quote)
7927
"ufw is not intended to provide complete firewall functionality via its "
7928
"command interface, but instead provides an easy way to add or remove simple "
7929
"rules. It is currently mainly used for host-based firewalls."
7932
#: serverguide/C/security.xml:383(para)
7934
"The following are some examples of how to use <application>ufw</application>:"
7937
#: serverguide/C/security.xml:388(para)
7939
"First, <application>ufw</application> needs to be enabled. From a terminal "
7943
#: serverguide/C/security.xml:392(command)
7944
msgid "sudo ufw enable"
7947
#: serverguide/C/security.xml:396(para)
7948
msgid "To open a port (ssh in this example):"
7951
#: serverguide/C/security.xml:400(command)
7952
msgid "sudo ufw allow 22"
7955
#: serverguide/C/security.xml:404(para)
7956
msgid "Rules can also be added using a <emphasis>numbered</emphasis> format:"
7959
#: serverguide/C/security.xml:408(command)
7960
msgid "sudo ufw insert 1 allow 80"
7963
#: serverguide/C/security.xml:412(para)
7964
msgid "Similarly, to close an opened port:"
7967
#: serverguide/C/security.xml:416(command)
7968
msgid "sudo ufw deny 22"
7971
#: serverguide/C/security.xml:420(para)
7972
msgid "To remove a rule, use delete followed by the rule:"
7975
#: serverguide/C/security.xml:424(command)
7976
msgid "sudo ufw delete deny 22"
7979
#: serverguide/C/security.xml:428(para)
7981
"It is also possible to allow access from specific hosts or networks to a "
7982
"port. The following example allows ssh access from host 192.168.0.2 to any "
7983
"ip address on this host:"
7986
#: serverguide/C/security.xml:433(command)
7987
msgid "sudo ufw allow proto tcp from 192.168.0.2 to any port 22"
7990
#: serverguide/C/security.xml:435(para)
7992
"Replace 192.168.0.2 with 192.168.0.0/24 to allow ssh access from the entire "
7996
#: serverguide/C/security.xml:441(para)
7998
"Adding the <emphasis>--dry-run</emphasis> option to a "
7999
"<emphasis>ufw</emphasis> command will output the resulting rules, but not "
8000
"apply them. For example, the following is what would be applied if opening "
8004
#: serverguide/C/security.xml:447(command)
8005
msgid "sudo ufw --dry-run allow http"
8008
#: serverguide/C/security.xml:451(computeroutput)
8012
":ufw-user-input - [0:0]\n"
8013
":ufw-user-output - [0:0]\n"
8014
":ufw-user-forward - [0:0]\n"
8015
":ufw-user-limit - [0:0]\n"
8016
":ufw-user-limit-accept - [0:0]\n"
8019
"### tuple ### allow tcp 80 0.0.0.0/0 any 0.0.0.0/0\n"
8020
"-A ufw-user-input -p tcp --dport 80 -j ACCEPT\n"
8022
"### END RULES ###\n"
8023
"-A ufw-user-input -j RETURN\n"
8024
"-A ufw-user-output -j RETURN\n"
8025
"-A ufw-user-forward -j RETURN\n"
8026
"-A ufw-user-limit -m limit --limit 3/minute -j LOG --log-prefix \"[UFW "
8028
"-A ufw-user-limit -j REJECT\n"
8029
"-A ufw-user-limit-accept -j ACCEPT\n"
8034
#: serverguide/C/security.xml:475(para)
8035
msgid "<application>ufw</application> can be disabled by:"
8038
#: serverguide/C/security.xml:479(command)
8039
msgid "sudo ufw disable"
8042
#: serverguide/C/security.xml:483(para)
8043
msgid "To see the firewall status, enter:"
8046
#: serverguide/C/security.xml:487(command)
8047
msgid "sudo ufw status"
8050
#: serverguide/C/security.xml:491(para)
8051
msgid "And for more verbose status information use:"
8054
#: serverguide/C/security.xml:495(command)
8055
msgid "sudo ufw status verbose"
8058
#: serverguide/C/security.xml:499(para)
8059
msgid "To view the <emphasis>numbered</emphasis> format:"
8062
#: serverguide/C/security.xml:503(command)
8063
msgid "sudo ufw status numbered"
8066
#: serverguide/C/security.xml:508(para)
8068
"If the port you want to open or close is defined in "
8069
"<filename>/etc/services</filename>, you can use the port name instead of the "
8070
"number. In the above examples, replace <emphasis>22</emphasis> with "
8071
"<emphasis>ssh</emphasis>."
8074
#: serverguide/C/security.xml:514(para)
8076
"This is a quick introduction to using <application>ufw</application>. Please "
8077
"refer to the <application>ufw</application> man page for more information."
8080
#: serverguide/C/security.xml:520(title)
8081
msgid "ufw Application Integration"
8084
#: serverguide/C/security.xml:522(para)
8086
"Applications that open ports can include an <application>ufw</application> "
8087
"profile, which details the ports needed for the application to function "
8088
"properly. The profiles are kept in <filename "
8089
"role=\"directory\">/etc/ufw/applications.d</filename>, and can be edited if "
8090
"the default ports have been changed."
8093
#: serverguide/C/security.xml:531(para)
8095
"To view which applications have installed a profile, enter the following in "
8099
#: serverguide/C/security.xml:536(command)
8100
msgid "sudo ufw app list"
8103
#: serverguide/C/security.xml:542(para)
8105
"Similar to allowing traffic to a port, using an application profile is "
8106
"accomplished by entering:"
8109
#: serverguide/C/security.xml:547(command)
8110
msgid "sudo ufw allow Samba"
8113
#: serverguide/C/security.xml:553(para)
8114
msgid "An extended syntax is available as well:"
8117
#: serverguide/C/security.xml:558(command)
8118
msgid "ufw allow from 192.168.0.0/24 to any app Samba"
8121
#: serverguide/C/security.xml:561(para)
8123
"Replace <emphasis>Samba</emphasis> and <emphasis>192.168.0.0/24</emphasis> "
8124
"with the application profile you are using and the IP range for your network."
8127
#: serverguide/C/security.xml:567(para)
8129
"There is no need to specify the <emphasis>protocol</emphasis> for the "
8130
"application, because that information is detailed in the profile. Also, note "
8131
"that the <emphasis>app</emphasis> name replaces the "
8132
"<emphasis>port</emphasis> number."
8135
#: serverguide/C/security.xml:576(para)
8137
"To view details about which ports, protocols, etc are defined for an "
8138
"application, enter:"
8141
#: serverguide/C/security.xml:581(command)
8142
msgid "sudo ufw app info Samba"
8145
#: serverguide/C/security.xml:587(para)
8147
"Not all applications that require opening a network port come with "
8148
"<application>ufw</application> profiles, but if you have profiled an "
8149
"application and want the file to be included with the package, please file a "
8150
"bug against the package in <ulink "
8151
"url=\"https://launchpad.net/\">Launchpad</ulink>."
8154
#: serverguide/C/security.xml:596(title)
8155
msgid "IP Masquerading"
8158
#: serverguide/C/security.xml:597(para)
8160
"The purpose of IP Masquerading is to allow machines with private, non-"
8161
"routable IP addresses on your network to access the Internet through the "
8162
"machine doing the masquerading. Traffic from your private network destined "
8163
"for the Internet must be manipulated for replies to be routable back to the "
8164
"machine that made the request. To do this, the kernel must modify the "
8165
"<emphasis>source</emphasis> IP address of each packet so that replies will "
8166
"be routed back to it, rather than to the private IP address that made the "
8167
"request, which is impossible over the Internet. Linux uses "
8168
"<emphasis>Connection Tracking</emphasis> (conntrack) to keep track of which "
8169
"connections belong to which machines and reroute each return packet "
8170
"accordingly. Traffic leaving your private network is thus \"masqueraded\" as "
8171
"having originated from your Ubuntu gateway machine. This process is referred "
8172
"to in Microsoft documentation as Internet Connection Sharing."
8175
#: serverguide/C/security.xml:613(title)
8176
msgid "ufw Masquerading"
8179
#: serverguide/C/security.xml:614(para)
8181
"IP Masquerading can be achieved using custom <application>ufw</application> "
8182
"rules. This is possible because the current back-end for "
8183
"<application>ufw</application> is <application>iptables-"
8184
"restore</application> with the rules files located in "
8185
"<filename>/etc/ufw/*.rules</filename>. These files are a great place to add "
8186
"legacy iptables rules used without <application>ufw</application>, and rules "
8187
"that are more network gateway or bridge related."
8190
#: serverguide/C/security.xml:620(para)
8192
"The rules are split into two different files, rules that should be executed "
8193
"before <application>ufw</application> command line rules, and rules that are "
8194
"executed after <application>ufw</application> command line rules."
8197
#: serverguide/C/security.xml:626(para)
8199
"First, packet forwarding needs to be enabled in "
8200
"<application>ufw</application>. Two configuration files will need to be "
8201
"adjusted, in <filename>/etc/default/ufw</filename> change the "
8202
"<emphasis>DEFAULT_FORWARD_POLICY</emphasis> to <quote>ACCEPT</quote>:"
8205
#: serverguide/C/security.xml:630(programlisting)
8209
"DEFAULT_FORWARD_POLICY=\"ACCEPT\"\n"
8212
#: serverguide/C/security.xml:633(para)
8213
msgid "Then edit <filename>/etc/ufw/sysctl.conf</filename> and uncomment:"
8216
#: serverguide/C/security.xml:636(programlisting)
8220
"net/ipv4/ip_forward=1\n"
8223
#: serverguide/C/security.xml:639(para)
8224
msgid "Similarly, for IPv6 forwarding uncomment:"
8227
#: serverguide/C/security.xml:642(programlisting)
8231
"net/ipv6/conf/default/forwarding=1\n"
8234
#: serverguide/C/security.xml:647(para)
8236
"Now we will add rules to the <filename>/etc/ufw/before.rules</filename> "
8237
"file. The default rules only configure the <emphasis>filter</emphasis> "
8238
"table, and to enable masquerading the <emphasis>nat</emphasis> table will "
8239
"need to be configured. Add the following to the top of the file just after "
8240
"the header comments:"
8243
#: serverguide/C/security.xml:652(programlisting)
8247
"# nat Table rules\n"
8249
":POSTROUTING ACCEPT [0:0]\n"
8251
"# Forward traffic from eth1 through eth0.\n"
8252
"-A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE\n"
8254
"# don't delete the 'COMMIT' line or these nat table rules won't be "
8259
#: serverguide/C/security.xml:663(para)
8261
"The comments are not strictly necessary, but it is considered good practice "
8262
"to document your configuration. Also, when modifying any of the "
8263
"<emphasis>rules</emphasis> files in <filename "
8264
"class=\"directory\">/etc/ufw</filename>, make sure these lines are the last "
8265
"line for each table modified:"
8268
#: serverguide/C/security.xml:669(programlisting)
8272
"# don't delete the 'COMMIT' line or these rules won't be processed\n"
8276
#: serverguide/C/security.xml:674(para)
8278
"For each <emphasis>Table</emphasis> a corresponding "
8279
"<emphasis>COMMIT</emphasis> statement is required. In these examples only "
8280
"the <emphasis>nat</emphasis> and <emphasis>filter</emphasis> tables are "
8281
"shown, but you can also add rules for the <emphasis>raw</emphasis> and "
8282
"<emphasis>mangle</emphasis> tables."
8285
#: serverguide/C/security.xml:681(para)
8287
"In the above example replace <emphasis>eth0</emphasis>, "
8288
"<emphasis>eth1</emphasis>, and <emphasis>192.168.0.0/24</emphasis> with the "
8289
"appropriate interfaces and IP range for your network."
8292
#: serverguide/C/security.xml:689(para)
8294
"Finally, disable and re-enable <application>ufw</application> to apply the "
8298
#: serverguide/C/security.xml:693(command)
8299
msgid "sudo ufw disable && sudo ufw enable"
8302
#: serverguide/C/security.xml:697(para)
8304
"IP Masquerading should now be enabled. You can also add any additional "
8305
"FORWARD rules to the <filename>/etc/ufw/before.rules</filename>. It is "
8306
"recommended that these additional rules be added to the <emphasis>ufw-before-"
8307
"forward</emphasis> chain."
8310
#: serverguide/C/security.xml:704(title)
8311
msgid "iptables Masquerading"
8314
#: serverguide/C/security.xml:705(para)
8316
"<application>iptables</application> can also be used to enable masquerading."
8319
#: serverguide/C/security.xml:710(para)
8321
"Similar to <application>ufw</application>, the first step is to enable IPv4 "
8322
"packet forwarding by editing <filename>/etc/sysctl.conf</filename> and "
8323
"uncomment the following line"
8326
#: serverguide/C/security.xml:714(programlisting)
8330
"net.ipv4.ip_forward=1\n"
8333
#: serverguide/C/security.xml:717(para)
8334
msgid "If you wish to enable IPv6 forwarding also uncomment:"
8337
#: serverguide/C/security.xml:720(programlisting)
8341
"net.ipv6.conf.default.forwarding=1\n"
8344
#: serverguide/C/security.xml:725(para)
8346
"Next, execute the <application>sysctl</application> command to enable the "
8347
"new settings in the configuration file:"
8350
#: serverguide/C/security.xml:729(command)
8351
msgid "sudo sysctl -p"
8354
#: serverguide/C/security.xml:733(para)
8356
"IP Masquerading can now be accomplished with a single iptables rule, which "
8357
"may differ slightly based on your network configuration:"
8360
#: serverguide/C/security.xml:736(screen)
8364
"sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o ppp0 -j MASQUERADE\n"
8367
#: serverguide/C/security.xml:739(para)
8369
"The above command assumes that your private address space is 192.168.0.0/16 "
8370
"and that your Internet-facing device is ppp0. The syntax is broken down as "
8374
#: serverguide/C/security.xml:744(para)
8375
msgid "-t nat -- the rule is to go into the nat table"
8378
#: serverguide/C/security.xml:745(para)
8380
"-A POSTROUTING -- the rule is to be appended (-A) to the POSTROUTING chain"
8383
#: serverguide/C/security.xml:746(para)
8385
"-s 192.168.0.0/16 -- the rule applies to traffic originating from the "
8386
"specified address space"
8389
#: serverguide/C/security.xml:747(para)
8391
"-o ppp0 -- the rule applies to traffic scheduled to be routed through the "
8392
"specified network device"
8395
#: serverguide/C/security.xml:749(para)
8397
"-j MASQUERADE -- traffic matching this rule is to \"jump\" (-j) to the "
8398
"MASQUERADE target to be manipulated as described above"
8401
#: serverguide/C/security.xml:757(para)
8403
"Also, each chain in the filter table (the default table, and where most or "
8404
"all packet filtering occurs) has a default <emphasis>policy</emphasis> of "
8405
"ACCEPT, but if you are creating a firewall in addition to a gateway device, "
8406
"you may have set the policies to DROP or REJECT, in which case your "
8407
"masqueraded traffic needs to be allowed through the FORWARD chain for the "
8408
"above rule to work:"
8411
#: serverguide/C/security.xml:764(screen)
8415
"sudo iptables -A FORWARD -s 192.168.0.0/16 -o ppp0 -j ACCEPT\n"
8416
"sudo iptables -A FORWARD -d 192.168.0.0/16 -m state --state "
8417
"ESTABLISHED,RELATED -i ppp0 -j ACCEPT\n"
8420
#: serverguide/C/security.xml:768(para)
8422
"The above commands will allow all connections from your local network to the "
8423
"Internet and all traffic related to those connections to return to the "
8424
"machine that initiated them."
8427
#: serverguide/C/security.xml:775(para)
8429
"If you want masquerading to be enabled on reboot, which you probably do, "
8430
"edit <filename>/etc/rc.local</filename> and add any commands used above. For "
8431
"example add the first command with no filtering:"
8434
#: serverguide/C/security.xml:779(screen)
8438
"iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o ppp0 -j MASQUERADE\n"
8441
#: serverguide/C/security.xml:787(title)
8445
#: serverguide/C/security.xml:788(para)
8447
"Firewall logs are essential for recognizing attacks, troubleshooting your "
8448
"firewall rules, and noticing unusual activity on your network. You must "
8449
"include logging rules in your firewall for them to be generated, though, and "
8450
"logging rules must come before any applicable terminating rule (a rule with "
8451
"a target that decides the fate of the packet, such as ACCEPT, DROP, or "
8455
#: serverguide/C/security.xml:795(para)
8457
"If you are using <application>ufw</application>, you can turn on logging by "
8458
"entering the following in a terminal:"
8461
#: serverguide/C/security.xml:799(command)
8462
msgid "sudo ufw logging on"
8465
#: serverguide/C/security.xml:801(para)
8467
"To turn logging off in <application>ufw</application>, simply replace "
8468
"<emphasis role=\"italic\">on</emphasis> with <emphasis "
8469
"role=\"italic\">off</emphasis> in the above command."
8472
#: serverguide/C/security.xml:804(para)
8474
"If using <application>iptables</application> instead of "
8475
"<application>ufw</application>, enter:"
8478
#: serverguide/C/security.xml:807(screen)
8482
"sudo iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j LOG --log-"
8483
"prefix \"NEW_HTTP_CONN: \"\n"
8486
#: serverguide/C/security.xml:810(para)
8488
"A request on port 80 from the local machine, then, would generate a log in "
8489
"dmesg that looks like this:"
8492
#: serverguide/C/security.xml:815(programlisting)
8495
"[4304885.870000] NEW_HTTP_CONN: IN=lo OUT= "
8496
"MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 "
8497
"LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=58288 DF PROTO=TCP SPT=53981 DPT=80 "
8498
"WINDOW=32767 RES=0x00 SYN URGP=0"
8501
#: serverguide/C/security.xml:817(para)
8503
"The above log will also appear in <filename>/var/log/messages</filename>, "
8504
"<filename>/var/log/syslog</filename>, and "
8505
"<filename>/var/log/kern.log</filename>. This behavior can be modified by "
8506
"editing <filename>/etc/syslog.conf</filename> appropriately or by installing "
8507
"and configuring <application>ulogd</application> and using the ULOG target "
8508
"instead of LOG. The <application>ulogd</application> daemon is a userspace "
8509
"server that listens for logging instructions from the kernel specifically "
8510
"for firewalls, and can log to any file you like, or even to a "
8511
"<application>PostgreSQL</application> or <application>MySQL</application> "
8512
"database. Making sense of your firewall logs can be simplified by using a "
8513
"log analyzing tool such as <application>fwanalog</application>, "
8514
"<application> fwlogwatch</application>, or <application>lire</application>."
8517
#: serverguide/C/security.xml:832(title)
8521
#: serverguide/C/security.xml:833(para)
8523
"There are many tools available to help you construct a complete firewall "
8524
"without intimate knowledge of iptables. For the GUI-inclined:"
8527
#: serverguide/C/security.xml:839(para)
8529
"<ulink url=\"http://www.fs-security.com/\">Firestarter</ulink> is quite "
8530
"popular and easy to use."
8533
#: serverguide/C/security.xml:844(para)
8535
"<ulink url=\"http://www.fwbuilder.org/\">fwbuilder</ulink> is very powerful "
8536
"and will look familiar to an administrator who has used a commercial "
8537
"firewall utility such as <application>Checkpoint FireWall-1</application>."
8540
#: serverguide/C/security.xml:850(para)
8542
"If you prefer a command-line tool with plain-text configuration files:"
8545
#: serverguide/C/security.xml:855(para)
8547
"<ulink url=\"http://www.shorewall.net/\">Shorewall</ulink> is a very "
8548
"powerful solution to help you configure an advanced firewall for any network."
8551
#: serverguide/C/security.xml:861(para)
8553
"<ulink url=\"http://www.linuxkungfu.org/\">ipkungfu</ulink> should give you "
8554
"a working firewall \"out of the box\" with zero configuration, and will "
8555
"allow you to easily set up a more advanced firewall by editing simple, well-"
8556
"documented configuration files."
8559
#: serverguide/C/security.xml:868(para)
8561
"<ulink url=\"http://fireflier.sourceforge.net/\">fireflier</ulink> is "
8562
"designed to be a desktop firewall application. It is made up of a server "
8563
"(fireflier-server) and your choice of GUI clients (GTK or QT), and behaves "
8564
"like many popular interactive firewall applications for Windows."
8567
#: serverguide/C/security.xml:880(para)
8569
"The <ulink url=\"https://wiki.ubuntu.com/UbuntuFirewall\">Ubuntu "
8570
"Firewall</ulink> wiki page contains information on the development of "
8571
"<application>ufw</application>."
8574
#: serverguide/C/security.xml:886(para)
8576
"Also, the <application>ufw</application> manual page contains some very "
8577
"useful information: <command>man ufw</command>."
8580
#: serverguide/C/security.xml:891(para)
8582
"See the <ulink url=\"http://www.netfilter.org/documentation/HOWTO/packet-"
8583
"filtering-HOWTO.html\">packet-filtering-HOWTO</ulink> for more information "
8584
"on using <application>iptables</application>."
8587
#: serverguide/C/security.xml:897(para)
8589
"The <ulink url=\"http://www.netfilter.org/documentation/HOWTO/NAT-"
8590
"HOWTO.html\">nat-HOWTO</ulink> contains further details on masquerading."
8593
#: serverguide/C/security.xml:903(para)
8595
"The <ulink url=\"https://help.ubuntu.com/community/IptablesHowTo\">IPTables "
8596
"HowTo</ulink> in the Ubuntu wiki is a great resource."
8599
#: serverguide/C/security.xml:911(title)
8603
#: serverguide/C/security.xml:912(para)
8605
"<application>AppArmor</application> is a Linux Security Module "
8606
"implementation of name-based mandatory access controls. AppArmor confines "
8607
"individual programs to a set of listed files and posix 1003.1e draft "
8611
#: serverguide/C/security.xml:916(para)
8613
"<application>AppArmor</application> is installed and loaded by default. It "
8614
"uses <emphasis>profiles</emphasis> of an application to determine what files "
8615
"and permissions the application requires. Some packages will install their "
8616
"own profiles, and additional profiles can be found in the "
8617
"<application>apparmor-profiles</application> package."
8620
#: serverguide/C/security.xml:921(para)
8622
"To install the <application>apparmor-profiles</application> package from a "
8626
#: serverguide/C/security.xml:927(para)
8627
msgid "AppArmor profiles have two modes of execution:"
8630
#: serverguide/C/security.xml:932(para)
8632
"Complaining/Learning: profile violations are permitted and logged. Useful "
8633
"for testing and developing new profiles."
8636
#: serverguide/C/security.xml:937(para)
8638
"Enforced/Confined: enforces profile policy as well as logging the violation."
8641
#: serverguide/C/security.xml:943(title)
8642
msgid "Using AppArmor"
8645
#: serverguide/C/security.xml:944(para)
8647
"The <application>apparmor-utils</application> package contains command line "
8648
"utilities that you can use to change the <application>AppArmor</application> "
8649
"execution mode, find the status of a profile, create new profiles, etc."
8652
#: serverguide/C/security.xml:950(para)
8654
"<application>apparmor_status</application> is used to view the current "
8655
"status of AppArmor profiles."
8658
#: serverguide/C/security.xml:954(command)
8659
msgid "sudo apparmor_status"
8662
#: serverguide/C/security.xml:958(para)
8664
"<application>aa-complain</application> places a profile into "
8665
"<emphasis>complain</emphasis> mode."
8668
#: serverguide/C/security.xml:962(command)
8669
msgid "sudo aa-complain /path/to/bin"
8672
#: serverguide/C/security.xml:966(para)
8674
"<application>aa-enforce</application> places a profile into "
8675
"<emphasis>enforce</emphasis> mode."
8678
#: serverguide/C/security.xml:970(command)
8679
msgid "sudo aa-enforce /path/to/bin"
8682
#: serverguide/C/security.xml:974(para)
8684
"The <filename>/etc/apparmor.d</filename> directory is where the AppArmor "
8685
"profiles are located. It can be used to manipulate the "
8686
"<emphasis>mode</emphasis> of all profiles."
8689
#: serverguide/C/security.xml:978(para)
8690
msgid "Enter the following to place all profiles into complain mode:"
8693
#: serverguide/C/security.xml:982(command)
8694
msgid "sudo aa-complain /etc/apparmor.d/*"
8697
#: serverguide/C/security.xml:984(para)
8698
msgid "To place all profiles in enforce mode:"
8701
#: serverguide/C/security.xml:988(command)
8702
msgid "sudo aa-enforce /etc/apparmor.d/*"
8705
#: serverguide/C/security.xml:992(para)
8707
"<application>apparmor_parser</application> is used to load a profile into "
8708
"the kernel. It can also be used to reload a currently loaded profile using "
8709
"the <emphasis>-r</emphasis> option. To load a profile:"
8712
#: serverguide/C/security.xml:997(command) serverguide/C/security.xml:1029(command)
8713
msgid "cat /etc/apparmor.d/profile.name | sudo apparmor_parser -a"
8716
#: serverguide/C/security.xml:999(para)
8717
msgid "To reload a profile:"
8720
#: serverguide/C/security.xml:1003(command)
8721
msgid "cat /etc/apparmor.d/profile.name | sudo apparmor_parser -r"
8724
#: serverguide/C/security.xml:1007(para)
8726
"<filename>/etc/init.d/apparmor</filename> can be used to "
8727
"<emphasis>reload</emphasis> all profiles:"
8730
#: serverguide/C/security.xml:1011(command) serverguide/C/network-auth.xml:632(command)
8731
msgid "sudo /etc/init.d/apparmor reload"
8734
#: serverguide/C/security.xml:1015(para)
8736
"The <filename>/etc/apparmor.d/disable</filename> directory can be used along "
8737
"with the <application>apparmor_parser -R</application> option to "
8738
"<emphasis>disable</emphasis> a profile."
8741
#: serverguide/C/security.xml:1020(command)
8742
msgid "sudo ln -s /etc/apparmor.d/profile.name /etc/apparmor.d/disable/"
8745
#: serverguide/C/security.xml:1021(command)
8746
msgid "sudo apparmor_parser -R /etc/apparmor.d/profile.name"
8749
#: serverguide/C/security.xml:1023(para)
8751
"To <emphasis>re-enable</emphasis> a disabled profile remove the symbolic "
8752
"link to the profile in <filename>/etc/apparmor.d/disable/</filename>. Then "
8753
"load the profile using the <emphasis>-a</emphasis> option."
8756
#: serverguide/C/security.xml:1028(command)
8757
msgid "sudo rm /etc/apparmor.d/disable/profile.name"
8760
#: serverguide/C/security.xml:1033(para)
8762
"<application>AppArmor</application> can be disabled, and the kernel module "
8763
"unloaded by entering the following:"
8766
#: serverguide/C/security.xml:1037(command)
8767
msgid "sudo /etc/init.d/apparmor stop"
8770
#: serverguide/C/security.xml:1038(command)
8771
msgid "sudo update-rc.d -f apparmor remove"
8774
#: serverguide/C/security.xml:1042(para)
8775
msgid "To re-enable <application>AppArmor</application> enter:"
8778
#: serverguide/C/security.xml:1046(command)
8779
msgid "sudo /etc/init.d/apparmor start"
8782
#: serverguide/C/security.xml:1047(command)
8783
msgid "sudo update-rc.d apparmor defaults"
8786
#: serverguide/C/security.xml:1052(para)
8788
"Replace <emphasis>profile.name</emphasis> with the name of the profile you "
8789
"want to manipulate. Also, replace <filename>/path/to/bin/</filename> with "
8790
"the actual executable file path. For example for the "
8791
"<application>ping</application> command use <filename>/bin/ping</filename>"
8794
#: serverguide/C/security.xml:1060(title)
8798
#: serverguide/C/security.xml:1061(para)
8800
"<application>AppArmor</application> profiles are simple text files located "
8801
"in <filename>/etc/apparmor.d/</filename>. The files are named after the full "
8802
"path to the executable they profile replacing the \"/\" with \".\". For "
8803
"example <filename>/etc/apparmor.d/bin.ping</filename> is the AppArmor "
8804
"profile for the <filename>/bin/ping</filename> command."
8807
#: serverguide/C/security.xml:1067(para)
8808
msgid "There are two main type of rules used in profiles:"
8811
#: serverguide/C/security.xml:1072(para)
8813
"<emphasis>Path entries:</emphasis> which detail which files an application "
8814
"can access in the file system."
8817
#: serverguide/C/security.xml:1077(para)
8819
"<emphasis>Capability entries:</emphasis> determine what privileges a "
8820
"confined process is allowed to use."
8823
#: serverguide/C/security.xml:1082(para)
8825
"As an example take a look at <filename>/etc/apparmor.d/bin.ping</filename>:"
8828
#: serverguide/C/security.xml:1085(programlisting)
8832
"#include <tunables/global>\n"
8833
"/bin/ping flags=(complain) {\n"
8834
" #include <abstractions/base>\n"
8835
" #include <abstractions/consoles>\n"
8836
" #include <abstractions/nameservice>\n"
8838
" capability net_raw,\n"
8839
" capability setuid,\n"
8840
" network inet raw,\n"
8842
" /bin/ping mixr,\n"
8843
" /etc/modules.conf r,\n"
8847
#: serverguide/C/security.xml:1102(para)
8849
"<emphasis>#include <tunables/global>:</emphasis> include statements "
8850
"from other files. This allows statements pertaining to multiple applications "
8851
"to be placed in a common file."
8854
#: serverguide/C/security.xml:1108(para)
8856
"<emphasis>/bin/ping flags=(complain):</emphasis> path to the profiled "
8857
"program, also setting the mode to <emphasis>complain</emphasis>."
8860
#: serverguide/C/security.xml:1114(para)
8862
"<emphasis>capability net_raw,:</emphasis> allows the application access to "
8863
"the CAP_NET_RAW Posix.1e capability."
8866
#: serverguide/C/security.xml:1119(para)
8868
"<emphasis>/bin/ping mixr,:</emphasis> allows the application read and "
8869
"execute access to the file."
8872
#: serverguide/C/security.xml:1125(para)
8874
"After editing a profile file the profile must be reloaded. See <xref "
8875
"linkend=\"apparmor-usage\"/> for details."
8878
#: serverguide/C/security.xml:1130(title)
8879
msgid "Creating a Profile"
8882
#: serverguide/C/security.xml:1133(para)
8884
"<emphasis>Design a test plan:</emphasis> Try to think about how the "
8885
"application should be exercised. The test plan should be divided into small "
8886
"test cases. Each test case should have a small description and list the "
8890
#: serverguide/C/security.xml:1137(para)
8891
msgid "Some standard test cases are:"
8894
#: serverguide/C/security.xml:1142(para)
8895
msgid "Starting the program."
8898
#: serverguide/C/security.xml:1147(para)
8899
msgid "Stopping the program."
8902
#: serverguide/C/security.xml:1152(para)
8903
msgid "Reloading the program."
8906
#: serverguide/C/security.xml:1157(para)
8907
msgid "Testing all the commands supported by the init script."
8910
#: serverguide/C/security.xml:1164(para)
8912
"<emphasis>Generate the new profile:</emphasis> Use <application>aa-"
8913
"genprof</application> to generate a new profile. From a terminal:"
8916
#: serverguide/C/security.xml:1169(command)
8917
msgid "sudo aa-genprof executable"
8920
#: serverguide/C/security.xml:1171(para)
8921
msgid "For example:"
8924
#: serverguide/C/security.xml:1175(command)
8925
msgid "sudo aa-genprof slapd"
8928
#: serverguide/C/security.xml:1179(para)
8930
"To get your new profile included in the <application>apparmor-"
8931
"profiles</application> package, file a bug in <emphasis>Launchpad</emphasis> "
8932
"against the <ulink "
8933
"url=\"https://bugs.launchpad.net/ubuntu/+source/apparmor/+filebug\">AppArmor<"
8937
#: serverguide/C/security.xml:1186(para)
8938
msgid "Include your test plan and test cases."
8941
#: serverguide/C/security.xml:1191(para)
8942
msgid "Attach your new profile to the bug."
8945
#: serverguide/C/security.xml:1200(title)
8946
msgid "Updating Profiles"
8949
#: serverguide/C/security.xml:1201(para)
8951
"When the program is misbehaving, audit messages are sent to the log files. "
8952
"The program <application>aa-logprof</application> can be used to scan log "
8953
"files for <application>AppArmor</application> audit messages, review them "
8954
"and update the profiles. From a terminal:"
8957
#: serverguide/C/security.xml:1206(command)
8958
msgid "sudo aa-logprof"
8961
#: serverguide/C/security.xml:1214(para)
8964
"url=\"http://www.novell.com/documentation/apparmor/apparmor201_sp10_admin/ind"
8965
"ex.html?page=/documentation/apparmor/apparmor201_sp10_admin/data/book_apparmo"
8966
"r_admin.html\">AppArmor Administration Guide</ulink> for advanced "
8967
"configuration options."
8970
#: serverguide/C/security.xml:1221(para)
8972
"For details using AppArmor with other Ubuntu releases see the <ulink "
8973
"url=\"https://help.ubuntu.com/community/AppArmor\"> AppArmor Community "
8974
"Wiki</ulink> page."
8977
#: serverguide/C/security.xml:1229(para)
8979
"The <ulink url=\"http://en.opensuse.org/AppArmor\">OpenSUSE AppArmor</ulink> "
8980
"page is another introduction to AppArmor."
8983
#: serverguide/C/security.xml:1236(para)
8985
"A great place to ask for <application>AppArmor</application> assistance, and "
8986
"get involved with the Ubuntu Server community, is the <emphasis>#ubuntu-"
8987
"server</emphasis> IRC channel on <ulink "
8988
"url=\"http://freenode.net\">freenode</ulink>."
8991
#: serverguide/C/security.xml:1246(title)
8992
msgid "Certificates"
8995
#: serverguide/C/security.xml:1247(para)
8997
"One of the most common forms of cryptography today is <emphasis>public-"
8998
"key</emphasis> cryptography. Public-key cryptography utilizes a "
8999
"<emphasis>public key</emphasis> and a <emphasis>private key</emphasis>. The "
9000
"system works by <emphasis>encrypting</emphasis> information using the public "
9001
"key. The information can then only be <emphasis>decrypted</emphasis> using "
9005
#: serverguide/C/security.xml:1253(para)
9007
"A common use for public-key cryptography is encrypting application traffic "
9008
"using a Secure Socket Layer (SSL) or Transport Layer Security (TLS) "
9009
"connection. For example, configuring Apache to provide "
9010
"<emphasis>HTTPS</emphasis>, the HTTP protocol over SSL. This allows a way to "
9011
"encrypt traffic using a protocol that does not itself provide encryption."
9014
#: serverguide/C/security.xml:1258(para)
9016
"A <emphasis>Certificate</emphasis> is a method used to distribute a "
9017
"<emphasis>public key</emphasis> and other information about a server and the "
9018
"organization who is responsible for it. Certificates can be digitally signed "
9019
"by a <emphasis>Certification Authority</emphasis> or CA. A CA is a trusted "
9020
"third party that has confirmed that the information contained in the "
9021
"certificate is accurate."
9024
#: serverguide/C/security.xml:1265(title)
9025
msgid "Types of Certificates"
9028
#: serverguide/C/security.xml:1266(para)
9030
"To set up a secure server using public-key cryptography, in most cases, you "
9031
"send your certificate request (including your public key), proof of your "
9032
"company's identity, and payment to a CA. The CA verifies the certificate "
9033
"request and your identity, and then sends back a certificate for your secure "
9034
"server. Alternatively, you can create your own <emphasis>self-"
9035
"signed</emphasis> certificate."
9038
#: serverguide/C/security.xml:1276(para)
9040
"Note, that self-signed certificates should not be used in most production "
9044
#: serverguide/C/security.xml:1280(para)
9046
"Continuing the HTTPS example, a CA-signed certificate provides two important "
9047
"capabilities that a self-signed certificate does not:"
9050
#: serverguide/C/security.xml:1287(para)
9052
"Browsers (usually) automatically recognize the certificate and allow a "
9053
"secure connection to be made without prompting the user."
9056
#: serverguide/C/security.xml:1294(para)
9058
"When a CA issues a signed certificate, it is guaranteeing the identity of "
9059
"the organization that is providing the web pages to the browser."
9062
#: serverguide/C/security.xml:1302(para)
9064
"Most Web browsers, and computers, that support SSL have a list of CAs whose "
9065
"certificates they automatically accept. If a browser encounters a "
9066
"certificate whose authorizing CA is not in the list, the browser asks the "
9067
"user to either accept or decline the connection. Also, other applications "
9068
"may generate an error message when using a self-singed certificate."
9071
#: serverguide/C/security.xml:1310(para)
9073
"The process of getting a certificate from a CA is fairly easy. A quick "
9074
"overview is as follows:"
9077
#: serverguide/C/security.xml:1317(para)
9078
msgid "Create a private and public encryption key pair."
9081
#: serverguide/C/security.xml:1320(para)
9083
"Create a certificate request based on the public key. The certificate "
9084
"request contains information about your server and the company hosting it."
9087
#: serverguide/C/security.xml:1325(para)
9089
"Send the certificate request, along with documents proving your identity, to "
9090
"a CA. We cannot tell you which certificate authority to choose. Your "
9091
"decision may be based on your past experiences, or on the experiences of "
9092
"your friends or colleagues, or purely on monetary factors."
9095
#: serverguide/C/security.xml:1331(para)
9097
"Once you have decided upon a CA, you need to follow the instructions they "
9098
"provide on how to obtain a certificate from them."
9101
#: serverguide/C/security.xml:1336(para)
9103
"When the CA is satisfied that you are indeed who you claim to be, they send "
9104
"you a digital certificate."
9107
#: serverguide/C/security.xml:1340(para)
9109
"Install this certificate on your secure server, and configure the "
9110
"appropriate applications to use the certificate."
9113
#: serverguide/C/security.xml:1349(title)
9114
msgid "Generating a Certificate Signing Request (CSR)"
9117
#: serverguide/C/security.xml:1351(para)
9119
"Whether you are getting a certificate from a CA or generating your own self-"
9120
"signed certificate, the first step is to generate a key."
9123
#: serverguide/C/security.xml:1356(para)
9125
"If the certificate will be used by service daemons, such as Apache, Postfix, "
9126
"Dovecot, etc, a key without a passphrase is often appropriate. Not having a "
9127
"passphrase allows the services to start without manual intervention, usually "
9128
"the preferred way to start a daemon."
9131
#: serverguide/C/security.xml:1362(para)
9133
"This section will cover generating a key with a passphrase, and one without. "
9134
"The non-passphrase key will then be used to generate a certificate that can "
9135
"be used with various service daemons."
9138
#: serverguide/C/security.xml:1368(para)
9140
"Running your secure service without a passphrase is convenient because you "
9141
"will not need to enter the passphrase every time you start your secure "
9142
"service. But it is insecure and a compromise of the key means a compromise "
9143
"of the server as well."
9146
#: serverguide/C/security.xml:1375(para)
9148
"To generate the <emphasis>keys</emphasis> for the Certificate Signing "
9149
"Request (CSR) run the following command from a terminal prompt:"
9152
#: serverguide/C/security.xml:1381(command)
9153
msgid "openssl genrsa -des3 -out server.key 1024"
9156
#: serverguide/C/security.xml:1384(programlisting)
9160
"Generating RSA private key, 1024 bit long modulus\n"
9161
".....................++++++\n"
9162
".................++++++\n"
9163
"unable to write 'random state'\n"
9164
"e is 65537 (0x10001)\n"
9165
"Enter pass phrase for server.key:\n"
9168
#: serverguide/C/security.xml:1393(para)
9170
"You can now enter your passphrase. For best security, it should at least "
9171
"contain eight characters. The minimum length when specifying -des3 is four "
9172
"characters. It should include numbers and/or punctuation and not be a word "
9173
"in a dictionary. Also remember that your passphrase is case-sensitive."
9176
#: serverguide/C/security.xml:1401(para)
9178
"Re-type the passphrase to verify. Once you have re-typed it correctly, the "
9179
"server key is generated and stored in the <filename>server.key</filename> "
9183
#: serverguide/C/security.xml:1407(para)
9185
"Now create the insecure key, the one without a passphrase, and shuffle the "
9189
#: serverguide/C/security.xml:1413(command)
9190
msgid "openssl rsa -in server.key -out server.key.insecure"
9193
#: serverguide/C/security.xml:1414(command)
9194
msgid "mv server.key server.key.secure"
9197
#: serverguide/C/security.xml:1415(command)
9198
msgid "mv server.key.insecure server.key"
9201
#: serverguide/C/security.xml:1418(para)
9203
"The insecure key is now named <filename>server.key</filename>, and you can "
9204
"use this file to generate the CSR without passphrase."
9207
#: serverguide/C/security.xml:1423(para)
9208
msgid "To create the CSR, run the following command at a terminal prompt:"
9211
#: serverguide/C/security.xml:1428(command)
9212
msgid "openssl req -new -key server.key -out server.csr"
9215
#: serverguide/C/security.xml:1431(para)
9217
"It will prompt you enter the passphrase. If you enter the correct "
9218
"passphrase, it will prompt you to enter Company Name, Site Name, Email Id, "
9219
"etc. Once you enter all these details, your CSR will be created and it will "
9220
"be stored in the <filename>server.csr</filename> file."
9223
#: serverguide/C/security.xml:1439(para)
9225
"You can now submit this CSR file to a CA for processing. The CA will use "
9226
"this CSR file and issue the certificate. On the other hand, you can create "
9227
"self-signed certificate using this CSR."
9230
#: serverguide/C/security.xml:1447(title)
9231
msgid "Creating a Self-Signed Certificate"
9234
#: serverguide/C/security.xml:1448(para)
9236
"To create the self-signed certificate, run the following command at a "
9240
#: serverguide/C/security.xml:1453(command)
9242
"openssl x509 -req -days 365 -in server.csr -signkey server.key -out "
9246
#: serverguide/C/security.xml:1456(para)
9248
"The above command will prompt you to enter the passphrase. Once you enter "
9249
"the correct passphrase, your certificate will be created and it will be "
9250
"stored in the <filename>server.crt</filename> file."
9253
#: serverguide/C/security.xml:1461(para)
9255
"If your secure server is to be used in a production environment, you "
9256
"probably need a CA-signed certificate. It is not recommended to use self-"
9257
"signed certificate."
9260
#: serverguide/C/security.xml:1469(title)
9261
msgid "Installing the Certificate"
9264
#: serverguide/C/security.xml:1471(para)
9266
"You can install the key file <filename>server.key</filename> and certificate "
9267
"file <filename>server.crt</filename>, or the certificate file issued by your "
9268
"CA, by running following commands at a terminal prompt:"
9271
#: serverguide/C/security.xml:1477(command)
9272
msgid "sudo cp server.crt /etc/ssl/certs"
9275
#: serverguide/C/security.xml:1478(command)
9276
msgid "sudo cp server.key /etc/ssl/private"
9279
#: serverguide/C/security.xml:1480(para)
9281
"Now simply configure any applications, with the ability to use public-key "
9282
"cryptography, to use the <emphasis>certificate</emphasis> and "
9283
"<emphasis>key</emphasis> files. For example, "
9284
"<application>Apache</application> can provide HTTPS, "
9285
"<application>Dovecot</application> can provide IMAPS and POP3S, etc."
9288
#: serverguide/C/security.xml:1487(title)
9289
msgid "Certification Authority"
9292
#: serverguide/C/security.xml:1489(para)
9294
"If the services on your network require more than a few self-signed "
9295
"certificates it may be worth the additional effort to setup your own "
9296
"internal <emphasis>Certification Authority (CA)</emphasis>. Using "
9297
"certificates signed by your own CA, allows the various services using the "
9298
"certificates to easily trust other services using certificates issued from "
9302
#: serverguide/C/security.xml:1499(para)
9304
"First, create the directories to hold the CA certificate and related files:"
9307
#: serverguide/C/security.xml:1504(command)
9308
msgid "sudo mkdir /etc/ssl/CA"
9311
#: serverguide/C/security.xml:1505(command)
9312
msgid "sudo mkdir /etc/ssl/newcerts"
9315
#: serverguide/C/security.xml:1511(para)
9317
"The CA needs a few additional files to operate, one to keep track of the "
9318
"last serial number used by the CA, each certificate must have a unique "
9319
"serial number, and another file to record which certificates have been "
9323
#: serverguide/C/security.xml:1518(command)
9324
msgid "sudo sh -c \"echo '01' > /etc/ssl/CA/serial\""
9327
#: serverguide/C/security.xml:1519(command)
9328
msgid "sudo touch /etc/ssl/CA/index.txt"
9331
#: serverguide/C/security.xml:1525(para)
9333
"The third file is a CA configuration file. Though not strictly necessary, it "
9334
"is very convenient when issuing multiple certificates. Edit "
9335
"<filename>/etc/ssl/openssl.cnf</filename>, and in the <emphasis>[ CA_default "
9336
"]</emphasis> change:"
9339
#: serverguide/C/security.xml:1531(programlisting)
9343
"dir = /etc/ssl/ # Where everything is kept\n"
9344
"database = $dir/CA/index.txt # database index file.\n"
9345
"certificate = $dir/certs/cacert.pem # The CA certificate\n"
9346
"serial = $dir/CA/serial # The current serial number\n"
9347
"private_key = $dir/private/cakey.pem# The private key\n"
9350
#: serverguide/C/security.xml:1542(para)
9351
msgid "Next, create the self-singed root certificate:"
9354
#: serverguide/C/security.xml:1547(command)
9356
"openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -"
9360
#: serverguide/C/security.xml:1550(para)
9361
msgid "You will then be asked to enter the details about the certificate."
9364
#: serverguide/C/security.xml:1557(para)
9365
msgid "Now install the root certificate and key:"
9368
#: serverguide/C/security.xml:1562(command)
9369
msgid "sudo mv cakey.pem /etc/ssl/private/"
9372
#: serverguide/C/security.xml:1563(command)
9373
msgid "sudo mv cacert.pem /etc/ssl/certs/"
9376
#: serverguide/C/security.xml:1569(para)
9378
"You are now ready to start signing certificates. The first item needed is a "
9379
"Certificate Signing Request (CSR), see <xref linkend=\"generating-a-csr\"/> "
9380
"for details. Once you have a CSR, enter the following to generate a "
9381
"certificate signed by the CA:"
9384
#: serverguide/C/security.xml:1576(command)
9385
msgid "sudo openssl ca -in server.csr -config /etc/ssl/openssl.cnf"
9388
#: serverguide/C/security.xml:1579(para)
9390
"After entering the password for the CA key, you will be prompted to sign the "
9391
"certificate, and again to commit the new certificate. You should then see a "
9392
"somewhat large amount of output related to the certificate creation."
9395
#: serverguide/C/security.xml:1588(para)
9397
"There should now be a new file, "
9398
"<filename>/etc/ssl/newcerts/01.pem</filename>, containing the same output. "
9399
"Copy and paste everything between the <emphasis>-----BEGIN CERTIFICATE-----"
9400
"</emphasis> and <emphasis>----END CERTIFICATE-----</emphasis> lines to a "
9401
"file named after the hostname of the server where the certificate will be "
9402
"installed. For example <filename>mail.example.com.crt</filename>, is a nice "
9406
#: serverguide/C/security.xml:1596(para)
9408
"Subsequent certificates will be named <filename>02.pem</filename>, "
9409
"<filename>03.pem</filename>, etc."
9412
#: serverguide/C/security.xml:1601(para)
9414
"Replace <emphasis>mail.example.com.crt</emphasis> with your own descriptive "
9418
#: serverguide/C/security.xml:1609(para)
9420
"Finally, copy the new certificate to the host that needs it, and configure "
9421
"the appropriate applications to use it. The default location to install "
9422
"certificates is <filename role=\"directory\">/etc/ssl/certs</filename>. This "
9423
"enables multiple services to use the same certificate without overly "
9424
"complicated file permissions."
9427
#: serverguide/C/security.xml:1615(para)
9429
"For applications that can be configured to use a CA certificate, you should "
9430
"also copy the <filename>/etc/ssl/certs/cacert.pem</filename> file to the "
9431
"<filename role=\"directory\">/etc/ssl/certs/</filename> directory on each "
9435
#: serverguide/C/security.xml:1629(para)
9437
"For more detailed instructions on using cryptography see the <ulink "
9438
"url=\"http://tldp.org/HOWTO/SSL-Certificates-HOWTO/index.html\">SSL "
9439
"Certificates HOWTO</ulink> by tlpd.org"
9442
#: serverguide/C/security.xml:1635(para)
9444
"<ulink url=\"http://www.pki-page.org/\">The PKI Page</ulink> contains a list "
9445
"of Certificate Authorities."
9448
#: serverguide/C/security.xml:1640(para)
9450
"The Wikipedia <ulink "
9451
"url=\"http://en.wikipedia.org/wiki/Https\">HTTPS</ulink> page has more "
9452
"information regarding HTTPS."
9455
#: serverguide/C/security.xml:1645(para)
9457
"For more information on <emphasis>OpenSSL</emphasis> see the <ulink "
9458
"url=\"http://www.openssl.org/\">OpenSSL Home Page</ulink>."
9461
#: serverguide/C/security.xml:1650(para)
9463
"Also, O'Reilly's <ulink "
9464
"url=\"http://oreilly.com/catalog/9780596002701/\">Network Security with "
9465
"OpenSSL</ulink> is a good in depth reference."
9468
#: serverguide/C/security.xml:1659(title)
9472
#: serverguide/C/security.xml:1661(para)
9474
"<emphasis>eCryptfs</emphasis> is a POSIX-compliant enterprise-class stacked "
9475
"cryptographic filesystem for Linux. Layering on top of the filesystem layer "
9476
"<emphasis>eCryptfs</emphasis> protects files no matter the underlying "
9477
"filesystem, partition type, etc."
9480
#: serverguide/C/security.xml:1667(para)
9482
"During installation there is an option to encrypt the <filename "
9483
"role=\"directory\">/home</filename> partition. This will automatically "
9484
"configure everything needed to encrypt and mount the partition."
9487
#: serverguide/C/security.xml:1672(para)
9489
"As an example, this section will cover configuring <filename "
9490
"role=\"directory\">/srv</filename> to be encrypted using eCryptfs."
9493
#: serverguide/C/security.xml:1677(title)
9494
msgid "Using eCryptfs"
9497
#: serverguide/C/security.xml:1679(para)
9498
msgid "First, install the necessary packages. From a terminal prompt enter:"
9501
#: serverguide/C/security.xml:1684(command)
9502
msgid "sudo apt-get install ecryptfs-utils"
9505
#: serverguide/C/security.xml:1687(para)
9506
msgid "Now mount the partition to be encrypted:"
9509
#: serverguide/C/security.xml:1692(command)
9510
msgid "sudo mount -t ecryptfs /srv /srv"
9513
#: serverguide/C/security.xml:1695(para)
9515
"You will then be prompted for some details on how "
9516
"<application>ecryptfs</application> should encrypt the data."
9519
#: serverguide/C/security.xml:1699(para)
9521
"To test that files placed in <filename>/srv</filename> are indeed encrypted "
9522
"copy the <filename>/etc/default</filename> folder to "
9523
"<filename>/srv</filename>:"
9526
#: serverguide/C/security.xml:1705(command) serverguide/C/clustering.xml:192(command)
9527
msgid "sudo cp -r /etc/default /srv"
9530
#: serverguide/C/security.xml:1708(para)
9531
msgid "Now unmount <filename>/srv</filename>, and try to view a file:"
9534
#: serverguide/C/security.xml:1713(command) serverguide/C/installation.xml:1138(command) serverguide/C/clustering.xml:200(command)
9535
msgid "sudo umount /srv"
9538
#: serverguide/C/security.xml:1714(command)
9539
msgid "cat /srv/default/cron"
9542
#: serverguide/C/security.xml:1717(para)
9544
"Remounting <filename>/srv</filename> using "
9545
"<application>ecryptfs</application> will make the data viewable once again."
9548
#: serverguide/C/security.xml:1723(title)
9549
msgid "Automatically Mounting Encrypted Partitions"
9552
#: serverguide/C/security.xml:1725(para)
9554
"There are a couple of ways to automatically mount an "
9555
"<application>ecryptfs</application> encrypted filesystem at boot. This "
9556
"example will use a <filename>/root/.ecryptfsrc</filename> file containing "
9557
"mount options, along with a passphrase file residing on a USB key."
9560
#: serverguide/C/security.xml:1731(para)
9561
msgid "First, create <filename>/root/.ecryptfsrc</filename> containing:"
9564
#: serverguide/C/security.xml:1735(programlisting)
9568
"key=passphrase:passphrase_passwd_file=/mnt/usb/passwd_file.txt\n"
9569
"ecryptfs_sig=5826dd62cf81c615\n"
9570
"ecryptfs_cipher=aes\n"
9571
"ecryptfs_key_bytes=16\n"
9572
"ecryptfs_passthrough=n\n"
9573
"ecryptfs_enable_filename_crypto=n\n"
9576
#: serverguide/C/security.xml:1745(para)
9578
"Adjust the <emphasis>ecryptfs_sig</emphasis> to the signature in "
9579
"<filename>/root/.ecryptfs/sig-cache.txt</filename>."
9582
#: serverguide/C/security.xml:1750(para)
9584
"Next, create the <filename>/mnt/usb/passwd_file.txt</filename> passphrase "
9588
#: serverguide/C/security.xml:1754(programlisting)
9592
"passphrase_passwd=[secrets]\n"
9595
#: serverguide/C/security.xml:1758(para)
9596
msgid "Now add the necessary lines to <filename>/etc/fstab</filename>:"
9599
#: serverguide/C/security.xml:1762(programlisting)
9603
"/dev/sdb1 /mnt/usb ext3 ro 0 0\n"
9604
"/srv /srv ecryptfs defaults 0 0\n"
9607
#: serverguide/C/security.xml:1767(para)
9608
msgid "Make sure the USB drive is mounted before the encrypted partition."
9611
#: serverguide/C/security.xml:1771(para)
9613
"Finally, reboot and the <filename>/srv</filename> should be mounted using "
9617
#: serverguide/C/security.xml:1779(para)
9619
"The <application>ecryptfs-utils</application> package includes several other "
9623
#: serverguide/C/security.xml:1785(para)
9625
"<emphasis>ecryptfs-setup-private:</emphasis> creates a "
9626
"<filename>~/Private</filename> directory to contain encrypted information. "
9627
"This utility can be run by unprivileged users to keep data private from "
9628
"other users on the system."
9631
#: serverguide/C/security.xml:1792(para)
9633
"<emphasis>ecryptfs-mount-private and ecryptfs-umount-private:</emphasis> "
9634
"will mount and unmount respectively, a users <filename>~/Private</filename> "
9638
#: serverguide/C/security.xml:1798(para)
9640
"<emphasis>ecryptfs-add-passphrase:</emphasis> adds a new passphrase to the "
9644
#: serverguide/C/security.xml:1803(para)
9646
"<emphasis>ecryptfs-manager:</emphasis> manages "
9647
"<application>eCryptfs</application> objects such as keys."
9650
#: serverguide/C/security.xml:1808(para)
9652
"<emphasis>ecryptfs-stat:</emphasis> allows you to view the "
9653
"<application>ecryptfs</application> meta information for a file."
9656
#: serverguide/C/security.xml:1821(para)
9658
"For more information on eCryptfs see the <ulink "
9659
"url=\"https://launchpad.net/ecryptfs\">Launchpad project page</ulink>."
9662
#: serverguide/C/security.xml:1826(para)
9664
"There is also a <ulink "
9665
"url=\"http://www.linuxjournal.com/article/9400\">Linux Journal</ulink> "
9666
"article covering eCryptfs."
9669
#: serverguide/C/security.xml:1831(para)
9671
"Also, for more <application>ecryptfs</application> options see the <ulink "
9672
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man7/ecryptfs.7.html\">ecr"
9673
"yptfs man page</ulink>."
9676
#: serverguide/C/security.xml:1837(para)
9678
"The <ulink url=\"https://help.ubuntu.com/community/eCryptfs\">eCryptfs "
9679
"Ubuntu Wiki</ulink> page also has more details."
9682
#: serverguide/C/reporting-bugs.xml:13(title)
9686
#: serverguide/C/reporting-bugs.xml:16(title)
9687
msgid "Reporting Bugs in Ubuntu Server Edition"
9690
#: serverguide/C/reporting-bugs.xml:18(para)
9692
"While the Ubuntu Project attempts to release software with as few bugs as "
9693
"possible, they do occur. You can help fix these bugs by reporting ones that "
9694
"you find to the project. The Ubuntu Project uses <ulink "
9695
"url=\"https://launchpad.net/\">Launchpad</ulink> to track its bug reports. "
9696
"In order to file a bug about Ubuntu Server on Launchpad, you will need to "
9697
"<ulink url=\"https://help.launchpad.net/YourAccount/NewAccount\">create an "
9701
#: serverguide/C/reporting-bugs.xml:30(title)
9702
msgid "Reporting Bugs With ubuntu-bug"
9705
#: serverguide/C/reporting-bugs.xml:32(para)
9707
"The preferred way to report a bug is with the <application>ubuntu-"
9708
"bug</application> command. The ubuntu-bug tool gathers information about the "
9709
"system useful to developers in diagnosing the reported problem that will "
9710
"then be included in the bug report filed on Launchpad. Bug reports in Ubuntu "
9711
"need to be filed against a specific software package, thus the name of the "
9712
"package that the bug occurs in needs to be given to ubuntu-bug:"
9715
#: serverguide/C/reporting-bugs.xml:43(command)
9716
msgid "ubuntu-bug PACKAGENAME"
9719
#: serverguide/C/reporting-bugs.xml:46(para)
9721
"For example, to file a bug against the openssh-server package, you would do:"
9724
#: serverguide/C/reporting-bugs.xml:51(command)
9725
msgid "ubuntu-bug openssh-server"
9728
#: serverguide/C/reporting-bugs.xml:54(para)
9730
"You can specify either a binary package or the source package for ubuntu-"
9731
"bug. Again using openssh-server as an example, you could also generate the "
9732
"report against the source package for openssh-server, openssh:"
9735
#: serverguide/C/reporting-bugs.xml:62(command)
9736
msgid "ubuntu-bug openssh"
9739
#: serverguide/C/reporting-bugs.xml:66(para)
9741
"See <xref linkend=\"package-management\"/> for more information about "
9742
"packages in Ubuntu."
9745
#: serverguide/C/reporting-bugs.xml:72(para)
9747
"The ubuntu-bug command will gather information about the system in question, "
9748
"possibly including information specific to the specified package, and then "
9749
"ask you what you would like to do with collected information:"
9752
#: serverguide/C/reporting-bugs.xml:80(command)
9753
msgid "ubuntu-bug postgresql"
9756
#: serverguide/C/reporting-bugs.xml:79(screen)
9760
"<placeholder-1/>\n"
9762
"*** Collecting problem information\n"
9764
"The collected information can be sent to the developers to improve the\n"
9765
"application. This might take a few minutes.\n"
9768
"*** Send problem report to the developers?\n"
9770
"After the problem report has been sent, please fill out the form in the\n"
9771
"automatically opened web browser.\n"
9773
"What would you like to do? Your options are:\n"
9774
" S: Send report (1.7 KiB)\n"
9776
" K: Keep report file for sending later or copying to somewhere else\n"
9778
"Please choose (S/V/K/C):\n"
9781
#: serverguide/C/reporting-bugs.xml:101(para)
9782
msgid "The options available are:"
9785
#: serverguide/C/reporting-bugs.xml:108(para)
9787
"<emphasis role=\"bold\">Send Report</emphasis> Selecting Send Report submits "
9788
"the collected information to Launchpad as part of the the process of filing "
9789
"a bug report. You will be given the opportunity to describe the situation "
9790
"that led up to the occurrance of the bug."
9793
#: serverguide/C/reporting-bugs.xml:115(screen)
9797
"*** Uploading problem information\n"
9799
"The collected information is being sent to the bug tracking system.\n"
9800
"This might take a few minutes.\n"
9803
"*** To continue, you must visit the following URL:\n"
9805
" https://bugs.launchpad.net/ubuntu/+source/postgresql-"
9806
"8.4/+filebug/kc6eSnTLnLxF8u0t3e56EukFeqJ?\n"
9808
"You can launch a browser now, or copy this URL into a browser on another\n"
9812
" 1: Launch a browser now\n"
9814
"Please choose (1/C):\n"
9817
#: serverguide/C/reporting-bugs.xml:135(para)
9819
"If you choose to start a browser, by default the text based web browser "
9820
"<application>w3m</application> will be used to finish filing the bug report. "
9821
"Alternately, you can copy the given URL to a currently running web browser."
9824
#: serverguide/C/reporting-bugs.xml:144(para)
9826
"<emphasis role=\"bold\">View Report</emphasis> Selecting View Report causes "
9827
"the collected information to be displayed to the terminal for review."
9830
#: serverguide/C/reporting-bugs.xml:150(screen)
9834
"Package: postgresql 8.4.2-2\n"
9835
"PackageArchitecture: all\n"
9837
"ProblemType: Bug\n"
9839
" LANG=en_US.UTF-8\n"
9840
" SHELL=/bin/bash\n"
9841
"Uname: Linux 2.6.32-16-server x86_64\n"
9843
" adduser 3.112ubuntu1\n"
9844
" base-files 5.0.0ubuntu10\n"
9845
" base-passwd 3.5.22\n"
9846
" coreutils 7.4-2ubuntu2\n"
9850
#: serverguide/C/reporting-bugs.xml:167(para)
9852
"After viewing the report, you will be brought back to the same menu asking "
9853
"what you would like to do with the report."
9856
#: serverguide/C/reporting-bugs.xml:174(para)
9858
"<emphasis role=\"bold\">Keep Report File</emphasis> Selecting Keep Report "
9859
"File causes the gathered information to be written to a file. This file can "
9860
"then be used to later file a bug report or transferred to a different Ubuntu "
9861
"system for reporting. To submit the report file, simply give it as an "
9862
"argument to the ubuntu-bug command:"
9865
#: serverguide/C/reporting-bugs.xml:189(userinput)
9870
#: serverguide/C/reporting-bugs.xml:192(command)
9871
msgid "ubuntu-bug /tmp/apport.postgresql.v4MQas.apport"
9874
#: serverguide/C/reporting-bugs.xml:183(screen)
9878
"What would you like to do? Your options are:\n"
9879
" S: Send report (1.7 KiB)\n"
9881
" K: Keep report file for sending later or copying to somewhere else\n"
9883
"Please choose (S/V/K/C): <placeholder-1/>\n"
9884
"Problem report file: /tmp/apport.postgresql.v4MQas.apport\n"
9886
"<placeholder-2/>\n"
9888
"*** Send problem report to the developers?\n"
9892
#: serverguide/C/reporting-bugs.xml:200(para)
9894
"<emphasis role=\"bold\">Cancel</emphasis> Selecting Cancel causes the "
9895
"collected information to be discarded."
9898
#: serverguide/C/reporting-bugs.xml:210(title)
9899
msgid "Reporting Application Crashes"
9902
#: serverguide/C/reporting-bugs.xml:212(para)
9904
"The software package that provides the ubuntu-bug utility, "
9905
"<application>apport</application>, can be configured to trigger when "
9906
"applications crash. This is disabled by default, as capturing a crash can be "
9907
"resource intensive depending on how much memory the application that crashed "
9908
"was using as apport captures and processes the core dump."
9911
#: serverguide/C/reporting-bugs.xml:221(para)
9913
"Configuring apport to capture information about crashing applications "
9914
"requires a couple of steps. First, <application>gdb</application> needs to "
9915
"be installed; it is not installed by default in Ubuntu Server Edition."
9918
#: serverguide/C/reporting-bugs.xml:229(command)
9919
msgid "sudo apt-get install gdb"
9922
#: serverguide/C/reporting-bugs.xml:232(para)
9924
"See <xref linkend=\"package-management\"/> for more information about "
9925
"managing packages in Ubuntu."
9928
#: serverguide/C/reporting-bugs.xml:237(para)
9930
"Once you have ensured that gdb is installed, open the file "
9931
"<filename>/etc/default/apport</filename> in your text editor, and change the "
9932
"<emphasis>enabled</emphasis> setting to be <emphasis "
9933
"role=\"bold\">1</emphasis> like so:"
9936
#: serverguide/C/reporting-bugs.xml:244(programlisting)
9940
"# set this to 0 to disable apport, or to 1 to enable it\n"
9941
"# you can temporarily override this with\n"
9942
"# sudo service apport start force_start=1\n"
9943
"enabled=<userinput>1</userinput>\n"
9945
"# set maximum core dump file size (default: 209715200 bytes == 200 MB)\n"
9946
"maxsize=209715200\n"
9949
#: serverguide/C/reporting-bugs.xml:254(para)
9951
"Once you have completed editing <filename>/etc/default/apport</filename>, "
9952
"start the apport service:"
9955
#: serverguide/C/reporting-bugs.xml:261(command)
9956
msgid "sudo start apport"
9959
#: serverguide/C/reporting-bugs.xml:264(para)
9961
"After an application crashes, use the <application>apport-cli</application> "
9962
"command to search for the existing saved crash report information:"
9965
#: serverguide/C/reporting-bugs.xml:271(command)
9969
#: serverguide/C/reporting-bugs.xml:270(screen)
9973
"<placeholder-1/>\n"
9975
"*** dash closed unexpectedly on 2010-03-11 at 21:40:59.\n"
9977
"If you were not doing anything confidential (entering passwords or other\n"
9978
"private information), you can help to improve the application by\n"
9982
"What would you like to do? Your options are:\n"
9983
" R: Report Problem...\n"
9984
" I: Cancel and ignore future crashes of this program version\n"
9986
"Please choose (R/I/C):\n"
9989
#: serverguide/C/reporting-bugs.xml:287(para)
9991
"Selecting <emphasis>Report Problem</emphasis> will walk you through similar "
9992
"steps as when using ubuntu-bug. One important difference is that a crash "
9993
"report will be marked as private when filed on Launchpad, meaning that it "
9994
"will be visible to only a limited set of bug triagers. These triagers will "
9995
"review the gathered data for private information before making the bug "
9996
"report publicly visible."
9999
#: serverguide/C/reporting-bugs.xml:307(para)
10002
"url=\"https://help.ubuntu.com/community/ReportingBugs\">Reporting "
10003
"Bugs</ulink> Ubuntu wiki page."
10006
#: serverguide/C/reporting-bugs.xml:313(para)
10008
"Also, the <ulink url=\"https://wiki.ubuntu.com/Apport\">Apport</ulink> page "
10009
"has some useful information. Though some of it pertains to using a GUI."
10012
#: serverguide/C/remote-administration.xml:13(title)
10013
msgid "Remote Administration"
10016
#: serverguide/C/remote-administration.xml:14(para)
10018
"There are many ways to remotely administer a Linux server. This chapter will "
10019
"cover one of the most popular <application>SSH</application> as well as "
10020
"<application>eBox</application>, a web based administration framework."
10023
#: serverguide/C/remote-administration.xml:23(para)
10025
"This section of the Ubuntu Server Guide introduces a powerful collection of "
10026
"tools for the remote control of networked computers and transfer of data "
10027
"between networked computers, called <emphasis>OpenSSH</emphasis>. You will "
10028
"also learn about some of the configuration settings possible with the "
10029
"OpenSSH server application and how to change them on your Ubuntu system."
10032
#: serverguide/C/remote-administration.xml:30(para)
10034
"OpenSSH is a freely available version of the Secure Shell (SSH) protocol "
10035
"family of tools for remotely controlling a computer or transferring files "
10036
"between computers. Traditional tools used to accomplish these functions, "
10037
"such as <application>telnet</application> or <application>rcp</application>, "
10038
"are insecure and transmit the user's password in cleartext when used. "
10039
"OpenSSH provides a server daemon and client tools to facilitate secure, "
10040
"encrypted remote control and file transfer operations, effectively replacing "
10041
"the legacy tools."
10044
#: serverguide/C/remote-administration.xml:39(para)
10046
"The OpenSSH server component, <application>sshd</application>, listens "
10047
"continuously for client connections from any of the client tools. When a "
10048
"connection request occurs, <application>sshd</application> sets up the "
10049
"correct connection depending on the type of client tool connecting. For "
10050
"example, if the remote computer is connecting with the "
10051
"<application>ssh</application> client application, the OpenSSH server sets "
10052
"up a remote control session after authentication. If a remote user connects "
10053
"to an OpenSSH server with <application>scp</application>, the OpenSSH server "
10054
"daemon initiates a secure copy of files between the server and client after "
10055
"authentication. OpenSSH can use many authentication methods, including plain "
10056
"password, public key, and <application>Kerberos</application> tickets."
10059
#: serverguide/C/remote-administration.xml:53(para)
10061
"Installation of the OpenSSH client and server applications is simple. To "
10062
"install the OpenSSH client applications on your Ubuntu system, use this "
10063
"command at a terminal prompt:"
10066
#: serverguide/C/remote-administration.xml:59(command)
10067
msgid "sudo apt-get install openssh-client"
10070
#: serverguide/C/remote-administration.xml:61(para)
10072
"To install the OpenSSH server application, and related support files, use "
10073
"this command at a terminal prompt:"
10076
#: serverguide/C/remote-administration.xml:66(command)
10077
msgid "sudo apt-get install openssh-server"
10080
#: serverguide/C/remote-administration.xml:68(para)
10082
"The <application>openssh-server</application> package can also be selected "
10083
"to install during the Server Edition installation process."
10086
#: serverguide/C/remote-administration.xml:75(para)
10088
"You may configure the default behavior of the OpenSSH server application, "
10089
"<application>sshd</application>, by editing the file "
10090
"<filename>/etc/ssh/sshd_config</filename>. For information about the "
10091
"configuration directives used in this file, you may view the appropriate "
10092
"manual page with the following command, issued at a terminal prompt:"
10095
#: serverguide/C/remote-administration.xml:83(command)
10096
msgid "man sshd_config"
10099
#: serverguide/C/remote-administration.xml:85(para)
10101
"There are many directives in the <application>sshd</application> "
10102
"configuration file controlling such things as communication settings and "
10103
"authentication modes. The following are examples of configuration directives "
10104
"that can be changed by editing the <filename>/etc/ssh/sshd_config</filename> "
10108
#: serverguide/C/remote-administration.xml:92(para)
10110
"Prior to editing the configuration file, you should make a copy of the "
10111
"original file and protect it from writing so you will have the original "
10112
"settings as a reference and to reuse as necessary."
10115
#: serverguide/C/remote-administration.xml:96(para)
10117
"Copy the <filename>/etc/ssh/sshd_config</filename> file and protect it from "
10118
"writing with the following commands, issued at a terminal prompt:"
10121
#: serverguide/C/remote-administration.xml:101(command)
10122
msgid "sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original"
10125
#: serverguide/C/remote-administration.xml:102(command)
10126
msgid "sudo chmod a-w /etc/ssh/sshd_config.original"
10129
#: serverguide/C/remote-administration.xml:104(para)
10131
"The following are examples of configuration directives you may change:"
10134
#: serverguide/C/remote-administration.xml:109(para)
10136
"To set your OpenSSH to listen on TCP port 2222 instead of the default TCP "
10137
"port 22, change the Port directive as such:"
10140
#: serverguide/C/remote-administration.xml:113(para)
10144
#: serverguide/C/remote-administration.xml:118(para)
10146
"To have <application>sshd</application> allow public key-based login "
10147
"credentials, simply add or modify the line:"
10150
#: serverguide/C/remote-administration.xml:122(para)
10151
msgid "PubkeyAuthentication yes"
10154
#: serverguide/C/remote-administration.xml:125(para)
10156
"In the <filename>/etc/ssh/sshd_config</filename> file, or if already "
10157
"present, ensure the line is not commented out."
10160
#: serverguide/C/remote-administration.xml:131(para)
10162
"To make your OpenSSH server display the contents of the "
10163
"<filename>/etc/issue.net</filename> file as a pre-login banner, simply add "
10164
"or modify the line:"
10167
#: serverguide/C/remote-administration.xml:136(para)
10168
msgid "Banner /etc/issue.net"
10171
#: serverguide/C/remote-administration.xml:139(para)
10172
msgid "In the <filename>/etc/ssh/sshd_config</filename> file."
10175
#: serverguide/C/remote-administration.xml:144(para)
10177
"After making changes to the <filename>/etc/ssh/sshd_config</filename> file, "
10178
"save the file, and restart the <application>sshd</application> server "
10179
"application to effect the changes using the following command at a terminal "
10183
#: serverguide/C/remote-administration.xml:153(para)
10185
"Many other configuration directives for <application>sshd</application> are "
10186
"available for changing the server application's behavior to fit your needs. "
10187
"Be advised, however, if your only method of access to a server is "
10188
"<application>ssh</application>, and you make a mistake in configuring "
10189
"<application>sshd</application> via the "
10190
"<filename>/etc/ssh/sshd_config</filename> file, you may find you are locked "
10191
"out of the server upon restarting it, or that the "
10192
"<application>sshd</application> server refuses to start due to an incorrect "
10193
"configuration directive, so be extra careful when editing this file on a "
10197
#: serverguide/C/remote-administration.xml:168(title)
10201
#: serverguide/C/remote-administration.xml:169(para)
10203
"SSH <emphasis>keys</emphasis> allow authentication between two hosts without "
10204
"the need of a password. SSH key authentication uses two keys a "
10205
"<emphasis>private</emphasis> key and a <emphasis>public</emphasis> key."
10208
#: serverguide/C/remote-administration.xml:173(para)
10209
msgid "To generate the keys, from a terminal prompt enter:"
10212
#: serverguide/C/remote-administration.xml:177(command)
10213
msgid "ssh-keygen -t dsa"
10216
#: serverguide/C/remote-administration.xml:179(para)
10218
"This will generate the keys using a <emphasis>DSA</emphasis> authentication "
10219
"identity of the user. During the process you will be prompted for a "
10220
"password. Simply hit <emphasis>Enter</emphasis> when prompted to create the "
10224
#: serverguide/C/remote-administration.xml:183(para)
10226
"By default the <emphasis>public</emphasis> key is saved in the file "
10227
"<filename>~/.ssh/id_dsa.pub</filename>, while "
10228
"<filename>~/.ssh/id_dsa</filename> is the <emphasis>private</emphasis> key. "
10229
"Now copy the <filename>id_dsa.pub</filename> file to the remote host and "
10230
"append it to <filename>~/.ssh/authorized_keys</filename> by entering:"
10233
#: serverguide/C/remote-administration.xml:189(command)
10234
msgid "ssh-copy-id username@remotehost"
10237
#: serverguide/C/remote-administration.xml:191(para)
10239
"Finally, double check the permissions on the "
10240
"<filename>authorized_keys</filename> file, only the authenticated user "
10241
"should have read and write permissions. If the permissions are not correct "
10245
#: serverguide/C/remote-administration.xml:196(command)
10246
msgid "chmod 600 .ssh/authorized_keys"
10249
#: serverguide/C/remote-administration.xml:198(para)
10251
"You should now be able to SSH to the host without being prompted for a "
10255
#: serverguide/C/remote-administration.xml:207(para)
10257
"<ulink url=\"https://help.ubuntu.com/community/SSH\">Ubuntu Wiki SSH</ulink> "
10261
#: serverguide/C/remote-administration.xml:213(ulink)
10262
msgid "OpenSSH Website"
10265
#: serverguide/C/remote-administration.xml:218(ulink)
10266
msgid "Advanced OpenSSH Wiki Page"
10269
#: serverguide/C/remote-administration.xml:226(title)
10273
#: serverguide/C/remote-administration.xml:227(para)
10275
"<application>eBox</application> is a web framework used to manage server "
10276
"application configuration. The modular design of eBox allows you to pick and "
10277
"choose which services you want to configure using eBox."
10280
#: serverguide/C/remote-administration.xml:234(para)
10282
"The different <application>eBox</application> modules are split into "
10283
"different packages, allowing you to only install those necessary. One way to "
10284
"view the available packages is to enter the following from a terminal:"
10287
#: serverguide/C/remote-administration.xml:240(command)
10288
msgid "apt-cache rdepends ebox | uniq"
10291
#: serverguide/C/remote-administration.xml:242(para)
10293
"To install the <application>ebox</application> package, which contains the "
10294
"default modules, enter the following:"
10297
#: serverguide/C/remote-administration.xml:247(command)
10298
msgid "sudo apt-get install ebox"
10301
#: serverguide/C/remote-administration.xml:250(para)
10303
"During the installation you will be asked to supply a password for the ebox "
10304
"user. After installing eBox the web interface can be accessed from: "
10305
"<emphasis>https://yourserver/ebox</emphasis>."
10308
#: serverguide/C/remote-administration.xml:259(para)
10310
"An important thing to remember when using <application>eBox</application> is "
10311
"that when configuring most modules there is a <emphasis>Change</emphasis> "
10312
"button that implements the new configuration. After clicking the Change "
10313
"button most, but not all, modules will then need to be "
10314
"<emphasis>Saved</emphasis>. To save the new configuration click on the "
10315
"<quote>Save changes</quote> link in the top right hand corner."
10318
#: serverguide/C/remote-administration.xml:267(para)
10320
"Once you make a change that requires a Save, the link will change from green "
10324
#: serverguide/C/remote-administration.xml:273(title)
10325
msgid "eBox Modules"
10328
#: serverguide/C/remote-administration.xml:274(para)
10330
"By default all eBox <emphasis>Modules</emphasis> are not enabled, and when a "
10331
"new module is installed it will not be automatically enabled."
10334
#: serverguide/C/remote-administration.xml:278(para)
10336
"To enable a disabled module click on the <emphasis>Module status</emphasis> "
10337
"link in the left hand menu. Then <emphasis role=\"italic\">check</emphasis> "
10338
"which modules you would like to enable and click the <quote>Save</quote> "
10342
#: serverguide/C/remote-administration.xml:284(title)
10343
msgid "Default Modules"
10346
#: serverguide/C/remote-administration.xml:285(para)
10348
"This section provides a quick summary of the default "
10349
"<application>eBox</application> modules."
10352
#: serverguide/C/remote-administration.xml:291(para)
10354
"<emphasis>System:</emphasis> contains options allowing configuration of "
10355
"general eBox items."
10358
#: serverguide/C/remote-administration.xml:297(para)
10360
"<emphasis>General:</emphasis> allows you to set the language, port number, "
10361
"and contains a change password form."
10364
#: serverguide/C/remote-administration.xml:303(para)
10366
"<emphasis>Disk Usage:</emphasis> displays a graph detailing information "
10367
"about disk usage."
10370
#: serverguide/C/remote-administration.xml:309(para)
10372
"<emphasis>Backup:</emphasis> is used to backup "
10373
"<application>eBox</application> configuration information, and the "
10374
"<emphasis>Full Backup</emphasis> option allows you to save all eBox "
10375
"information not included in the <emphasis>Configuration</emphasis> option "
10376
"such as log files."
10379
#: serverguide/C/remote-administration.xml:317(para)
10381
"<emphasis>Halt/Reboot:</emphasis> will shutdown the system or reboot it."
10384
#: serverguide/C/remote-administration.xml:322(para)
10386
"<emphasis>Bug Report:</emphasis> creates a file containing details helpful "
10387
"when reporting bugs to the eBox developers."
10390
#: serverguide/C/remote-administration.xml:330(para)
10392
"<emphasis>Logs:</emphasis> allows <application>eBox</application> logs to be "
10393
"queried depending on the purge time configured."
10396
#: serverguide/C/remote-administration.xml:336(para)
10398
"<emphasis>Events:</emphasis> this module has the ability to send alerts "
10399
"through rss, jabber, and log file."
10402
#: serverguide/C/remote-administration.xml:343(emphasis)
10403
msgid "Available Events:"
10406
#: serverguide/C/remote-administration.xml:347(para)
10408
"<emphasis>Free Storage Space:</emphasis> will send alert if free disk space "
10409
"drops below a configured percentage, 10% by default."
10412
#: serverguide/C/remote-administration.xml:353(para)
10414
"<emphasis>Log Observer:</emphasis> sends an alert when a configured logger "
10415
"has logged something."
10418
#: serverguide/C/remote-administration.xml:359(para)
10420
"<emphasis>RAID:</emphasis> will monitor the RAID system and send alerts if "
10421
"any issues arise."
10424
#: serverguide/C/remote-administration.xml:365(para)
10426
"<emphasis>Service:</emphasis> sends alerts if a service restarts multiple "
10427
"times in a short time period."
10430
#: serverguide/C/remote-administration.xml:371(para)
10432
"<emphasis>State:</emphasis> alerts on the state of "
10433
"<application>eBox</application>, either up or down."
10436
#: serverguide/C/remote-administration.xml:380(emphasis)
10437
msgid "Dispatchers:"
10440
#: serverguide/C/remote-administration.xml:384(para)
10442
"<emphasis>Log:</emphasis> this dispatcher will send event messages to the "
10443
"<application>eBox</application> log file "
10444
"<filename>/var/log/ebox/ebox.log</filename>."
10447
#: serverguide/C/remote-administration.xml:391(para)
10449
"<emphasis>Jabber:</emphasis> before enabling this dispatcher you must first "
10450
"configure it by clicking on the <quote>Configure</quote> icon."
10453
#: serverguide/C/remote-administration.xml:397(para)
10455
"<emphasis>RSS:</emphasis> once this dispatcher is configured you can "
10456
"subscribe to the link in order to view event alerts."
10459
#: serverguide/C/remote-administration.xml:410(title)
10460
msgid "Additional Modules"
10463
#: serverguide/C/remote-administration.xml:411(para)
10465
"Here is a quick description of other available "
10466
"<application>eBox</application> modules:"
10469
#: serverguide/C/remote-administration.xml:416(para)
10471
"<emphasis>Network:</emphasis> allows configuration of the server's network "
10472
"options through eBox."
10475
#: serverguide/C/remote-administration.xml:422(para)
10477
"<emphasis>Firewall:</emphasis> configures firewall options for the eBox host."
10480
#: serverguide/C/remote-administration.xml:427(para)
10482
"<emphasis>UsersandGroups:</emphasis> this module will manage users and "
10483
"groups contained in an <application>OpenLDAP</application> LDAP directory."
10486
#: serverguide/C/remote-administration.xml:433(para)
10488
"<emphasis>DHCP:</emphasis> provides an interface for configuring a DHCP "
10492
#: serverguide/C/remote-administration.xml:438(para)
10494
"<emphasis>DNS:</emphasis> provides <application>BIND9</application> DNS "
10495
"server configuration options."
10498
#: serverguide/C/remote-administration.xml:444(para)
10500
"<emphasis>Objects:</emphasis> allow configuration of eBox <emphasis>Network "
10501
"Objects</emphasis>, which allow you to assign a name to an IP address or "
10505
#: serverguide/C/remote-administration.xml:451(para)
10507
"<emphasis>Services:</emphasis> displays configuration information for "
10508
"services that are available to the network."
10511
#: serverguide/C/remote-administration.xml:457(para)
10513
"<emphasis>Squid:</emphasis> configuration options for the "
10514
"<application>Squid</application> proxy server."
10517
#: serverguide/C/remote-administration.xml:463(para)
10519
"<emphasis>CA:</emphasis> configures a Certificate Authority for the server."
10522
#: serverguide/C/remote-administration.xml:468(para)
10523
msgid "<emphasis>NTP:</emphasis> set Network Time Protocol options."
10526
#: serverguide/C/remote-administration.xml:473(para)
10527
msgid "<emphasis>Printers:</emphasis> allows the configuration of printers."
10530
#: serverguide/C/remote-administration.xml:478(para)
10531
msgid "<emphasis>Samba:</emphasis> configuration options for Samba."
10534
#: serverguide/C/remote-administration.xml:483(para)
10536
"<emphasis>OpenVPN:</emphasis> setup options for OpenVPN Virtual Private "
10537
"Network application."
10540
#: serverguide/C/remote-administration.xml:494(para)
10542
"The <ulink url=\"https://help.ubuntu.com/community/eBox\">eBox Ubuntu "
10543
"Wiki</ulink> page has more details."
10546
#: serverguide/C/remote-administration.xml:499(para)
10548
"For more information also see the <ulink url=\"http://ebox-"
10549
"platform.com/\">eBox Home Page</ulink>."
10552
#: serverguide/C/package-management.xml:13(title)
10553
msgid "Package Management"
10556
#: serverguide/C/package-management.xml:14(para)
10558
"Ubuntu features a comprehensive package management system for the "
10559
"installation, upgrade, configuration, and removal of software. In addition "
10560
"to providing access to an organized base of over 24,000 software packages "
10561
"for your Ubuntu computer, the package management facilities also feature "
10562
"dependency resolution capabilities and software update checking."
10565
#: serverguide/C/package-management.xml:16(para)
10567
"Several tools are available for interacting with Ubuntu's package management "
10568
"system, from simple command-line utilities which may be easily automated by "
10569
"system administrators, to a simple graphical interface which is easy to use "
10570
"by those new to Ubuntu."
10573
#: serverguide/C/package-management.xml:21(para)
10575
"Ubuntu's package management system is derived from the same system used by "
10576
"the Debian GNU/Linux distribution. The package files contain all of the "
10577
"necessary files, meta-data, and instructions to implement a particular "
10578
"functionality or software application on your Ubuntu computer."
10581
#: serverguide/C/package-management.xml:24(para)
10583
"Debian package files typically have the extension '.deb', and typically "
10584
"exist in <emphasis role=\"italics\">repositories</emphasis> which are "
10585
"collections of packages found on various media, such as CD-ROM discs, or "
10586
"online. Packages are normally of the pre-compiled binary format; thus "
10587
"installation is quick and requires no compiling of software."
10590
#: serverguide/C/package-management.xml:27(para)
10592
"Many complex packages use the concept of <emphasis "
10593
"role=\"italics\">dependencies</emphasis>. Dependencies are additional "
10594
"packages required by the principal package in order to function properly. "
10595
"For example, the speech synthesis package "
10596
"<application>Festival</application> depends upon the package "
10597
"<application>libasound2</application>, which is a package supplying the "
10598
"<application>ALSA</application> sound library needed for audio playback. In "
10599
"order for <application>Festival</application> to function, it and all of its "
10600
"dependencies must be installed. The software management tools in Ubuntu will "
10601
"do this automatically."
10604
#: serverguide/C/package-management.xml:32(title)
10608
#: serverguide/C/package-management.xml:34(para)
10610
"<application>dpkg</application> is a package manager for "
10611
"<emphasis>Debian</emphasis> based systems. It can install, remove, and build "
10612
"packages, but unlike other package management system's it can not "
10613
"automatically download and install packages and their dependencies. This "
10614
"section covers using <application>dpkg</application> to manage locally "
10615
"installed packages:"
10618
#: serverguide/C/package-management.xml:43(para)
10620
"To list all packages installed on the system, from a terminal prompt enter:"
10623
#: serverguide/C/package-management.xml:48(command)
10627
#: serverguide/C/package-management.xml:54(para)
10629
"Depending on the amount of packages on your system, this can generate a "
10630
"large amount of output. Pipe the output through "
10631
"<application>grep</application> to see if a specific package is installed:"
10634
#: serverguide/C/package-management.xml:60(command)
10635
msgid "dpkg -l | grep apache2"
10638
#: serverguide/C/package-management.xml:63(para)
10640
"Replace <emphasis>apache2</emphasis> with any package name, part of a "
10641
"package name, or other regular expression."
10644
#: serverguide/C/package-management.xml:70(para)
10646
"To list the files installed by a package, in this case the "
10647
"<application>ufw</application> package, enter:"
10650
#: serverguide/C/package-management.xml:75(command)
10651
msgid "dpkg -L ufw"
10654
#: serverguide/C/package-management.xml:81(para)
10656
"If you are not sure which package installed a file, <application>dpkg -"
10657
"S</application> may be able to tell you. For example:"
10660
#: serverguide/C/package-management.xml:87(command)
10661
msgid "dpkg -S /etc/host.conf"
10664
#: serverguide/C/package-management.xml:88(computeroutput)
10666
msgid "base-files: /etc/host.conf"
10669
#: serverguide/C/package-management.xml:91(para)
10671
"The output shows that the <filename>/etc/host.conf</filename> belongs to the "
10672
"<application>base-files</application> package."
10675
#: serverguide/C/package-management.xml:96(para)
10677
"Many files are automatically generated during the package install process, "
10678
"and even though they are on the filesystem <command>dpkg -S</command> may "
10679
"not know which package they belong to."
10682
#: serverguide/C/package-management.xml:105(para)
10683
msgid "You can install a local <emphasis>.deb</emphasis> file by entering:"
10686
#: serverguide/C/package-management.xml:110(command)
10687
msgid "sudo dpkg -i zip_2.32-1_i386.deb"
10690
#: serverguide/C/package-management.xml:113(para)
10692
"Change <filename>zip_2.32-1_i386.deb</filename> to the actual file name of "
10693
"the local .deb file."
10696
#: serverguide/C/package-management.xml:120(para)
10697
msgid "Uninstalling a package can be accomplished by:"
10700
#: serverguide/C/package-management.xml:125(command)
10701
msgid "sudo dpkg -r zip"
10704
#: serverguide/C/package-management.xml:129(para)
10706
"Uninstalling packages using <application>dpkg</application>, in most cases, "
10707
"is <emphasis>NOT</emphasis> recommended. It is better to use a package "
10708
"manager that handles dependencies, to ensure that the system is in a "
10709
"consistent state. For example using <command>dpkg -r</command> you can "
10710
"remove the <application>zip</application> package, but any packages that "
10711
"depend on it will still be installed and may no longer function correctly."
10714
#: serverguide/C/package-management.xml:140(para)
10716
"For more <application>dpkg</application> options see the man page: "
10717
"<command>man dpkg</command>."
10720
#: serverguide/C/package-management.xml:146(title)
10724
#: serverguide/C/package-management.xml:147(para)
10726
"The <application>apt-get</application> command is a powerful command-line "
10727
"tool used to work with Ubuntu's <emphasis>Advanced Packaging Tool</emphasis> "
10728
"(APT) performing such functions as installation of new software packages, "
10729
"upgrade of existing software packages, updating of the package list index, "
10730
"and even upgrading the entire Ubuntu system."
10733
#: serverguide/C/package-management.xml:150(para)
10735
"Being a simple command-line tool, <application>apt-get</application> has "
10736
"numerous advantages over other package management tools available in Ubuntu "
10737
"for server administrators. Some of these advantages include ease of use over "
10738
"simple terminal connections (SSH) and the ability to be used in system "
10739
"administration scripts, which can in turn be automated by the "
10740
"<application>cron</application> scheduling utility."
10743
#: serverguide/C/package-management.xml:157(para)
10745
"<emphasis role=\"bold\">Install a Package</emphasis>: Installation of "
10746
"packages using the <application>apt-get</application> tool is quite simple. "
10747
"For example, to install the network scanner <emphasis "
10748
"role=\"italics\">nmap</emphasis>, type the following: <screen>\n"
10749
"<command>sudo apt-get install nmap</command>\n"
10753
#: serverguide/C/package-management.xml:165(para)
10755
"<emphasis role=\"bold\">Remove a Package</emphasis>: Removal of a package or "
10756
"packages is also a straightforward and simple process. To remove the nmap "
10757
"package installed in the previous example, type the following: <screen>\n"
10758
"<command>sudo apt-get remove nmap</command>\n"
10762
#: serverguide/C/package-management.xml:172(para)
10764
"<emphasis role=\"bold\">Multiple Packages</emphasis>: You may specify "
10765
"multiple packages to be installed or removed, separated by spaces."
10768
#: serverguide/C/package-management.xml:175(para)
10770
"Also, adding the <emphasis>--purge</emphasis> options to <command>apt-get "
10771
"remove</command> will remove the package configuration files as well. This "
10772
"may or may not be the desired effect so use with caution."
10775
#: serverguide/C/package-management.xml:181(para)
10777
"<emphasis role=\"bold\">Update the Package Index</emphasis>: The APT package "
10778
"index is essentially a database of available packages from the repositories "
10779
"defined in the <filename>/etc/apt/sources.list</filename> file. To update "
10780
"the local package index with the latest changes made in repositories, type "
10781
"the following: <screen>\n"
10782
"<command>sudo apt-get update</command>\n"
10786
#: serverguide/C/package-management.xml:189(para)
10788
"<emphasis role=\"bold\">Upgrade Packages</emphasis>: Over time, updated "
10789
"versions of packages currently installed on your computer may become "
10790
"available from the package repositories (for example security updates). To "
10791
"upgrade your system, first update your package index as outlined above, and "
10792
"then type: <screen>\n"
10793
"<command>sudo apt-get upgrade</command>\n"
10797
#: serverguide/C/package-management.xml:195(para)
10799
"For information on upgrading to a new Ubuntu release see <xref "
10800
"linkend=\"installing-upgrading\"/>."
10803
#: serverguide/C/package-management.xml:153(para)
10805
"Some examples of popular uses for the <application>apt-get</application> "
10806
"utility: <placeholder-1/>"
10809
#: serverguide/C/package-management.xml:201(para)
10811
"Actions of the <application>apt-get</application> command, such as "
10812
"installation and removal of packages, are logged in the /var/log/dpkg.log "
10816
#: serverguide/C/package-management.xml:204(para)
10818
"For further information about the use of <application>APT</application>, "
10819
"read the comprehensive <ulink url=\"http://www.debian.org/doc/user-"
10820
"manuals#apt-howto\">Debian APT User Manual</ulink> or type: <screen>apt-get "
10824
#: serverguide/C/package-management.xml:208(title)
10828
#: serverguide/C/package-management.xml:209(para)
10830
"<application>Aptitude</application> is a menu-driven, text-based front-end "
10831
"to the <emphasis>Advanced Packaging Tool</emphasis> (APT) system. Many of "
10832
"the common package management functions, such as installation, removal, and "
10833
"upgrade, are performed in <application>Aptitude</application> with single-"
10834
"key commands, which are typically lowercase letters."
10837
#: serverguide/C/package-management.xml:212(para)
10839
"<application>Aptitude</application> is best suited for use in a non-"
10840
"graphical terminal environment to ensure proper functioning of the command "
10841
"keys. You may start <application>Aptitude</application> as a normal user "
10842
"with the following command at a terminal prompt: <screen>\n"
10843
"<command>sudo aptitude</command>\n"
10847
#: serverguide/C/package-management.xml:219(para)
10849
"When <application>Aptitude</application> starts, you will see a menu bar at "
10850
"the top of the screen and two panes below the menu bar. The top pane "
10851
"contains package categories, such as <emphasis role=\"italics\">New "
10852
"Packages</emphasis> and <emphasis role=\"italics\">Not Installed "
10853
"Packages</emphasis>. The bottom pane contains information related to the "
10854
"packages and package categories."
10857
#: serverguide/C/package-management.xml:222(para)
10859
"Using <application>Aptitude</application> for package management is "
10860
"relatively straightforward, and the user interface makes common tasks simple "
10861
"to perform. The following are examples of common package management "
10862
"functions as performed in <application>Aptitude</application>:"
10865
#: serverguide/C/package-management.xml:226(para)
10867
"<emphasis role=\"bold\">Install Packages</emphasis>: To install a package, "
10868
"locate the package via the Not Installed Packages package category, for "
10869
"example, by using the keyboard arrow keys and the <keycap>ENTER</keycap> "
10870
"key, and highlight the package you wish to install. After highlighting the "
10871
"package you wish to install, press the <keycap>+</keycap> key, and the "
10872
"package entry should turn <emphasis role=\"italics\">green</emphasis>, "
10873
"indicating it has been marked for installation. Now press <keycap>g</keycap> "
10874
"to be presented with a summary of package actions. Press <keycap>g</keycap> "
10875
"again, and you will be prompted to become root to complete the installation. "
10876
"Press <keycap>ENTER</keycap> which will result in a Password: prompt. Enter "
10877
"your user password to become root. Finally, press <keycap>g</keycap> once "
10878
"more and you'll be prompted to download the package. Press "
10879
"<keycap>ENTER</keycap> on the <emphasis role=\"italics\">Continue</emphasis> "
10880
"prompt, and downloading and installation of the package will commence."
10883
#: serverguide/C/package-management.xml:230(para)
10885
"<emphasis role=\"bold\">Remove Packages</emphasis>: To remove a package, "
10886
"locate the package via the Installed Packages package category, for example, "
10887
"by using the keyboard arrow keys and the <keycap>ENTER</keycap> key, and "
10888
"highlight the package you wish to remove. After highlighting the package you "
10889
"wish to install, press the <keycap>-</keycap> key, and the package entry "
10890
"should turn <emphasis role=\"italics\">pink</emphasis>, indicating it has "
10891
"been marked for removal. Now press <keycap>g</keycap> to be presented with a "
10892
"summary of package actions. Press <keycap>g</keycap> again, and you will be "
10893
"prompted to become root to complete the installation. Press "
10894
"<keycap>ENTER</keycap> which will result in a Password: prompt. Enter your "
10895
"user password to become root. Finally, press <keycap>g</keycap> once more, "
10896
"and you'll be prompted to download the package. Press <keycap>ENTER</keycap> "
10897
"on the <emphasis role=\"italics\">Continue</emphasis> prompt, and removal of "
10898
"the package will commence."
10901
#: serverguide/C/package-management.xml:234(para)
10903
"<emphasis role=\"bold\">Update Package Index</emphasis>: To update the "
10904
"package index, simply press the <keycap>u</keycap> key and you will be "
10905
"prompted to become root to complete the update. Press <keycap>ENTER</keycap> "
10906
"which will result in a Password: prompt. Enter your user password to become "
10907
"root. Updating of the package index will commence. Press "
10908
"<keycap>ENTER</keycap> on the OK prompt when the download dialog is "
10909
"presented to complete the process."
10912
#: serverguide/C/package-management.xml:238(para)
10914
"<emphasis role=\"bold\">Upgrade Packages</emphasis>: To upgrade packages, "
10915
"perform the update of the package index as detailed above, and then press "
10916
"the <keycap>U</keycap> key to mark all packages with updates. Now press "
10917
"<keycap>g</keycap> whereby you'll be presented with a summary of package "
10918
"actions. Press <keycap>g</keycap> again, and you will be prompted to become "
10919
"root to complete the installation. Press <keycap>ENTER</keycap> which will "
10920
"result in a Password: prompt. Enter your user password to become root. "
10921
"Finally, press <keycap>g</keycap> once more, and you'll be prompted to "
10922
"download the packages. Press <keycap>ENTER</keycap> on the <emphasis "
10923
"role=\"italics\">Continue</emphasis> prompt, and upgrade of the packages "
10927
#: serverguide/C/package-management.xml:245(para)
10928
msgid "<emphasis role=\"bold\">i</emphasis>: Installed package"
10931
#: serverguide/C/package-management.xml:250(para)
10933
"<emphasis role=\"bold\">c</emphasis>: Package not installed, but package "
10934
"configuration remains on system"
10937
#: serverguide/C/package-management.xml:254(para)
10938
msgid "<emphasis role=\"bold\">p</emphasis>: Purged from system"
10941
#: serverguide/C/package-management.xml:258(para)
10942
msgid "<emphasis role=\"bold\">v</emphasis>: Virtual package"
10945
#: serverguide/C/package-management.xml:262(para)
10946
msgid "<emphasis role=\"bold\">B</emphasis>: Broken package"
10949
#: serverguide/C/package-management.xml:266(para)
10951
"<emphasis role=\"bold\">u</emphasis>: Unpacked files, but package not yet "
10955
#: serverguide/C/package-management.xml:270(para)
10957
"<emphasis role=\"bold\">C</emphasis>: Half-configured - Configuration failed "
10961
#: serverguide/C/package-management.xml:274(para)
10963
"<emphasis role=\"bold\">H</emphasis>: Half-installed - Removal failed and "
10967
#: serverguide/C/package-management.xml:242(para)
10969
"The first column of information displayed in the package list in the top "
10970
"pane, when actually viewing packages lists the current state of the package, "
10971
"and uses the following key to describe the state of the package: "
10975
#: serverguide/C/package-management.xml:280(para)
10977
"To exit Aptitude, simply press the <keycap>q</keycap> key and confirm you "
10978
"wish to exit. Many other functions are available from the Aptitude menu by "
10979
"pressing the <keycap>F10</keycap> key."
10982
#: serverguide/C/package-management.xml:285(title)
10983
msgid "Automatic Updates"
10986
#: serverguide/C/package-management.xml:287(para)
10988
"The <application>unattended-upgrades</application> package can be used to "
10989
"automatically install updated packages, and can be configured to update all "
10990
"packages or just install security updates. First, install the package by "
10991
"entering the following in a terminal:"
10994
#: serverguide/C/package-management.xml:293(command)
10995
msgid "sudo apt-get install unattended-upgrades"
10998
#: serverguide/C/package-management.xml:296(para)
11000
"To configure <application>unattended-upgrades</application>, edit "
11001
"<filename>/etc/apt/apt.conf.d/50unattended-upgrades</filename> and adjust "
11002
"the following to fit your needs:"
11005
#: serverguide/C/package-management.xml:301(programlisting)
11009
"Unattended-Upgrade::Allowed-Origins {\n"
11010
" \"Ubuntu lucid-security\";\n"
11011
"// \"Ubuntu lucid-updates\";\n"
11015
#: serverguide/C/package-management.xml:308(para)
11017
"Certain packages can also be <emphasis>blacklisted</emphasis> and therefore "
11018
"will not be automatically updated. To blacklist a package, add it to the "
11022
#: serverguide/C/package-management.xml:313(programlisting)
11026
"Unattended-Upgrade::Package-Blacklist {\n"
11029
"// \"libc6-dev\";\n"
11030
"// \"libc6-i686\";\n"
11034
#: serverguide/C/package-management.xml:323(para)
11036
"The double <emphasis><quote>//</quote></emphasis> serve as comments, so "
11037
"whatever follows \"//\" will not be evaluated."
11040
#: serverguide/C/package-management.xml:328(para)
11042
"To enable automatic updates, edit "
11043
"<filename>/etc/apt/apt.conf.d/10periodic</filename> and set the appropriate "
11044
"<application>apt</application> configuration options:"
11047
#: serverguide/C/package-management.xml:332(programlisting)
11051
"APT::Periodic::Update-Package-Lists \"1\";\n"
11052
"APT::Periodic::Download-Upgradeable-Packages \"1\";\n"
11053
"APT::Periodic::AutocleanInterval \"7\";\n"
11054
"APT::Periodic::Unattended-Upgrade \"1\";\n"
11057
#: serverguide/C/package-management.xml:339(para)
11059
"The above configuration updates the package list, downloads, and installs "
11060
"available upgrades every day. The local download archive is cleaned every "
11064
#: serverguide/C/package-management.xml:345(para)
11066
"You can read more about <application>apt</application> Periodic "
11067
"configuration options in the <filename>/etc/cron.daily/apt</filename> script "
11071
#: serverguide/C/package-management.xml:350(para)
11073
"The results of <application>unattended-upgrades</application> will be logged "
11074
"to <filename>/var/log/unattended-upgrades</filename>."
11077
#: serverguide/C/package-management.xml:355(title)
11078
msgid "Notifications"
11081
#: serverguide/C/package-management.xml:357(para)
11083
"Configuring <emphasis>Unattended-Upgrade::Mail</emphasis> in "
11084
"<filename>/etc/apt/apt.conf.d/50unattended-upgrades</filename> will enable "
11085
"<application>unattended-upgrades</application> to email an administrator "
11086
"detailing any packages that need upgrading or have problems."
11089
#: serverguide/C/package-management.xml:362(para)
11091
"Another useful package is <application>apticron</application>. "
11092
"<application>apticron</application> will configure a "
11093
"<application>cron</application> job to email an administrator information "
11094
"about any packages on the system that have updates available, as well as a "
11095
"summary of changes in each package."
11098
#: serverguide/C/package-management.xml:368(para)
11100
"To install the <application>apticron</application> package, in a terminal "
11104
#: serverguide/C/package-management.xml:373(command)
11105
msgid "sudo apt-get install apticron"
11108
#: serverguide/C/package-management.xml:376(para)
11110
"Once the package is installed edit "
11111
"<filename>/etc/apticron/apticron.conf</filename>, to set the email address "
11112
"and other options:"
11115
#: serverguide/C/package-management.xml:380(programlisting)
11119
"EMAIL=\"root@example.com\"\n"
11122
#: serverguide/C/package-management.xml:389(para)
11124
"Configuration of the <emphasis>Advanced Packaging Tool</emphasis> (APT) "
11125
"system repositories is stored in the /etc/apt/sources.list configuration "
11126
"file. An example of this file is referenced here, along with information on "
11127
"adding or removing repository references from the file."
11130
#: serverguide/C/package-management.xml:395(para)
11132
"<ulink url=\"../sample/sources.list\">Here</ulink> is a simple example of a "
11133
"typical <filename>/etc/apt/sources.list</filename> file."
11136
#: serverguide/C/package-management.xml:399(para)
11138
"You may edit the file to enable repositories or disable them. For example, "
11139
"to disable the requirement of inserting the Ubuntu CD-ROM whenever package "
11140
"operations occur, simply comment out the appropriate line for the CD-ROM, "
11141
"which appears at the top of the file:"
11144
#: serverguide/C/package-management.xml:404(screen)
11148
"# no more prompting for CD-ROM please\n"
11149
"# deb cdrom:[Ubuntu 10.04_Lucid_Lynx - Release i386 (20070419.1)]/ lucid "
11150
"main restricted\n"
11153
#: serverguide/C/package-management.xml:410(title)
11154
msgid "Extra Repositories"
11157
#: serverguide/C/package-management.xml:411(para)
11159
"In addition to the officially supported package repositories available for "
11160
"Ubuntu, there exist additional community-maintained repositories which add "
11161
"thousands more potential packages for installation. Two of the most popular "
11162
"are the <emphasis>Universe</emphasis> and <emphasis>Multiverse</emphasis> "
11163
"repositories. These repositories are not officially supported by Ubuntu, but "
11164
"because they are maintained by the community they generally provide packages "
11165
"which are safe for use with your Ubuntu computer."
11168
#: serverguide/C/package-management.xml:414(para)
11170
"Packages in the <emphasis>Multiverse</emphasis> repository often have "
11171
"licensing issues that prevent them from being distributed with a free "
11172
"operating system, and they may be illegal in your locality."
11175
#: serverguide/C/package-management.xml:416(para)
11177
"Be advised that neither the <emphasis>Universe</emphasis> or "
11178
"<emphasis>Multiverse</emphasis> repositories contain officially supported "
11179
"packages. In particular, there may not be security updates for these "
11183
#: serverguide/C/package-management.xml:420(para)
11185
"Many other package sources are available, sometimes even offering only one "
11186
"package, as in the case of package sources provided by the developer of a "
11187
"single application. You should always be very careful and cautious when "
11188
"using non-standard package sources, however. Research the source and "
11189
"packages carefully before performing any installation, as some package "
11190
"sources and their packages could render your system unstable or non-"
11191
"functional in some respects."
11194
#: serverguide/C/package-management.xml:423(para)
11196
"By default, the <emphasis>Universe</emphasis> and "
11197
"<emphasis>Multiverse</emphasis> repositories are enabled but if you would "
11198
"like to disable them edit <filename>/etc/apt/sources.list</filename> and "
11199
"comment the following lines:"
11202
#: serverguide/C/package-management.xml:430(programlisting)
11206
"deb http://archive.ubuntu.com/ubuntu lucid universe multiverse\n"
11207
"deb-src http://archive.ubuntu.com/ubuntu lucid universe multiverse\n"
11209
"deb http://us.archive.ubuntu.com/ubuntu/ lucid universe\n"
11210
"deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe\n"
11211
"deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe\n"
11212
"deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe\n"
11214
"deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse\n"
11215
"deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse\n"
11216
"deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse\n"
11217
"deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse\n"
11219
"deb http://security.ubuntu.com/ubuntu lucid-security universe\n"
11220
"deb-src http://security.ubuntu.com/ubuntu lucid-security universe\n"
11221
"deb http://security.ubuntu.com/ubuntu lucid-security multiverse\n"
11222
"deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse\n"
11225
#: serverguide/C/package-management.xml:456(para)
11227
"Most of the material covered in this chapter is available in "
11228
"<application>man</application> pages, many of which are available online."
11231
#: serverguide/C/package-management.xml:463(para)
11234
"url=\"https://help.ubuntu.com/community/InstallingSoftware\">InstallingSoftwa"
11235
"re</ulink> Ubuntu wiki page has more information."
11238
#: serverguide/C/package-management.xml:468(para)
11240
"For more <application>dpkg</application> details see the <ulink "
11241
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man1/dpkg.1.html\">dpkg "
11242
"man page</ulink>."
11245
#: serverguide/C/package-management.xml:474(para)
11247
"The <ulink url=\"http://www.debian.org/doc/manuals/apt-howto/\">APT "
11248
"HOWTO</ulink> and <ulink "
11249
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/apt-get.8.html\">apt-"
11250
"get man page</ulink> contain useful information regarding <application>apt-"
11251
"get</application> usage."
11254
#: serverguide/C/package-management.xml:481(para)
11257
"url=\"http://manpages.ubuntu.com/manpages/lucid/man8/aptitude.8.html\">aptitu"
11258
"de man page</ulink> for more <application>aptitude</application> options."
11261
#: serverguide/C/package-management.xml:487(para)
11264
"url=\"https://help.ubuntu.com/community/Repositories/Ubuntu\">Adding "
11265
"Repositories HOWTO (Ubuntu Wiki)</ulink> page contains more details on "
11266
"adding repositories."
11269
#: serverguide/C/other-apps.xml:13(title)
11270
msgid "Other Useful Applications"
11273
#: serverguide/C/other-apps.xml:15(para)
11275
"There are many very useful applications developed by the Ubuntu Server Team, "
11276
"and others that are well integrated with Ubuntu Server Edition, that might "
11277
"not be well known. This chapter will showcase some useful applications that "
11278
"can make administering an Ubuntu server, or many Ubuntu servers, that much "
11282
#: serverguide/C/other-apps.xml:23(title)
11286
#: serverguide/C/other-apps.xml:25(para)
11288
"When logging into an Ubuntu server you may have noticed the informative "
11289
"Message Of The Day (MOTD). This information is obtained and displayed using "
11290
"a couple of packages:"
11293
#: serverguide/C/other-apps.xml:32(para)
11295
"<emphasis>landscape-common:</emphasis> provides the core libraries of "
11296
"<application>landscape-client</application>, which can be used to manage "
11297
"systems using the web based <emphasis>Landscape</emphasis> application. The "
11298
"package includes the <application>/usr/bin/landscape-sysinfo</application> "
11299
"utility which is used to gather the information displayed in the MOTD."
11302
#: serverguide/C/other-apps.xml:40(para)
11304
"<emphasis>update-notifier-common:</emphasis> is used to automatically update "
11305
"the MOTD via <application>pam_motd</application> module."
11308
#: serverguide/C/other-apps.xml:46(para)
11310
"<application>pam_motd</application> executes the scripts in "
11311
"<filename>/etc/update-motd.d</filename> in order based on the number "
11312
"prepended to the script. The output of the scripts is written to "
11313
"<filename>/var/run/motd</filename>, keeping the numerical order, then "
11314
"concatenated with <filename>/etc/motd.tail</filename>."
11317
#: serverguide/C/other-apps.xml:52(para)
11319
"You can add your own dynamic information to the MOTD. For example, to add "
11320
"local weather information:"
11323
#: serverguide/C/other-apps.xml:58(para)
11324
msgid "First, install the <application>weather-util</application> package:"
11327
#: serverguide/C/other-apps.xml:63(command)
11328
msgid "sudo apt-get install weather-util"
11331
#: serverguide/C/other-apps.xml:68(para)
11333
"The <application>weather</application> utility uses METAR data from the "
11334
"National Oceanic and Atmospheric Administration and forecasts from the "
11335
"National Weather Service. In order to find local information you will need "
11336
"the 4-character ICAO location indicator. This can be determined by browsing "
11337
"to the <ulink url=\"http://www.weather.gov/tg/siteloc.shtml\">National "
11338
"Weather Service</ulink> site."
11341
#: serverguide/C/other-apps.xml:75(para)
11343
"Although the National Weather Service is a United States government agency "
11344
"there are weather stations available world wide. However, local weather "
11345
"information for all locations outside the U.S. may not be available."
11348
#: serverguide/C/other-apps.xml:81(para)
11350
"Create <filename>/usr/local/bin/local-weather</filename>, a simple shell "
11351
"script to use <application>weather</application> with your local ICAO "
11355
#: serverguide/C/other-apps.xml:86(programlisting)
11362
"# Prints the local weather information for the MOTD.\n"
11366
"# Replace KINT with your local weather station.\n"
11367
"# Local stations can be found here: http://www.weather.gov/tg/siteloc.shtml\n"
11370
"weather -i KINT\n"
11375
#: serverguide/C/other-apps.xml:104(para)
11376
msgid "Make the script executable:"
11379
#: serverguide/C/other-apps.xml:109(command)
11380
msgid "sudo chmod 755 /usr/local/bin/local-weather"
11383
#: serverguide/C/other-apps.xml:113(para)
11385
"Next, create a symlink to <filename>/etc/update-motd.d/98-local-"
11386
"weather</filename>:"
11389
#: serverguide/C/other-apps.xml:118(command)
11391
"sudo ln -s /usr/local/bin/local-weather /etc/update-motd.d/98-local-weather"
11394
#: serverguide/C/other-apps.xml:122(para)
11395
msgid "Finally, exit the server and re-login to view the new MOTD."
11398
#: serverguide/C/other-apps.xml:128(para)
11400
"You should now be greeted with some useful information, and some information "
11401
"about the local weather that may not be quite so useful. Hopefully the "
11402
"<application>local-weather</application> example demonstrates the "
11403
"flexibility of <application>pam_motd</application>."
11406
#: serverguide/C/other-apps.xml:136(title)
11410
#: serverguide/C/other-apps.xml:138(para)
11412
"<application>etckeeper</application> allows the contents of <filename "
11413
"role=\"directory\">/etc</filename> be easily stored in Version Control "
11414
"System (VCS) repository. It hooks into <application>apt</application> to "
11415
"automatically commit changes to <filename>/etc</filename> when packages are "
11416
"installed or upgraded. Placing <filename>/etc</filename> under version "
11417
"control is considered an industry best practice, and the goal of "
11418
"<application>etckeeper</application> is to make this process as painless as "
11422
#: serverguide/C/other-apps.xml:146(para)
11424
"Install <application>etckeeper</application> by entering the following in a "
11428
#: serverguide/C/other-apps.xml:151(command)
11429
msgid "sudo apt-get install etckeeper"
11432
#: serverguide/C/other-apps.xml:154(para)
11434
"The main configuration file, "
11435
"<filename>/etc/etckeeper/etckeeper.conf</filename>, is fairly simple. The "
11436
"main option is which VCS to use. By default "
11437
"<application>etckeeper</application> is configured to use "
11438
"<application>bzr</application> for version control. The repository is "
11439
"automatically initialized (and committed for the first time) during package "
11440
"installation. It is possible to undo this by entering the following command:"
11443
#: serverguide/C/other-apps.xml:164(command)
11444
msgid "sudo etckeeper uninit"
11447
#: serverguide/C/other-apps.xml:167(para)
11449
"By default, etckeeper will commit uncommitted changes made to /etc daily. "
11450
"This can be disabled using the AVOID_DAILY_AUTOCOMMITS configuration option. "
11451
"It will also automatically commit changes before and after package "
11452
"installation. For a more precise tracking of changes, it is recommended to "
11453
"commit your changes manually, together with a commit message, using:"
11456
#: serverguide/C/other-apps.xml:176(command)
11457
msgid "sudo etckeeper commit \"..Reason for configuration change..\""
11460
#: serverguide/C/other-apps.xml:179(para)
11462
"Using the VCS commands you can view log information about files in "
11463
"<filename>/etc</filename>:"
11466
#: serverguide/C/other-apps.xml:184(command)
11467
msgid "sudo bzr log /etc/passwd"
11470
#: serverguide/C/other-apps.xml:187(para)
11472
"To demonstrate the integration with the package management system, install "
11473
"<application>postfix</application>:"
11476
#: serverguide/C/other-apps.xml:192(command) serverguide/C/mail.xml:45(command)
11477
msgid "sudo apt-get install postfix"
11480
#: serverguide/C/other-apps.xml:195(para)
11482
"When the installation is finished, all the "
11483
"<application>postfix</application> configuration files should be committed "
11484
"to the repository:"
11487
#: serverguide/C/other-apps.xml:201(computeroutput)
11490
"Committing to: /etc/\n"
11491
"added aliases.db\n"
11493
"modified group-\n"
11494
"modified gshadow\n"
11495
"modified gshadow-\n"
11496
"modified passwd\n"
11497
"modified passwd-\n"
11499
"added resolvconf\n"
11500
"added rsyslog.d\n"
11501
"modified shadow\n"
11502
"modified shadow-\n"
11503
"added init.d/postfix\n"
11504
"added network/if-down.d/postfix\n"
11505
"added network/if-up.d/postfix\n"
11506
"added postfix/dynamicmaps.cf\n"
11507
"added postfix/main.cf\n"
11508
"added postfix/master.cf\n"
11509
"added postfix/post-install\n"
11510
"added postfix/postfix-files\n"
11511
"added postfix/postfix-script\n"
11512
"added postfix/sasl\n"
11513
"added ppp/ip-down.d\n"
11514
"added ppp/ip-down.d/postfix\n"
11515
"added ppp/ip-up.d/postfix\n"
11516
"added rc0.d/K20postfix\n"
11517
"added rc1.d/K20postfix\n"
11518
"added rc2.d/S20postfix\n"
11519
"added rc3.d/S20postfix\n"
11520
"added rc4.d/S20postfix\n"
11521
"added rc5.d/S20postfix\n"
11522
"added rc6.d/K20postfix\n"
11523
"added resolvconf/update-libc.d\n"
11524
"added resolvconf/update-libc.d/postfix\n"
11525
"added rsyslog.d/postfix.conf\n"
11526
"added ufw/applications.d/postfix\n"
11527
"Committed revision 2."
11530
#: serverguide/C/other-apps.xml:241(para)
11532
"For an example of how <application>etckeeper</application> tracks manual "
11533
"changes, add new a host to <filename>/etc/hosts</filename>. Using "
11534
"<application>bzr</application> you can see which files have been modified:"
11537
#: serverguide/C/other-apps.xml:247(command)
11538
msgid "sudo bzr status /etc/"
11541
#: serverguide/C/other-apps.xml:248(computeroutput)
11548
#: serverguide/C/other-apps.xml:252(para)
11549
msgid "Now commit the changes:"
11552
#: serverguide/C/other-apps.xml:257(command)
11553
msgid "sudo etckeeper commit \"new host\""
11556
#: serverguide/C/other-apps.xml:260(para)
11558
"For more information on <application>bzr</application> see <xref "
11559
"linkend=\"bazaar\"/>."
11562
#: serverguide/C/other-apps.xml:266(title)
11566
#: serverguide/C/other-apps.xml:268(para)
11568
"One of the most useful applications for any system administrator is "
11569
"<application>screen</application>. It allows the execution of multiple "
11570
"shells in one terminal. To make some of the advanced "
11571
"<application>screen</application> features more user friendly, and provide "
11572
"some useful information about the system, the "
11573
"<application>byobu</application> package was created."
11576
#: serverguide/C/other-apps.xml:275(para)
11578
"When executing <application>byobu</application> pressing the "
11579
"<emphasis>F9</emphasis> key will bring up the "
11580
"<application>Configuration</application> menu. This menu will allow you to:"
11583
#: serverguide/C/other-apps.xml:281(para)
11584
msgid "View the Help menu"
11587
#: serverguide/C/other-apps.xml:282(para)
11588
msgid "Change Byobu's background color"
11591
#: serverguide/C/other-apps.xml:283(para)
11592
msgid "Change Byobu's foreground color"
11595
#: serverguide/C/other-apps.xml:284(para)
11596
msgid "Toggle status notifications"
11599
#: serverguide/C/other-apps.xml:285(para)
11600
msgid "Change the key binding set"
11603
#: serverguide/C/other-apps.xml:286(para)
11604
msgid "Change the escape sequence"
11607
#: serverguide/C/other-apps.xml:287(para)
11608
msgid "Create new windows"
11611
#: serverguide/C/other-apps.xml:288(para)
11612
msgid "Manage the default windows"
11615
#: serverguide/C/other-apps.xml:289(para)
11616
msgid "Byobu currently does not launch at login (toggle on)"
11619
#: serverguide/C/other-apps.xml:292(para)
11621
"The <emphasis>key bindings</emphasis> determine such things as the escape "
11622
"sequence, new window, change window, etc. There are two key binding sets to "
11623
"choose from <emphasis>f-keys</emphasis> and <emphasis>screen-escape-"
11624
"keys</emphasis>. If you wish to use the original key bindings choose the "
11625
"<emphasis>none</emphasis> set."
11628
#: serverguide/C/other-apps.xml:298(para)
11630
"<application>byobu</application> provides a menu which displays the Ubuntu "
11631
"release, processor information, memory information, and the time and date. "
11632
"The effect is similar to a desktop menu."
11635
#: serverguide/C/other-apps.xml:303(para)
11637
"Using the <emphasis>\"Byobu currently does not launch at login (toggle "
11638
"on)\"</emphasis> option will cause <application>byobu</application> to be "
11639
"executed any time a terminal is opened. Changes made to "
11640
"<application>byobu</application> are on a per user basis, and will not "
11641
"affect other users on the system."
11644
#: serverguide/C/other-apps.xml:309(para)
11646
"One difference when using byobu is the <emphasis>scrollback</emphasis> mode. "
11647
"Press the <emphasis>F7</emphasis> key to enter scrollback mode. Scrollback "
11648
"mode allows you to navigate past output using <emphasis>vi</emphasis> like "
11649
"commands. Here is a quick list of movement commands:"
11652
#: serverguide/C/other-apps.xml:316(para)
11653
msgid "<emphasis>h</emphasis> - Move the cursor left by one character"
11656
#: serverguide/C/other-apps.xml:317(para)
11657
msgid "<emphasis>j</emphasis> - Move the cursor down by one line"
11660
#: serverguide/C/other-apps.xml:318(para)
11661
msgid "<emphasis>k</emphasis> - Move the cursor up by one line"
11664
#: serverguide/C/other-apps.xml:319(para)
11665
msgid "<emphasis>l</emphasis> - Move the cursor right by one character"
11668
#: serverguide/C/other-apps.xml:320(para)
11669
msgid "<emphasis>0</emphasis> - Move to the beginning of the current line"
11672
#: serverguide/C/other-apps.xml:321(para)
11673
msgid "<emphasis>$</emphasis> - Move to the end of the current line"
11676
#: serverguide/C/other-apps.xml:322(para)
11678
"<emphasis>G</emphasis> - Moves to the specified line (defaults to the end of "
11682
#: serverguide/C/other-apps.xml:323(para)
11683
msgid "<emphasis>/</emphasis> - Search forward"
11686
#: serverguide/C/other-apps.xml:324(para)
11687
msgid "<emphasis>?</emphasis> - Search backward"
11690
#: serverguide/C/other-apps.xml:325(para)
11692
"<emphasis>n</emphasis> - Moves to the next match, either forward or backword"
11695
#: serverguide/C/other-apps.xml:334(para)
11698
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man1/update-motd.1.html\">"
11699
"update-motd man page</ulink> for more options available to "
11700
"<application>update-motd</application>."
11703
#: serverguide/C/other-apps.xml:340(para)
11705
"The Debian Package of the Day <ulink "
11706
"url=\"http://debaday.debian.net/2007/10/04/weather-check-weather-conditions-"
11707
"and-forecasts-on-the-command-line/\">weather</ulink> article has more "
11708
"details about using the <application>weather</application>utility."
11711
#: serverguide/C/other-apps.xml:347(para)
11714
"url=\"http://kitenet.net/~joey/code/etckeeper/\">etckeeper</ulink> site for "
11715
"more details on using <application>etckeeper</application>."
11718
#: serverguide/C/other-apps.xml:353(para)
11720
"The <ulink url=\"https://help.ubuntu.com/community/etckeeper\">etckeeper "
11721
"Ubuntu Wiki</ulink> page."
11724
#: serverguide/C/other-apps.xml:358(para)
11726
"For the latest news and information about <application>bzr</application> see "
11727
"the <ulink url=\"http://bazaar-vcs.org/\">bzr</ulink> web site."
11730
#: serverguide/C/other-apps.xml:363(para)
11732
"For more information on <application>screen</application> see the <ulink "
11733
"url=\"http://www.gnu.org/software/screen/\">screen web site</ulink>."
11736
#: serverguide/C/other-apps.xml:368(para)
11738
"And the <ulink url=\"https://help.ubuntu.com/community/Screen\">Ubuntu Wiki "
11739
"screen</ulink> page."
11742
#: serverguide/C/other-apps.xml:373(para)
11744
"Also, see the <application>byobu</application><ulink "
11745
"url=\"https://launchpad.net/byobu\">project page</ulink> for more "
11749
#: serverguide/C/network-config.xml:14(para)
11751
"Networks consist of two or more devices, such as computer systems, printers, "
11752
"and related equipment which are connected by either physical cabling or "
11753
"wireless links for the purpose of sharing and distributing information among "
11754
"the connected devices."
11757
#: serverguide/C/network-config.xml:20(para)
11759
"This section provides general and specific information pertaining to "
11760
"networking, including an overview of network concepts and detailed "
11761
"discussion of popular network protocols."
11764
#: serverguide/C/network-config.xml:27(title)
11765
msgid "Network Configuration"
11768
#: serverguide/C/network-config.xml:28(para)
11770
"Ubuntu ships with a number of graphical utilities to configure your network "
11771
"devices. This document is geared toward server administrators and will focus "
11772
"on managing your network on the command line."
11775
#: serverguide/C/network-config.xml:35(title)
11776
msgid "Ethernet Interfaces"
11779
#: serverguide/C/network-config.xml:36(para)
11781
"Ethernet interfaces are identified by the system using the naming convention "
11782
"of <emphasis role=\"italix\">ethX</emphasis>, where <emphasis "
11783
"role=\"italic\">X</emphasis> represents a numeric value. The first Ethernet "
11784
"interface is typically identified as <emphasis "
11785
"role=\"italic\">eth0</emphasis>, the second as <emphasis "
11786
"role=\"italic\">eth1</emphasis>, and all others should move up in numerical "
11790
#: serverguide/C/network-config.xml:46(title)
11791
msgid "Identify Ethernet Interfaces"
11794
#: serverguide/C/network-config.xml:47(para)
11796
"To quickly identify all available Ethernet interfaces, you can use the "
11797
"<application>ifconfig</application> command as shown below."
11800
#: serverguide/C/network-config.xml:52(userinput)
11802
msgid "ifconfig -a | grep eth"
11805
#: serverguide/C/network-config.xml:51(screen)
11809
"<placeholder-1/>\n"
11810
"eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a\n"
11813
#: serverguide/C/network-config.xml:55(para)
11815
"Another application that can help identify all network interfaces available "
11816
"to your system is the <application>lshw</application> command. In the "
11817
"example below, <application>lshw</application> shows a single Ethernet "
11818
"interface with the logical name of <emphasis role=\"italic\">eth0</emphasis> "
11819
"along with bus information, driver details and all supported capabilities."
11822
#: serverguide/C/network-config.xml:62(userinput)
11824
msgid "sudo lshw -class network"
11827
#: serverguide/C/network-config.xml:61(screen)
11831
"<placeholder-1/>\n"
11833
" description: Ethernet interface\n"
11834
" product: BCM4401-B0 100Base-TX\n"
11835
" vendor: Broadcom Corporation\n"
11836
" physical id: 0\n"
11837
" bus info: pci@0000:03:00.0\n"
11838
" logical name: eth0\n"
11840
" serial: 00:15:c5:4a:16:5a\n"
11842
" capacity: 100MB/s\n"
11843
" width: 32 bits\n"
11845
" capabilities: (snipped for brevity)\n"
11846
" configuration: (snipped for brevity)\n"
11847
" resources: irq:17 memory:ef9fe000-ef9fffff\n"
11850
#: serverguide/C/network-config.xml:83(title)
11851
msgid "Ethernet Interface Logical Names"
11854
#: serverguide/C/network-config.xml:84(para)
11856
"Interface logical names are configured in the file "
11857
"<filename>/etc/udev/rules.d/70-persistent-net.rules.</filename> If you would "
11858
"like control which interface receives a particular logical name, find the "
11859
"line matching the interfaces physical MAC address and modify the value of "
11860
"<emphasis role=\"italic\">NAME=ethX</emphasis> to the desired logical name. "
11861
"Reboot the system to commit your changes."
11864
#: serverguide/C/network-config.xml:92(programlisting)
11868
"SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", "
11869
"ATTR{address}==\"00:15:c5:4a:16:5a\", ATTR{dev_id}==\"0x0\", "
11870
"ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth0\"\n"
11871
"SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", "
11872
"ATTR{address}==\"00:15:c5:4a:16:5b\", ATTR{dev_id}==\"0x0\", "
11873
"ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth1\"\n"
11876
#: serverguide/C/network-config.xml:99(title)
11877
msgid "Ethernet Interface Settings"
11880
#: serverguide/C/network-config.xml:100(para)
11882
"<application>ethtool</application> is a program that displays and changes "
11883
"Ethernet card settings such as auto-negotiation, port speed, duplex mode, "
11884
"and Wake-on-LAN. It is not installed by default, but is available for "
11885
"installation in the repositories."
11888
#: serverguide/C/network-config.xml:106(userinput)
11890
msgid "sudo apt-get install ethtool"
11893
#: serverguide/C/network-config.xml:108(para)
11895
"The following is an example of how to view supported features and configured "
11896
"settings of an Ethernet interface."
11899
#: serverguide/C/network-config.xml:113(userinput)
11901
msgid "sudo ethtool eth0"
11904
#: serverguide/C/network-config.xml:112(screen)
11908
"<placeholder-1/>\n"
11909
"Settings for eth0:\n"
11910
" Supported ports: [ TP ]\n"
11911
" Supported link modes: 10baseT/Half 10baseT/Full \n"
11912
" 100baseT/Half 100baseT/Full \n"
11913
" 1000baseT/Half 1000baseT/Full \n"
11914
" Supports auto-negotiation: Yes\n"
11915
" Advertised link modes: 10baseT/Half 10baseT/Full \n"
11916
" 100baseT/Half 100baseT/Full \n"
11917
" 1000baseT/Half 1000baseT/Full \n"
11918
" Advertised auto-negotiation: Yes\n"
11919
" Speed: 1000Mb/s\n"
11921
" Port: Twisted Pair\n"
11923
" Transceiver: internal\n"
11924
" Auto-negotiation: on\n"
11925
" Supports Wake-on: g\n"
11927
" Current message level: 0x000000ff (255)\n"
11928
" Link detected: yes\n"
11931
#: serverguide/C/network-config.xml:135(para)
11933
"Changes made with the <application>ethtool</application> command are "
11934
"temporary and will be lost after a reboot. If you would like to retain "
11935
"settings, simply add the desired <application>ethtool</application> command "
11936
"to a <emphasis role=\"italic\">pre-up</emphasis> statement in the interface "
11937
"configuration file <filename>/etc/network/interfaces</filename>."
11940
#: serverguide/C/network-config.xml:141(para)
11942
"The following is an example of how the interface identified as <emphasis "
11943
"role=\"italic\">eth0</emphasis> could be permanently configured with a port "
11944
"speed of 1000Mb/s running in full duplex mode."
11947
#: serverguide/C/network-config.xml:145(programlisting)
11952
"iface eth0 inet static\n"
11953
"pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full\n"
11956
#: serverguide/C/network-config.xml:151(para)
11958
"Although the example above shows the interface configured to use the "
11959
"<emphasis role=\"italic\">static</emphasis> method, it actually works with "
11960
"other methods as well, such as DHCP. The example is meant to demonstrate "
11961
"only proper placement of the <emphasis role=\"italic\">pre-up</emphasis> "
11962
"statement in relation to the rest of the interface configuration."
11965
#: serverguide/C/network-config.xml:163(title)
11966
msgid "IP Addressing"
11969
#: serverguide/C/network-config.xml:164(para)
11971
"The following section describes the process of configuring your systems IP "
11972
"address and default gateway needed for communicating on a local area network "
11973
"and the Internet."
11976
#: serverguide/C/network-config.xml:171(title)
11977
msgid "Temporary IP Address Assignment"
11980
#: serverguide/C/network-config.xml:172(para)
11982
"For temporary network configurations, you can use standard commands such as "
11983
"<application>ip</application>, <application>ifconfig</application> and "
11984
"<application>route</application>, which are also found on most other "
11985
"GNU/Linux operating systems. These commands allow you to configure settings "
11986
"which take effect immediately, however they are not persistent and will be "
11987
"lost after a reboot."
11990
#: serverguide/C/network-config.xml:180(para)
11992
"To temporarily configure an IP address, you can use the "
11993
"<application>ifconfig</application> command in the following manner. Just "
11994
"modify the IP address and subnet mask to match your network requirements."
11997
#: serverguide/C/network-config.xml:186(userinput)
11999
msgid "sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0"
12002
#: serverguide/C/network-config.xml:188(para)
12004
"To verify the IP address configuration of <application>eth0</application>, "
12005
"you can use the <application>ifconfig</application> command in the following "
12009
#: serverguide/C/network-config.xml:193(userinput)
12011
msgid "ifconfig eth0"
12014
#: serverguide/C/network-config.xml:192(screen)
12018
"<placeholder-1/>\n"
12019
"eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a \n"
12020
" inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0\n"
12021
" inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link\n"
12022
" UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\n"
12023
" RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0\n"
12024
" TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0\n"
12025
" collisions:0 txqueuelen:1000 \n"
12026
" RX bytes:2574778386 (2.5 GB) TX bytes:1618367329 (1.6 GB)\n"
12030
#: serverguide/C/network-config.xml:204(para)
12032
"To configure a default gateway, you can use the "
12033
"<application>route</application> command in the following manner. Modify the "
12034
"default gateway address to match your network requirements."
12037
#: serverguide/C/network-config.xml:210(userinput)
12039
msgid "sudo route add default gw 10.0.0.1 eth0"
12042
#: serverguide/C/network-config.xml:212(para)
12044
"To verify your default gateway configuration, you can use the "
12045
"<application>route</application> command in the following manner."
12048
#: serverguide/C/network-config.xml:217(userinput)
12053
#: serverguide/C/network-config.xml:216(screen)
12057
"<placeholder-1/>\n"
12058
"Kernel IP routing table\n"
12059
"Destination Gateway Genmask Flags Metric Ref Use "
12061
"10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 "
12063
"0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 "
12067
#: serverguide/C/network-config.xml:223(para)
12069
"If you require DNS for your temporary network configuration, you can add DNS "
12070
"server IP addresses in the file <filename>/etc/resolv.conf</filename>. The "
12071
"example below shows how to enter two DNS servers to "
12072
"<filename>/etc/resolv.conf</filename>, which should be changed to servers "
12073
"appropriate for your network. A more lengthy description of DNS client "
12074
"configuration is in a following section."
12077
#: serverguide/C/network-config.xml:230(programlisting)
12081
"nameserver 8.8.8.8\n"
12082
"nameserver 8.8.4.4\n"
12085
#: serverguide/C/network-config.xml:234(para)
12087
"If you no longer need this configuration and wish to purge all IP "
12088
"configuration from an interface, you can use the "
12089
"<application>ip</application> command with the flush option as shown below."
12092
#: serverguide/C/network-config.xml:240(userinput)
12094
msgid "ip addr flush eth0"
12097
#: serverguide/C/network-config.xml:243(para)
12099
"Flushing the IP configuration using the <application>ip</application> "
12100
"command does not clear the contents of "
12101
"<filename>/etc/resolv.conf</filename>. You must remove or modify those "
12102
"entries manually."
12105
#: serverguide/C/network-config.xml:251(title)
12106
msgid "Dynamic IP Address Assignment (DHCP Client)"
12109
#: serverguide/C/network-config.xml:252(para)
12111
"To configure your server to use DHCP for dynamic address assignment, add the "
12112
"<emphasis role=\"italic\">dhcp</emphasis> method to the inet address family "
12113
"statement for the appropriate interface in the file "
12114
"<filename>/etc/network/interfaces</filename>. The example below assumes you "
12115
"are configuring your first Ethernet interface identified as <emphasis "
12116
"role=\"italic\">eth0</emphasis>."
12119
#: serverguide/C/network-config.xml:259(programlisting)
12124
"iface eth0 inet dhcp\n"
12127
#: serverguide/C/network-config.xml:263(para)
12129
"By adding an interface configuration as shown above, you can manually enable "
12130
"the interface through the <application>ifup</application> command which "
12131
"initiates the DHCP process via <application>dhclient</application>."
12134
#: serverguide/C/network-config.xml:269(userinput) serverguide/C/network-config.xml:304(userinput)
12136
msgid "sudo ifup eth0"
12139
#: serverguide/C/network-config.xml:271(para)
12141
"To manually disable the interface, you can use the "
12142
"<application>ifdown</application> command, which in turn will initiate the "
12143
"DHCP release process and shut down the interface."
12146
#: serverguide/C/network-config.xml:277(userinput) serverguide/C/network-config.xml:311(userinput)
12148
msgid "sudo ifdown eth0"
12151
#: serverguide/C/network-config.xml:282(title)
12152
msgid "Static IP Address Assignment"
12155
#: serverguide/C/network-config.xml:283(para)
12157
"To configure your system to use a static IP address assignment, add the "
12158
"<emphasis role=\"italic\">static</emphasis> method to the inet address "
12159
"family statement for the appropriate interface in the file "
12160
"<filename>/etc/network/interfaces</filename>. The example below assumes you "
12161
"are configuring your first Ethernet interface identified as <emphasis "
12162
"role=\"italic\">eth0</emphasis>. Change the <emphasis "
12163
"role=\"italic\">address</emphasis>, <emphasis "
12164
"role=\"italic\">netmask</emphasis>, and <emphasis "
12165
"role=\"italic\">gateway</emphasis> values to meet the requirements of your "
12169
#: serverguide/C/network-config.xml:292(programlisting)
12174
"iface eth0 inet static\n"
12175
"address 10.0.0.100\n"
12176
"netmask 255.255.255.0\n"
12177
"gateway 10.0.0.1\n"
12180
#: serverguide/C/network-config.xml:299(para)
12182
"By adding an interface configuration as shown above, you can manually enable "
12183
"the interface through the <application>ifup</application> command."
12186
#: serverguide/C/network-config.xml:306(para)
12188
"To manually disable the interface, you can use the "
12189
"<application>ifdown</application> command."
12192
#: serverguide/C/network-config.xml:316(title)
12193
msgid "Loopback Interface"
12196
#: serverguide/C/network-config.xml:317(para)
12198
"The loopback interface is identified by the system as <emphasis "
12199
"role=\"italic\">lo</emphasis> and has a default IP address of 127.0.0.1. It "
12200
"can be viewed using the ifconfig command."
12203
#: serverguide/C/network-config.xml:322(userinput)
12205
msgid "ifconfig lo"
12208
#: serverguide/C/network-config.xml:321(screen)
12212
"<placeholder-1/>\n"
12213
"lo Link encap:Local Loopback \n"
12214
" inet addr:127.0.0.1 Mask:255.0.0.0\n"
12215
" inet6 addr: ::1/128 Scope:Host\n"
12216
" UP LOOPBACK RUNNING MTU:16436 Metric:1\n"
12217
" RX packets:2718 errors:0 dropped:0 overruns:0 frame:0\n"
12218
" TX packets:2718 errors:0 dropped:0 overruns:0 carrier:0\n"
12219
" collisions:0 txqueuelen:0 \n"
12220
" RX bytes:183308 (183.3 KB) TX bytes:183308 (183.3 KB)\n"
12223
#: serverguide/C/network-config.xml:332(para)
12225
"By default, there should be two lines in "
12226
"<filename>/etc/network/interfaces</filename> responsible for automatically "
12227
"configuring your loopback interface. It is recommended that you keep the "
12228
"default settings unless you have a specific purpose for changing them. An "
12229
"example of the two default lines are shown below."
12232
#: serverguide/C/network-config.xml:338(programlisting)
12237
"iface lo inet loopback\n"
12240
#: serverguide/C/network-config.xml:347(title)
12241
msgid "Name Resolution"
12244
#: serverguide/C/network-config.xml:348(para)
12246
"Name resolution as it relates to IP networking is the process of mapping IP "
12247
"addresses to hostnames, making it easier to identify resources on a network. "
12248
"The following section will explain how to properly configure your system for "
12249
"name resolution using DNS and static hostname records."
12252
#: serverguide/C/network-config.xml:356(title)
12253
msgid "DNS Client Configuration"
12256
#: serverguide/C/network-config.xml:357(para)
12258
"To configure your system to use DNS for name resolution, add the IP "
12259
"addresses of the DNS servers that are appropriate for your network in the "
12260
"file <filename>/etc/resolv.conf</filename>. You can also add an optional DNS "
12261
"suffix search-lists to match your network domain names."
12264
#: serverguide/C/network-config.xml:362(para)
12266
"Below is an example of a typical configuration of "
12267
"<filename>/etc/resolv.conf</filename> for a server on the domain \"<emphasis "
12268
"role=\"italic\">example.com</emphasis>\" and using two public DNS servers."
12271
#: serverguide/C/network-config.xml:367(programlisting)
12275
"search example.com\n"
12276
"nameserver 8.8.8.8\n"
12277
"nameserver 8.8.4.4\n"
12280
#: serverguide/C/network-config.xml:372(para)
12282
"The <emphasis role=\"italic\">search</emphasis> option can also be used with "
12283
"multiple domain names so that DNS queries will be appended in the order in "
12284
"which they are entered. For example, your network may have multiple sub-"
12285
"domains to search; a parent domain of <emphasis "
12286
"role=\"italic\">example.com</emphasis>, and two sub-domains, <emphasis "
12287
"role=\"italic\">sales.example.com</emphasis> and <emphasis "
12288
"role=\"italic\">dev.example.com</emphasis>."
12291
#: serverguide/C/network-config.xml:380(para)
12293
"If you have multiple domains you wish to search, your configuration might "
12294
"look like the following."
12297
#: serverguide/C/network-config.xml:383(programlisting)
12301
"search example.com sales.example.com dev.example.com\n"
12302
"nameserver 8.8.8.8\n"
12303
"nameserver 8.8.4.4\n"
12306
#: serverguide/C/network-config.xml:388(para)
12308
"If you try to ping a host with the name of <emphasis "
12309
"role=\"italic\">server1</emphasis>, your system will automatically query DNS "
12310
"for its Fully Qualified Domain Name (FQDN) in the following order:"
12313
#: serverguide/C/network-config.xml:394(para)
12314
msgid "server1<emphasis role=\"bold\">.example.com</emphasis>"
12317
#: serverguide/C/network-config.xml:399(para)
12318
msgid "server1<emphasis role=\"bold\">.sales.example.com</emphasis>"
12321
#: serverguide/C/network-config.xml:404(para)
12322
msgid "server1<emphasis role=\"bold\">.dev.example.com</emphasis>"
12325
#: serverguide/C/network-config.xml:409(para)
12327
"If no matches are found, the DNS server will provide a result of <emphasis "
12328
"role=\"italic\">notfound</emphasis> and the DNS query will fail."
12331
#: serverguide/C/network-config.xml:416(title)
12332
msgid "Static Hostnames"
12335
#: serverguide/C/network-config.xml:417(para)
12337
"Static hostnames are locally defined hostname-to-IP mappings located in the "
12338
"file <filename>/etc/hosts</filename>. Entries in the "
12339
"<filename>hosts</filename> file will have precedence over DNS by default. "
12340
"This means that if your system tries to resolve a hostname and it matches an "
12341
"entry in /etc/hosts, it will not attempt to look up the record in DNS. In "
12342
"some configurations, especially when Internet access is not required, "
12343
"servers that communicate with a limited number of resources can be "
12344
"conveniently set to use static hostnames instead of DNS."
12347
#: serverguide/C/network-config.xml:424(para)
12349
"The following is an example of a <filename>hosts</filename> file where a "
12350
"number of local servers have been identified by simple hostnames, aliases "
12351
"and their equivalent Fully Qualified Domain Names (FQDN's)."
12354
#: serverguide/C/network-config.xml:428(programlisting)
12358
"127.0.0.1\tlocalhost\n"
12359
"127.0.1.1\tubuntu-server\n"
12360
"10.0.0.11\tserver1 vpn server1.example.com\n"
12361
"10.0.0.12\tserver2 mail server2.example.com\n"
12362
"10.0.0.13\tserver3 www server3.example.com\n"
12363
"10.0.0.14\tserver4 file server4.example.com\n"
12366
#: serverguide/C/network-config.xml:437(para)
12368
"In the above example, notice that each of the servers have been given "
12369
"aliases in addition to their proper names and FQDN's. <emphasis "
12370
"role=\"italic\">Server1</emphasis> has been mapped to the name <emphasis "
12371
"role=\"italic\">vpn</emphasis>, <emphasis role=\"italic\">server2</emphasis> "
12372
"is referred to as <emphasis role=\"italic\">mail</emphasis>, <emphasis "
12373
"role=\"italic\">server3</emphasis> as <emphasis "
12374
"role=\"italic\">www</emphasis>, and <emphasis "
12375
"role=\"italic\">server4</emphasis> as <emphasis "
12376
"role=\"italic\">file</emphasis>."
12379
#: serverguide/C/network-config.xml:449(title)
12380
msgid "Name Service Switch Configuration"
12383
#: serverguide/C/network-config.xml:450(para)
12385
"The order in which your system selects a method of resolving hostnames to IP "
12386
"addresses is controlled by the Name Service Switch (NSS) configuration file "
12387
"<filename>/etc/nsswitch.conf</filename>. As mentioned in the previous "
12388
"section, typically static hostnames defined in the systems "
12389
"<filename>/etc/hosts</filename> file have precedence over names resolved "
12390
"from DNS. The following is an example of the line responsible for this order "
12391
"of hostname lookups in the file <filename>/etc/nsswitch.conf</filename>."
12394
#: serverguide/C/network-config.xml:458(programlisting)
12398
"hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4\n"
12401
#: serverguide/C/network-config.xml:464(para)
12403
"<emphasis role=\"bold\">files</emphasis> first tries to resolve static "
12404
"hostnames located in <filename>/etc/hosts</filename>."
12407
#: serverguide/C/network-config.xml:470(para)
12409
"<emphasis role=\"bold\">mdns4_minimal</emphasis> attempts to resolve the "
12410
"name using Multicast DNS."
12413
#: serverguide/C/network-config.xml:475(para)
12415
"<emphasis role=\"bold\">[NOTFOUND=return]</emphasis> means that any response "
12416
"of <emphasis role=\"italic\">notfound</emphasis> by the preceeding <emphasis "
12417
"role=\"italic\">mdns4_minimal</emphasis> process should be treated as "
12418
"authoritative and that the system should not try to continue hunting for an "
12422
#: serverguide/C/network-config.xml:483(para)
12424
"<emphasis role=\"bold\">dns</emphasis> represents a legacy unicast DNS query."
12427
#: serverguide/C/network-config.xml:488(para)
12429
"<emphasis role=\"bold\">mdns4</emphasis> represents a Multicast DNS query."
12432
#: serverguide/C/network-config.xml:494(para)
12434
"To modify the order of the above mentioned name resolution methods, you can "
12435
"simply change the <emphasis role=\"italic\">hosts:</emphasis> string to the "
12436
"value of your choosing. For example, if you prefer to use legacy Unicast DNS "
12437
"versus Multicast DNS, you can change the string in "
12438
"<filename>/etc/nsswitch.conf</filename> as shown below."
12441
#: serverguide/C/network-config.xml:501(programlisting)
12445
"hosts: files dns [NOTFOUND=return] mdns4_minimal mdns4\n"
12448
#: serverguide/C/network-config.xml:508(title)
12452
#: serverguide/C/network-config.xml:510(para)
12454
"Bridging multiple interfaces is a more advanced configuration, but is very "
12455
"useful in multiple scenarios. One scenario is setting up a bridge with "
12456
"multiple network interfaces, then using a firewall to filter traffic between "
12457
"two network segments. Another scenario is using bridge on a system with one "
12458
"interface to allow virtual machines direct access to the outside network. "
12459
"The following example covers the latter scenario."
12462
#: serverguide/C/network-config.xml:517(para)
12464
"Before configuring a bridge you will need to install the <application>bridge-"
12465
"utils</application> package. To install the package, in a terminal enter:"
12468
#: serverguide/C/network-config.xml:523(command)
12469
msgid "sudo apt-get install bridge-utils"
12472
#: serverguide/C/network-config.xml:526(para)
12474
"Next, configure the bridge by editing "
12475
"<filename>/etc/network/interfaces</filename>:"
12478
#: serverguide/C/network-config.xml:530(programlisting)
12483
"iface lo inet loopback\n"
12486
"iface br0 inet static\n"
12487
" address 192.168.0.10\n"
12488
" network 192.168.0.0\n"
12489
" netmask 255.255.255.0\n"
12490
" broadcast 192.168.0.255\n"
12491
" gateway 192.168.0.1\n"
12492
" bridge_ports eth0\n"
12494
" bridge_hello 2\n"
12495
" bridge_maxage 12\n"
12496
" bridge_stp off\n"
12499
#: serverguide/C/network-config.xml:549(para)
12500
msgid "Enter the appropriate values for your physical interface and network."
12503
#: serverguide/C/network-config.xml:554(para)
12504
msgid "Now restart networking to enable the bridge interface:"
12507
#: serverguide/C/network-config.xml:561(para)
12509
"The new bridge interface should now be up and running. The "
12510
"<application>brctl</application> provides useful information about the state "
12511
"of the bridge, controls which interfaces are part of the bridge, etc. See "
12512
"<command>man brctl</command> for more information."
12515
#: serverguide/C/network-config.xml:577(para)
12517
"The <ulink url=\"https://help.ubuntu.com/community/Network\">Ubuntu Wiki "
12518
"Network page</ulink> has links to articles covering more advanced network "
12522
#: serverguide/C/network-config.xml:583(para)
12525
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/interfaces.5.html\">i"
12526
"nterfaces man page</ulink> has details on more options for "
12527
"<filename>/etc/network/interfaces</filename>."
12530
#: serverguide/C/network-config.xml:589(para)
12533
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/dhclient.8.html\">dhc"
12534
"lient man page</ulink> has details on more options for configuring DHCP "
12538
#: serverguide/C/network-config.xml:595(para)
12540
"For more information on DNS client configuration see the <ulink "
12541
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/resolver.5.html\">res"
12542
"olver man page</ulink>. Also, Chapter 6 of O'Reilly's <ulink "
12543
"url=\"http://oreilly.com/catalog/linag2/book/ch06.html\">Linux Network "
12544
"Administrator's Guide</ulink> is a good source of resolver and name service "
12545
"configuration information."
12548
#: serverguide/C/network-config.xml:603(para)
12550
"For more information on <emphasis>bridging</emphasis> see the <ulink "
12551
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/brctl.8.html\">brctl "
12552
"man page</ulink> and the Linux Foundation's <ulink "
12553
"url=\"http://www.linuxfoundation.org/en/Net:Bridge\">Net:Bridge</ulink> page."
12556
#: serverguide/C/network-config.xml:614(title)
12560
#: serverguide/C/network-config.xml:615(para)
12562
"The Transmission Control Protocol and Internet Protocol (TCP/IP) is a "
12563
"standard set of protocols developed in the late 1970s by the Defense "
12564
"Advanced Research Projects Agency (DARPA) as a means of communication "
12565
"between different types of computers and computer networks. TCP/IP is the "
12566
"driving force of the Internet, and thus it is the most popular set of "
12567
"network protocols on Earth."
12570
#: serverguide/C/network-config.xml:623(title)
12571
msgid "TCP/IP Introduction"
12574
#: serverguide/C/network-config.xml:624(para)
12576
"The two protocol components of TCP/IP deal with different aspects of "
12577
"computer networking. <emphasis>Internet Protocol</emphasis>, the \"IP\" of "
12578
"TCP/IP is a connectionless protocol which deals only with network packet "
12579
"routing using the <emphasis role=\"italics\">IP Datagram</emphasis> as the "
12580
"basic unit of networking information. The IP Datagram consists of a header "
12581
"followed by a message. The <emphasis> Transmission Control "
12582
"Protocol</emphasis> is the \"TCP\" of TCP/IP and enables network hosts to "
12583
"establish connections which may be used to exchange data streams. TCP also "
12584
"guarantees that the data between connections is delivered and that it "
12585
"arrives at one network host in the same order as sent from another network "
12589
#: serverguide/C/network-config.xml:637(title)
12590
msgid "TCP/IP Configuration"
12593
#: serverguide/C/network-config.xml:638(para)
12595
"The TCP/IP protocol configuration consists of several elements which must be "
12596
"set by editing the appropriate configuration files, or deploying solutions "
12597
"such as the Dynamic Host Configuration Protocol (DHCP) server which in turn, "
12598
"can be configured to provide the proper TCP/IP configuration settings to "
12599
"network clients automatically. These configuration values must be set "
12600
"correctly in order to facilitate the proper network operation of your Ubuntu "
12604
#: serverguide/C/network-config.xml:650(para)
12606
"<emphasis role=\"bold\">IP address</emphasis> The IP address is a unique "
12607
"identifying string expressed as four decimal numbers ranging from zero (0) "
12608
"to two-hundred and fifty-five (255), separated by periods, with each of the "
12609
"four numbers representing eight (8) bits of the address for a total length "
12610
"of thirty-two (32) bits for the whole address. This format is called "
12611
"<emphasis>dotted quad notation</emphasis>."
12614
#: serverguide/C/network-config.xml:660(para)
12616
"<emphasis role=\"bold\">Netmask</emphasis> The Subnet Mask (or simply, "
12617
"<emphasis>netmask</emphasis>) is a local bit mask, or set of flags which "
12618
"separate the portions of an IP address significant to the network from the "
12619
"bits significant to the <emphasis>subnetwork</emphasis>. For example, in a "
12620
"Class C network, the standard netmask is 255.255.255.0 which masks the first "
12621
"three bytes of the IP address and allows the last byte of the IP address to "
12622
"remain available for specifying hosts on the subnetwork."
12625
#: serverguide/C/network-config.xml:671(para)
12627
"<emphasis role=\"bold\">Network Address</emphasis> The Network Address "
12628
"represents the bytes comprising the network portion of an IP address. For "
12629
"example, the host 12.128.1.2 in a Class A network would use 12.0.0.0 as the "
12630
"network address, where twelve (12) represents the first byte of the IP "
12631
"address, (the network part) and zeroes (0) in all of the remaining three "
12632
"bytes to represent the potential host values. A network host using the "
12633
"private IP address 192.168.1.100 would in turn use a Network Address of "
12634
"192.168.1.0, which specifies the first three bytes of the Class C 192.168.1 "
12635
"network and a zero (0) for all the possible hosts on the network."
12638
#: serverguide/C/network-config.xml:684(para)
12640
"<emphasis role=\"bold\">Broadcast Address</emphasis> The Broadcast Address "
12641
"is an IP address which allows network data to be sent simultaneously to all "
12642
"hosts on a given subnetwork rather than specifying a particular host. The "
12643
"standard general broadcast address for IP networks is 255.255.255.255, but "
12644
"this broadcast address cannot be used to send a broadcast message to every "
12645
"host on the Internet because routers block it. A more appropriate broadcast "
12646
"address is set to match a specific subnetwork. For example, on the private "
12647
"Class C IP network, 192.168.1.0, the broadcast address is 192.168.1.255. "
12648
"Broadcast messages are typically produced by network protocols such as the "
12649
"Address Resolution Protocol (ARP) and the Routing Information Protocol (RIP)."
12652
#: serverguide/C/network-config.xml:697(para)
12654
"<emphasis role=\"bold\">Gateway Address</emphasis> A Gateway Address is the "
12655
"IP address through which a particular network, or host on a network, may be "
12656
"reached. If one network host wishes to communicate with another network "
12657
"host, and that host is not located on the same network, then a "
12658
"<emphasis>gateway</emphasis> must be used. In many cases, the Gateway "
12659
"Address will be that of a router on the same network, which will in turn "
12660
"pass traffic on to other networks or hosts, such as Internet hosts. The "
12661
"value of the Gateway Address setting must be correct, or your system will "
12662
"not be able to reach any hosts beyond those on the same network."
12665
#: serverguide/C/network-config.xml:708(para)
12667
"<emphasis role=\"bold\">Nameserver Address</emphasis> Nameserver Addresses "
12668
"represent the IP addresses of Domain Name Service (DNS) systems, which "
12669
"resolve network hostnames into IP addresses. There are three levels of "
12670
"Nameserver Addresses, which may be specified in order of precedence: The "
12671
"<emphasis>Primary</emphasis> Nameserver, the <emphasis>Secondary</emphasis> "
12672
"Nameserver, and the <emphasis>Tertiary</emphasis> Nameserver. In order for "
12673
"your system to be able to resolve network hostnames into their corresponding "
12674
"IP addresses, you must specify valid Nameserver Addresses which you are "
12675
"authorized to use in your system's TCP/IP configuration. In many cases these "
12676
"addresses can and will be provided by your network service provider, but "
12677
"many free and publicly accessible nameservers are available for use, such as "
12678
"the Level3 (Verizon) servers with IP addresses from 4.2.2.1 to 4.2.2.6."
12681
#: serverguide/C/network-config.xml:722(para)
12683
"The IP address, Netmask, Network Address, Broadcast Address, and Gateway "
12684
"Address are typically specified via the appropriate directives in the file "
12685
"<filename>/etc/network/interfaces</filename>. The Nameserver Addresses are "
12686
"typically specified via <emphasis>nameserver</emphasis> directives in the "
12687
"file <filename>/etc/resolv.conf</filename>. For more information, view the "
12688
"system manual page for <filename>interfaces</filename> or "
12689
"<filename>resolv.conf</filename> respectively, with the following commands "
12690
"typed at a terminal prompt:"
12693
#: serverguide/C/network-config.xml:729(para)
12695
"Access the system manual page for <filename>interfaces</filename> with the "
12696
"following command:"
12699
#: serverguide/C/network-config.xml:734(command)
12700
msgid "man interfaces"
12703
#: serverguide/C/network-config.xml:737(para)
12705
"Access the system manual page for <filename>resolv.conf</filename> with the "
12706
"following command:"
12709
#: serverguide/C/network-config.xml:741(command)
12710
msgid "man resolv.conf"
12713
#: serverguide/C/network-config.xml:646(para)
12715
"The common configuration elements of TCP/IP and their purposes are as "
12716
"follows: <placeholder-1/>"
12719
#: serverguide/C/network-config.xml:748(title)
12723
#: serverguide/C/network-config.xml:749(para)
12725
"IP routing is a means of specifying and discovering paths in a TCP/IP "
12726
"network along which network data may be sent. Routing uses a set of "
12727
"<emphasis>routing tables</emphasis> to direct the forwarding of network data "
12728
"packets from their source to the destination, often via many intermediary "
12729
"network nodes known as <emphasis>routers</emphasis>. There are two primary "
12730
"forms of IP routing: <emphasis>Static Routing</emphasis> and "
12731
"<emphasis>Dynamic Routing.</emphasis>"
12734
#: serverguide/C/network-config.xml:758(para)
12736
"Static routing involves manually adding IP routes to the system's routing "
12737
"table, and this is usually done by manipulating the routing table with the "
12738
"<application>route</application> command. Static routing enjoys many "
12739
"advantages over dynamic routing, such as simplicity of implementation on "
12740
"smaller networks, predictability (the routing table is always computed in "
12741
"advance, and thus the route is precisely the same each time it is used), and "
12742
"low overhead on other routers and network links due to the lack of a dynamic "
12743
"routing protocol. However, static routing does present some disadvantages as "
12744
"well. For example, static routing is limited to small networks and does not "
12745
"scale well. Static routing also fails completely to adapt to network outages "
12746
"and failures along the route due to the fixed nature of the route."
12749
#: serverguide/C/network-config.xml:768(para)
12751
"Dynamic routing depends on large networks with multiple possible IP routes "
12752
"from a source to a destination and makes use of special routing protocols, "
12753
"such as the Router Information Protocol (RIP), which handle the automatic "
12754
"adjustments in routing tables that make dynamic routing possible. Dynamic "
12755
"routing has several advantages over static routing, such as superior "
12756
"scalability and the ability to adapt to failures and outages along network "
12757
"routes. Additionally, there is less manual configuration of the routing "
12758
"tables, since routers learn from one another about their existence and "
12759
"available routes. This trait also eliminates the possibility of introducing "
12760
"mistakes in the routing tables via human error. Dynamic routing is not "
12761
"perfect, however, and presents disadvantages such as heightened complexity "
12762
"and additional network overhead from router communications, which does not "
12763
"immediately benefit the end users, but still consumes network bandwidth."
12766
#: serverguide/C/network-config.xml:782(title)
12767
msgid "TCP and UDP"
12770
#: serverguide/C/network-config.xml:783(para)
12772
"TCP is a connection-based protocol, offering error correction and guaranteed "
12773
"delivery of data via what is known as <emphasis>flow control</emphasis>. "
12774
"Flow control determines when the flow of a data stream needs to be stopped, "
12775
"and previously sent data packets should to be re-sent due to problems such "
12776
"as <emphasis>collisions</emphasis>, for example, thus ensuring complete and "
12777
"accurate delivery of the data. TCP is typically used in the exchange of "
12778
"important information such as database transactions."
12781
#: serverguide/C/network-config.xml:791(para)
12783
"The User Datagram Protocol (UDP), on the other hand, is a "
12784
"<emphasis>connectionless</emphasis> protocol which seldom deals with the "
12785
"transmission of important data because it lacks flow control or any other "
12786
"method to ensure reliable delivery of the data. UDP is commonly used in such "
12787
"applications as audio and video streaming, where it is considerably faster "
12788
"than TCP due to the lack of error correction and flow control, and where the "
12789
"loss of a few packets is not generally catastrophic."
12792
#: serverguide/C/network-config.xml:801(title)
12796
#: serverguide/C/network-config.xml:802(para)
12798
"The Internet Control Messaging Protocol (ICMP) is an extension to the "
12799
"Internet Protocol (IP) as defined in the Request For Comments (RFC) #792 and "
12800
"supports network packets containing control, error, and informational "
12801
"messages. ICMP is used by such network applications as the "
12802
"<application>ping</application> utility, which can determine the "
12803
"availability of a network host or device. Examples of some error messages "
12804
"returned by ICMP which are useful to both network hosts and devices such as "
12805
"routers, include <emphasis>Destination Unreachable</emphasis> and "
12806
"<emphasis>Time Exceeded</emphasis>."
12809
#: serverguide/C/network-config.xml:812(title)
12813
#: serverguide/C/network-config.xml:813(para)
12815
"Daemons are special system applications which typically execute continuously "
12816
"in the background and await requests for the functions they provide from "
12817
"other applications. Many daemons are network-centric; that is, a large "
12818
"number of daemons executing in the background on an Ubuntu system may "
12819
"provide network-related functionality. Some examples of such network daemons "
12820
"include the <emphasis>Hyper Text Transport Protocol Daemon</emphasis> "
12821
"(httpd), which provides web server functionality; the <emphasis>Secure SHell "
12822
"Daemon</emphasis> (sshd), which provides secure remote login shell and file "
12823
"transfer capabilities; and the <emphasis>Internet Message Access Protocol "
12824
"Daemon</emphasis> (imapd), which provides E-Mail services."
12827
#: serverguide/C/network-config.xml:828(para)
12829
"There are man pages for <ulink "
12830
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man7/tcp.7.html\">TCP</uli"
12832
"url=\"http://manpages.ubuntu.com/manpages/lucid/man7/ip.7.html\">IP</ulink> "
12833
"that contain more useful information."
12836
#: serverguide/C/network-config.xml:834(para)
12838
"Also, see the <ulink "
12839
"url=\"http://www.redbooks.ibm.com/abstracts/gg243376.html\">TCP/IP Tutorial "
12840
"and Technical Overview</ulink> IBM Redbook."
12843
#: serverguide/C/network-config.xml:840(para)
12845
"Another resource is O'Reilly's <ulink "
12846
"url=\"http://oreilly.com/catalog/9780596002978/\">TCP/IP Network "
12847
"Administration</ulink>."
12850
#: serverguide/C/network-config.xml:849(title)
12851
msgid "Dynamic Host Configuration Protocol (DHCP)"
12854
#: serverguide/C/network-config.xml:850(para)
12856
"The Dynamic Host Configuration Protocol (DHCP) is a network service that "
12857
"enables host computers to be automatically assigned settings from a server "
12858
"as opposed to manually configuring each network host. Computers configured "
12859
"to be DHCP clients have no control over the settings they receive from the "
12860
"DHCP server, and the configuration is transparent to the computer's user."
12863
#: serverguide/C/network-config.xml:857(para)
12865
"The most common settings provided by a DHCP server to DHCP clients include:"
12868
#: serverguide/C/network-config.xml:862(para)
12869
msgid "IP-Address and Netmask"
12872
#: serverguide/C/network-config.xml:865(para)
12876
#: serverguide/C/network-config.xml:868(para)
12880
#: serverguide/C/network-config.xml:871(para)
12882
"However, a DHCP server can also supply configuration properties such as:"
12885
#: serverguide/C/network-config.xml:876(para)
12889
#: serverguide/C/network-config.xml:879(para)
12890
msgid "Domain Name"
12893
#: serverguide/C/network-config.xml:882(para)
12894
msgid "Default Gateway"
12897
#: serverguide/C/network-config.xml:885(para)
12898
msgid "Time Server"
12901
#: serverguide/C/network-config.xml:888(para)
12902
msgid "Print Server"
12905
#: serverguide/C/network-config.xml:891(para)
12907
"The advantage of using DHCP is that changes to the network, for example a "
12908
"change in the address of the DNS server, need only be changed at the DHCP "
12909
"server, and all network hosts will be reconfigured the next time their DHCP "
12910
"clients poll the DHCP server. As an added advantage, it is also easier to "
12911
"integrate new computers into the network, as there is no need to check for "
12912
"the availability of an IP address. Conflicts in IP address allocation are "
12916
#: serverguide/C/network-config.xml:899(para)
12917
msgid "A DHCP server can provide configuration settings using two methods:"
12920
#: serverguide/C/network-config.xml:904(term)
12921
msgid "MAC Address"
12924
#: serverguide/C/network-config.xml:906(para)
12926
"This method entails using DHCP to identify the unique hardware address of "
12927
"each network card connected to the network and then continually supplying a "
12928
"constant configuration each time the DHCP client makes a request to the DHCP "
12929
"server using that network device."
12932
#: serverguide/C/network-config.xml:915(term)
12933
msgid "Address Pool"
12936
#: serverguide/C/network-config.xml:917(para)
12938
"This method entails defining a pool (sometimes also called a range or scope) "
12939
"of IP addresses from which DHCP clients are supplied their configuration "
12940
"properties dynamically and on a \"first come, first served\" basis. When a "
12941
"DHCP client is no longer on the network for a specified period, the "
12942
"configuration is expired and released back to the address pool for use by "
12943
"other DHCP Clients."
12946
#: serverguide/C/network-config.xml:928(para)
12948
"Ubuntu is shipped with both DHCP server and client. The server is "
12949
"<application>dhcpd</application> (dynamic host configuration protocol "
12950
"daemon). The client provided with Ubuntu is "
12951
"<application>dhclient</application> and should be installed on all computers "
12952
"required to be automatically configured. Both programs are easy to install "
12953
"and configure and will be automatically started at system boot."
12956
#: serverguide/C/network-config.xml:938(para)
12958
"At a terminal prompt, enter the following command to install "
12959
"<application>dhcpd</application>:"
12962
#: serverguide/C/network-config.xml:943(command)
12963
msgid "sudo apt-get install dhcp3-server"
12966
#: serverguide/C/network-config.xml:945(para)
12968
"You will probably need to change the default configuration by editing "
12969
"/etc/dhcp3/dhcpd.conf to suit your needs and particular configuration."
12972
#: serverguide/C/network-config.xml:949(para)
12974
"You also need to edit /etc/default/dhcp3-server to specify the interfaces "
12975
"dhcpd should listen to. By default it listens to eth0."
12978
#: serverguide/C/network-config.xml:953(para)
12980
"NOTE: dhcpd's messages are being sent to syslog. Look there for diagnostics "
12984
#: serverguide/C/network-config.xml:960(para)
12986
"The error message the installation ends with might be a little confusing, "
12987
"but the following steps will help you configure the service:"
12990
#: serverguide/C/network-config.xml:964(para)
12992
"Most commonly, what you want to do is assign an IP address randomly. This "
12993
"can be done with settings as follows:"
12996
#: serverguide/C/network-config.xml:968(programlisting)
13000
"# Sample /etc/dhcpd.conf\n"
13001
"# (add your comments here) \n"
13002
"default-lease-time 600;\n"
13003
"max-lease-time 7200;\n"
13004
"option subnet-mask 255.255.255.0;\n"
13005
"option broadcast-address 192.168.1.255;\n"
13006
"option routers 192.168.1.254;\n"
13007
"option domain-name-servers 192.168.1.1, 192.168.1.2;\n"
13008
"option domain-name \"mydomain.example\";\n"
13010
"subnet 192.168.1.0 netmask 255.255.255.0 {\n"
13011
"range 192.168.1.10 192.168.1.100;\n"
13012
"range 192.168.1.150 192.168.1.200;\n"
13016
#: serverguide/C/network-config.xml:984(para)
13018
"This will result in the DHCP server giving a client an IP address from the "
13019
"range 192.168.1.10-192.168.1.100 or 192.168.1.150-192.168.1.200. It will "
13020
"lease an IP address for 600 seconds if the client doesn't ask for a specific "
13021
"time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The "
13022
"server will also \"advise\" the client that it should use 255.255.255.0 as "
13023
"its subnet mask, 192.168.1.255 as its broadcast address, 192.168.1.254 as "
13024
"the router/gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers."
13027
#: serverguide/C/network-config.xml:993(para)
13029
"If you need to specify a WINS server for your Windows clients, you will need "
13030
"to include the netbios-name-servers option, e.g."
13033
#: serverguide/C/network-config.xml:997(programlisting)
13037
"option netbios-name-servers 192.168.1.1; \n"
13040
#: serverguide/C/network-config.xml:1000(para)
13042
"Dhcpd configuration settings are taken from the DHCP mini-HOWTO, which can "
13044
"url=\"http://www.tldp.org/HOWTO/DHCP/index.html\">here</ulink>."
13047
#: serverguide/C/network-config.xml:1010(para)
13049
"The <ulink url=\"https://help.ubuntu.com/community/dhcp3-server\">dhcp3-"
13050
"server Ubuntu Wiki</ulink> page has more information."
13053
#: serverguide/C/network-config.xml:1015(para)
13055
"For more <filename>/etc/dhcp3/dchpd.conf</filename> options see the <ulink "
13056
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/dhcpd.conf.5.html\">d"
13057
"hcpd.conf man page</ulink>."
13060
#: serverguide/C/network-config.xml:1021(para)
13062
"Also see the <ulink url=\"http://www.dhcp-handbook.com/dhcp_faq.html\">DHCP "
13066
#: serverguide/C/network-config.xml:1031(title)
13067
msgid "Time Synchronisation with NTP"
13070
#: serverguide/C/network-config.xml:1032(para)
13072
"This page describes methods for keeping your computer's time accurate. This "
13073
"is useful for servers, but is not necessary (or desirable) for desktop "
13077
#: serverguide/C/network-config.xml:1035(para)
13079
"NTP is a TCP/IP protocol for synchronising time over a network. Basically a "
13080
"client requests the current time from a server, and uses it to set its own "
13084
#: serverguide/C/network-config.xml:1038(para)
13086
"Behind this simple description, there is a lot of complexity - there are "
13087
"tiers of NTP servers, with the tier one NTP servers connected to atomic "
13088
"clocks (often via GPS), and tier two and three servers spreading the load of "
13089
"actually handling requests across the Internet. Also the client software is "
13090
"a lot more complex than you might think - it has to factor out communication "
13091
"delays, and adjust the time in a way that does not upset all the other "
13092
"processes that run on the server. But luckily all that complexity is hidden "
13096
#: serverguide/C/network-config.xml:1041(para)
13098
"Ubuntu has two ways of automatically setting your time: ntpdate and ntpd."
13101
#: serverguide/C/network-config.xml:1046(title)
13105
#: serverguide/C/network-config.xml:1047(para)
13107
"Ubuntu comes with ntpdate as standard, and will run it once at boot time to "
13108
"set up your time according to Ubuntu's NTP server. However, a server's clock "
13109
"is likely to drift considerably between reboots, so it makes sense to "
13110
"correct the time occasionally. The easiest way to do this is to get cron to "
13111
"run ntpdate every day. With your favorite editor, as root, create a file "
13112
"<code>/etc/cron.daily/ntpdate</code> containing:"
13115
#: serverguide/C/network-config.xml:1052(screen)
13117
msgid "ntpdate ntp.ubuntu.com\n"
13120
#: serverguide/C/network-config.xml:1054(para)
13122
"The file <code>/etc/cron.daily/ntpdate</code> must also be executable."
13125
#: serverguide/C/network-config.xml:1057(screen)
13127
msgid "sudo chmod 755 /etc/cron.daily/ntpdate\n"
13130
#: serverguide/C/network-config.xml:1061(title)
13134
#: serverguide/C/network-config.xml:1062(para)
13136
"ntpdate is a bit of a blunt instrument - it can only adjust the time once a "
13137
"day, in one big correction. The ntp daemon ntpd is far more subtle. It "
13138
"calculates the drift of your system clock and continuously adjusts it, so "
13139
"there are no large corrections that could lead to inconsistent logs for "
13140
"instance. The cost is a little processing power and memory, but for a modern "
13141
"server this is negligible."
13144
#: serverguide/C/network-config.xml:1065(para)
13145
msgid "To set up ntpd:"
13148
#: serverguide/C/network-config.xml:1066(screen)
13150
msgid "sudo apt-get install ntp\n"
13153
#: serverguide/C/network-config.xml:1071(title)
13154
msgid "Changing Time Servers"
13157
#: serverguide/C/network-config.xml:1072(para)
13159
"In both cases above, your system will use Ubuntu's NTP server at "
13160
"<code>ntp.ubuntu.com</code> by default. This is OK, but you might want to "
13161
"use several servers to increase accuracy and resilience, and you may want to "
13162
"use time servers that are geographically closer to you. to do this for "
13163
"ntpdate, change the contents of <code>/etc/cron.daily/ntpdate</code> to:"
13166
#: serverguide/C/network-config.xml:1079(screen)
13168
msgid "ntpdate ntp.ubuntu.com pool.ntp.org \n"
13171
#: serverguide/C/network-config.xml:1081(para)
13173
"And for ntpd edit <code>/etc/ntp.conf</code> to include additional server "
13177
#: serverguide/C/network-config.xml:1086(screen)
13180
"server ntp.ubuntu.com\n"
13181
"server pool.ntp.org\n"
13184
#: serverguide/C/network-config.xml:1089(para)
13186
"You may notice <code>pool.ntp.org</code> in the examples above. This is a "
13187
"really good idea which uses round-robin DNS to return an NTP server from a "
13188
"pool, spreading the load between several different servers. Even better, "
13189
"they have pools for different regions - for instance, if you are in New "
13190
"Zealand, so you could use <code>nz.pool.ntp.org</code> instead of "
13191
"<code>pool.ntp.org</code> . Look at <ulink "
13192
"url=\"http://www.pool.ntp.org/\">http://www.pool.ntp.org/</ulink> for more "
13196
#: serverguide/C/network-config.xml:1100(para)
13198
"You can also Google for NTP servers in your region, and add these to your "
13199
"configuration. To test that a server works, just type <code>sudo ntpdate "
13200
"ntp.server.name</code> and see what happens."
13203
#: serverguide/C/network-config.xml:1111(para)
13205
"See the <ulink url=\"https://help.ubuntu.com/community/UbuntuTime\">Ubuntu "
13206
"Time</ulink> wiki page for more information."
13209
#: serverguide/C/network-config.xml:1117(ulink)
13210
msgid "NTP Support"
13213
#: serverguide/C/network-config.xml:1122(ulink)
13214
msgid "The NTP FAQ and HOWTO"
13217
#: serverguide/C/network-auth.xml:13(title)
13218
msgid "Network Authentication"
13221
#: serverguide/C/network-auth.xml:15(para)
13222
msgid "This section explains various Network Authentication protocols."
13225
#: serverguide/C/network-auth.xml:19(title)
13226
msgid "OpenLDAP Server"
13229
#: serverguide/C/network-auth.xml:20(para)
13231
"LDAP is an acronym for Lightweight Directory Access Protocol, it is a "
13232
"simplified version of the X.500 protocol. The directory setup in this "
13233
"section will be used for authentication. Nevertheless, LDAP can be used in "
13234
"numerous ways: authentication, shared directory (for mail clients), address "
13238
#: serverguide/C/network-auth.xml:28(para)
13240
"To describe LDAP quickly, all information is stored in a tree structure. "
13241
"With <application>OpenLDAP</application> you have freedom to determine the "
13242
"directory arborescence (the Directory Information Tree: the DIT) yourself. "
13243
"We will begin with a basic tree containing two nodes below the root:"
13246
#: serverguide/C/network-auth.xml:37(para)
13247
msgid "\"People\" node where your users will be stored"
13250
#: serverguide/C/network-auth.xml:40(para)
13251
msgid "\"Groups\" node where your groups will be stored"
13254
#: serverguide/C/network-auth.xml:44(para)
13256
"Before beginning, you should determine what the root of your LDAP directory "
13257
"will be. By default, your tree will be determined by your Fully Qualified "
13258
"Domain Name (FQDN). If your domain is example.com (which we will use in this "
13259
"example), your root node will be dc=example,dc=com."
13262
#: serverguide/C/network-auth.xml:54(para)
13264
"First, install the <application>OpenLDAP</application> server daemon "
13265
"<application>slapd</application> and <application>ldap-utils</application>, "
13266
"a package containing LDAP management utilities:"
13269
#: serverguide/C/network-auth.xml:60(command)
13270
msgid "sudo apt-get install slapd ldap-utils"
13273
#: serverguide/C/network-auth.xml:63(para)
13275
"By default <application>slapd</application> is configured with minimal "
13276
"options needed to run the <application>slapd</application> daemon."
13279
#: serverguide/C/network-auth.xml:68(para)
13281
"The configuration example in the following sections will match the domain "
13282
"name of the server. For example, if the machine's Fully Qualified Domain "
13283
"Name (FQDN) is ldap.example.com, the default suffix will be "
13284
"<emphasis>dc=example,dc=com</emphasis>."
13287
#: serverguide/C/network-auth.xml:76(title)
13288
msgid "Populating LDAP"
13291
#: serverguide/C/network-auth.xml:78(para)
13293
"<application>OpenLDAP</application> uses a separate directory which contains "
13294
"the <emphasis>cn=config</emphasis> Directory Information Tree (DIT). The "
13295
"<emphasis>cn=config</emphasis> DIT is used to dynamically configure the "
13296
"<application>slapd</application> daemon, allowing the modification of schema "
13297
"definitions, indexes, ACLs, etc without stopping the service."
13300
#: serverguide/C/network-auth.xml:86(para)
13302
"The backend <emphasis>cn=config</emphasis> directory has only a minimal "
13303
"configuration and will need additional configuration options in order to "
13304
"populate the frontend directory. The frontend will be populated with a "
13305
"\"classical\" scheme that will be compatible with address book applications "
13306
"and with Unix Posix accounts. Posix accounts will allow authentication to "
13307
"various applications, such as web applications, email Mail Transfer Agent "
13308
"(MTA) applications, etc."
13311
#: serverguide/C/network-auth.xml:95(para)
13313
"For external applications to authenticate using LDAP they will each need to "
13314
"be specifically configured to do so. Refer to the individual application "
13315
"documentation for details."
13318
#: serverguide/C/network-auth.xml:103(para)
13320
"Remember to change <emphasis>dc=example,dc=com</emphasis> in the following "
13321
"examples to match your LDAP configuration."
13324
#: serverguide/C/network-auth.xml:108(para)
13326
"First, some additional schema files need to be loaded. In a terminal enter:"
13329
#: serverguide/C/network-auth.xml:113(command) serverguide/C/network-auth.xml:702(command)
13330
msgid "sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif"
13333
#: serverguide/C/network-auth.xml:114(command) serverguide/C/network-auth.xml:703(command)
13334
msgid "sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif"
13337
#: serverguide/C/network-auth.xml:115(command) serverguide/C/network-auth.xml:704(command)
13339
"sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif"
13342
#: serverguide/C/network-auth.xml:118(para)
13344
"Next, copy the following example LDIF file, naming it "
13345
"<filename>backend.example.com.ldif</filename>, somewhere on your system:"
13348
#: serverguide/C/network-auth.xml:123(programlisting)
13352
"# Load dynamic backend modules\n"
13353
"dn: cn=module,cn=config\n"
13354
"objectClass: olcModuleList\n"
13356
"olcModulepath: /usr/lib/ldap\n"
13357
"olcModuleload: back_hdb\n"
13359
"# Database settings\n"
13360
"dn: olcDatabase=hdb,cn=config\n"
13361
"objectClass: olcDatabaseConfig\n"
13362
"objectClass: olcHdbConfig\n"
13363
"olcDatabase: {1}hdb\n"
13364
"olcSuffix: dc=example,dc=com\n"
13365
"olcDbDirectory: /var/lib/ldap\n"
13366
"olcRootDN: cn=admin,dc=example,dc=com\n"
13367
"olcRootPW: secret\n"
13368
"olcDbConfig: set_cachesize 0 2097152 0\n"
13369
"olcDbConfig: set_lk_max_objects 1500\n"
13370
"olcDbConfig: set_lk_max_locks 1500\n"
13371
"olcDbConfig: set_lk_max_lockers 1500\n"
13372
"olcDbIndex: objectClass eq\n"
13373
"olcLastMod: TRUE\n"
13374
"olcDbCheckpoint: 512 30\n"
13375
"olcAccess: to attrs=userPassword by dn=\"cn=admin,dc=example,dc=com\" write "
13376
"by anonymous auth by self write by * none\n"
13377
"olcAccess: to attrs=shadowLastChange by self write by * read\n"
13378
"olcAccess: to dn.base=\"\" by * read\n"
13379
"olcAccess: to * by dn=\"cn=admin,dc=example,dc=com\" write by * read\n"
13383
#: serverguide/C/network-auth.xml:155(para)
13385
"Change <emphasis>olcRootPW: secret</emphasis> to a password of your choosing."
13388
#: serverguide/C/network-auth.xml:160(para)
13389
msgid "Now add the LDIF to the directory:"
13392
#: serverguide/C/network-auth.xml:165(command) serverguide/C/network-auth.xml:746(command)
13393
msgid "sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.example.com.ldif"
13396
#: serverguide/C/network-auth.xml:168(para)
13398
"The frontend directory is now ready to be populated. Create a "
13399
"<filename>frontend.example.com.ldif</filename> with the following contents:"
13402
#: serverguide/C/network-auth.xml:173(programlisting)
13406
"# Create top-level object in domain\n"
13407
"dn: dc=example,dc=com\n"
13408
"objectClass: top\n"
13409
"objectClass: dcObject\n"
13410
"objectclass: organization\n"
13411
"o: Example Organization\n"
13413
"description: LDAP Example \n"
13416
"dn: cn=admin,dc=example,dc=com\n"
13417
"objectClass: simpleSecurityObject\n"
13418
"objectClass: organizationalRole\n"
13420
"description: LDAP administrator\n"
13421
"userPassword: secret\n"
13423
"dn: ou=people,dc=example,dc=com\n"
13424
"objectClass: organizationalUnit\n"
13427
"dn: ou=groups,dc=example,dc=com\n"
13428
"objectClass: organizationalUnit\n"
13431
"dn: uid=john,ou=people,dc=example,dc=com\n"
13432
"objectClass: inetOrgPerson\n"
13433
"objectClass: posixAccount\n"
13434
"objectClass: shadowAccount\n"
13437
"givenName: John\n"
13439
"displayName: John Doe\n"
13440
"uidNumber: 1000\n"
13441
"gidNumber: 10000\n"
13442
"userPassword: password\n"
13443
"gecos: John Doe\n"
13444
"loginShell: /bin/bash\n"
13445
"homeDirectory: /home/john\n"
13446
"shadowExpire: -1\n"
13448
"shadowWarning: 7\n"
13450
"shadowMax: 999999\n"
13451
"shadowLastChange: 10877\n"
13452
"mail: john.doe@example.com\n"
13453
"postalCode: 31000\n"
13456
"mobile: +33 (0)6 xx xx xx xx\n"
13457
"homePhone: +33 (0)5 xx xx xx xx\n"
13458
"title: System Administrator\n"
13459
"postalAddress: \n"
13462
"dn: cn=example,ou=groups,dc=example,dc=com\n"
13463
"objectClass: posixGroup\n"
13465
"gidNumber: 10000\n"
13468
#: serverguide/C/network-auth.xml:236(para)
13470
"In this example the directory structure, a user, and a group have been "
13471
"setup. In other examples you might see the <emphasis>objectClass: "
13472
"top</emphasis> added in every entry, but that is the default behaviour so "
13473
"you do not have to add it explicitly."
13476
#: serverguide/C/network-auth.xml:243(para)
13477
msgid "Add the entries to the LDAP directory:"
13480
#: serverguide/C/network-auth.xml:249(command) serverguide/C/network-auth.xml:757(command)
13482
"sudo ldapadd -x -D cn=admin,dc=example,dc=com -W -f frontend.example.com.ldif"
13485
#: serverguide/C/network-auth.xml:252(para)
13487
"We can check that the content has been correctly added with the "
13488
"<application>ldapsearch</application> utility. Execute a search of the LDAP "
13492
#: serverguide/C/network-auth.xml:258(command)
13493
msgid "ldapsearch -xLLL -b \"dc=example,dc=com\" uid=john sn givenName cn"
13496
#: serverguide/C/network-auth.xml:259(computeroutput)
13500
"dn: uid=john,ou=people,dc=example,dc=com\n"
13503
"givenName: John\n"
13506
#: serverguide/C/network-auth.xml:267(para)
13507
msgid "Just a quick explanation:"
13510
#: serverguide/C/network-auth.xml:273(para)
13512
"<emphasis>-x:</emphasis> will not use SASL authentication method, which is "
13516
#: serverguide/C/network-auth.xml:279(para)
13517
msgid "<emphasis>-LLL:</emphasis> disable printing LDIF schema information."
13520
#: serverguide/C/network-auth.xml:287(title)
13521
msgid "Further Configuration"
13524
#: serverguide/C/network-auth.xml:290(para)
13526
"The <emphasis>cn=config</emphasis> tree can be manipulated using the "
13527
"utilities in the <application>ldap-utils</application> package. For example:"
13530
#: serverguide/C/network-auth.xml:298(para)
13532
"Use <application>ldapsearch</application> to view the tree, entering the "
13533
"admin password set during installation or reconfiguration:"
13536
#: serverguide/C/network-auth.xml:304(command)
13537
msgid "sudo ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config dn"
13540
#: serverguide/C/network-auth.xml:308(computeroutput)
13544
"SASL/EXTERNAL authentication started\n"
13545
"SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth\n"
13549
"dn: cn=module{0},cn=config\n"
13551
"dn: cn=schema,cn=config\n"
13553
"dn: cn={0}core,cn=schema,cn=config\n"
13555
"dn: cn={1}cosine,cn=schema,cn=config\n"
13557
"dn: cn={2}nis,cn=schema,cn=config\n"
13559
"dn: cn={3}inetorgperson,cn=schema,cn=config\n"
13561
"dn: olcDatabase={-1}frontend,cn=config\n"
13563
"dn: olcDatabase={0}config,cn=config\n"
13565
"dn: olcDatabase={1}hdb,cn=config\n"
13568
#: serverguide/C/network-auth.xml:334(para)
13570
"The output above is the current configuration options for the "
13571
"<emphasis>cn=config</emphasis> backend database. Your output may be vary."
13574
#: serverguide/C/network-auth.xml:342(para)
13576
"As an example of modifying the <emphasis>cn=config</emphasis> tree, add "
13577
"another attribute to the index list using "
13578
"<application>ldapmodify</application>:"
13581
#: serverguide/C/network-auth.xml:348(command) serverguide/C/network-auth.xml:984(command) serverguide/C/network-auth.xml:1155(command) serverguide/C/network-auth.xml:1191(command)
13582
msgid "sudo ldapmodify -Y EXTERNAL -H ldapi:///"
13585
#: serverguide/C/network-auth.xml:356(userinput)
13588
"dn: olcDatabase={1}hdb,cn=config\n"
13589
"add: olcDbIndex\n"
13590
"olcDbIndex: uidNumber eq"
13593
#: serverguide/C/network-auth.xml:352(computeroutput)
13597
"SASL/EXTERNAL authentication started\n"
13598
"SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth\n"
13600
"<placeholder-1/>\n"
13602
"modifying entry \"olcDatabase={1}hdb,cn=config\"\n"
13605
#: serverguide/C/network-auth.xml:364(para)
13607
"Once the modification has completed, press <emphasis>Ctrl+D</emphasis> to "
13608
"exit the utility."
13611
#: serverguide/C/network-auth.xml:371(para)
13613
"<application>ldapmodify</application> can also read the changes from a file. "
13614
"Copy and paste the following into a file named "
13615
"<filename>uid_index.ldif</filename>:"
13618
#: serverguide/C/network-auth.xml:376(programlisting)
13622
"dn: olcDatabase={1}hdb,cn=config\n"
13623
"add: olcDbIndex\n"
13624
"olcDbIndex: uid eq,pres,sub\n"
13627
#: serverguide/C/network-auth.xml:382(para)
13628
msgid "Then execute <application>ldapmodify</application>:"
13631
#: serverguide/C/network-auth.xml:387(command)
13632
msgid "sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f uid_index.ldif"
13635
#: serverguide/C/network-auth.xml:391(computeroutput)
13639
"SASL/EXTERNAL authentication started\n"
13640
"SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth\n"
13642
"modifying entry \"olcDatabase={1}hdb,cn=config\"\n"
13645
#: serverguide/C/network-auth.xml:399(para)
13646
msgid "The file method is very useful for large changes."
13649
#: serverguide/C/network-auth.xml:406(para)
13651
"Adding additional <emphasis>schemas</emphasis> to "
13652
"<application>slapd</application> requires the schema to be converted to LDIF "
13653
"format. The <filename role=\"directory\">/etc/ldap/schema</filename> "
13654
"directory contains some schema files already converted to LDIF format as "
13655
"demonstrated in the previous section. Fortunately, the "
13656
"<application>slapd</application> program can be used to automate the "
13657
"conversion. The following example will add the "
13658
"<emphasis>dyngoup.schema</emphasis>:"
13661
#: serverguide/C/network-auth.xml:416(para)
13663
"First, create a conversion <filename>schema_convert.conf</filename> file "
13664
"containing the following lines:"
13667
#: serverguide/C/network-auth.xml:421(programlisting)
13671
"include /etc/ldap/schema/core.schema\n"
13672
"include /etc/ldap/schema/collective.schema\n"
13673
"include /etc/ldap/schema/corba.schema\n"
13674
"include /etc/ldap/schema/cosine.schema\n"
13675
"include /etc/ldap/schema/duaconf.schema\n"
13676
"include /etc/ldap/schema/dyngroup.schema\n"
13677
"include /etc/ldap/schema/inetorgperson.schema\n"
13678
"include /etc/ldap/schema/java.schema\n"
13679
"include /etc/ldap/schema/misc.schema\n"
13680
"include /etc/ldap/schema/nis.schema\n"
13681
"include /etc/ldap/schema/openldap.schema\n"
13682
"include /etc/ldap/schema/ppolicy.schema\n"
13685
#: serverguide/C/network-auth.xml:439(para) serverguide/C/network-auth.xml:1655(para)
13686
msgid "Next, create a temporary directory to hold the output:"
13689
#: serverguide/C/network-auth.xml:444(command) serverguide/C/network-auth.xml:1660(command) serverguide/C/network-auth.xml:2695(command)
13690
msgid "mkdir /tmp/ldif_output"
13693
#: serverguide/C/network-auth.xml:450(para)
13695
"Now using <application>slapcat</application> convert the schema files to "
13699
#: serverguide/C/network-auth.xml:455(command)
13701
"slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 -s "
13702
"\"cn={5}dyngroup,cn=schema,cn=config\" > /tmp/cn=dyngroup.ldif"
13705
#: serverguide/C/network-auth.xml:458(para)
13707
"Adjust the configuration file name and temporary directory names if yours "
13708
"are different. Also, it may be worthwhile to keep the "
13709
"<filename>ldif_output</filename> directory around in case you want to add "
13710
"additional schemas in the future."
13713
#: serverguide/C/network-auth.xml:467(para)
13715
"Edit the <filename>/tmp/cn\\=dyngroup.ldif</filename> file, changing the "
13716
"following attributes:"
13719
#: serverguide/C/network-auth.xml:471(programlisting)
13723
"dn: cn=dyngroup,cn=schema,cn=config\n"
13728
#: serverguide/C/network-auth.xml:477(para) serverguide/C/network-auth.xml:1691(para)
13729
msgid "And remove the following lines from the bottom of the file:"
13732
#: serverguide/C/network-auth.xml:481(programlisting)
13736
"structuralObjectClass: olcSchemaConfig\n"
13737
"entryUUID: 10dae0ea-0760-102d-80d3-f9366b7f7757\n"
13738
"creatorsName: cn=config\n"
13739
"createTimestamp: 20080826021140Z\n"
13740
"entryCSN: 20080826021140.791425Z#000000#000#000000\n"
13741
"modifiersName: cn=config\n"
13742
"modifyTimestamp: 20080826021140Z\n"
13745
#: serverguide/C/network-auth.xml:492(para) serverguide/C/network-auth.xml:1706(para) serverguide/C/network-auth.xml:2741(para)
13747
"The attribute values will vary, just be sure the attributes are removed."
13750
#: serverguide/C/network-auth.xml:500(para) serverguide/C/network-auth.xml:1714(para)
13752
"Finally, using the <application>ldapadd</application> utility, add the new "
13753
"schema to the directory:"
13756
#: serverguide/C/network-auth.xml:506(command)
13757
msgid "sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/cn\\=dyngroup.ldif"
13760
#: serverguide/C/network-auth.xml:512(para)
13762
"There should now be a <emphasis>dn: "
13763
"cn={4}dyngroup,cn=schema,cn=config</emphasis> entry in the cn=config tree."
13766
#: serverguide/C/network-auth.xml:522(title)
13767
msgid "LDAP Replication"
13770
#: serverguide/C/network-auth.xml:524(para)
13772
"LDAP often quickly becomes a highly critical service to the network. "
13773
"Multiple systems will come to depend on LDAP for authentication, "
13774
"authorization, configuration, etc. It is a good idea to setup a redundant "
13775
"system through replication."
13778
#: serverguide/C/network-auth.xml:530(para)
13780
"Replication is achieved using the <emphasis>Syncrepl</emphasis> engine. "
13781
"Syncrepl allows the changes to be synced using a "
13782
"<emphasis>consumer</emphasis>, <emphasis>provider</emphasis> model. A "
13783
"provider sends directory changes to consumers."
13786
#: serverguide/C/network-auth.xml:537(title)
13787
msgid "Provider Configuration"
13790
#: serverguide/C/network-auth.xml:539(para)
13792
"The following is an example of a <emphasis>Single-Master</emphasis> "
13793
"configuration. In this configuration one OpenLDAP server is configured as a "
13794
"<emphasis>provider</emphasis> and another as a <emphasis>consumer</emphasis>."
13797
#: serverguide/C/network-auth.xml:547(para)
13799
"First, configure the provider server. Copy the following to a file named "
13800
"<filename>provider_sync.ldif</filename>:"
13803
#: serverguide/C/network-auth.xml:552(programlisting)
13807
"# Add indexes to the frontend db.\n"
13808
"dn: olcDatabase={1}hdb,cn=config\n"
13809
"changetype: modify\n"
13810
"add: olcDbIndex\n"
13811
"olcDbIndex: entryCSN eq\n"
13813
"add: olcDbIndex\n"
13814
"olcDbIndex: entryUUID eq\n"
13816
"#Load the syncprov and accesslog modules.\n"
13817
"dn: cn=module{0},cn=config\n"
13818
"changetype: modify\n"
13819
"add: olcModuleLoad\n"
13820
"olcModuleLoad: syncprov\n"
13822
"add: olcModuleLoad\n"
13823
"olcModuleLoad: accesslog\n"
13825
"# Accesslog database definitions\n"
13826
"dn: olcDatabase={2}hdb,cn=config\n"
13827
"objectClass: olcDatabaseConfig\n"
13828
"objectClass: olcHdbConfig\n"
13829
"olcDatabase: {2}hdb\n"
13830
"olcDbDirectory: /var/lib/ldap/accesslog\n"
13831
"olcSuffix: cn=accesslog\n"
13832
"olcRootDN: cn=admin,dc=example,dc=com\n"
13833
"olcDbIndex: default eq\n"
13834
"olcDbIndex: entryCSN,objectClass,reqEnd,reqResult,reqStart\n"
13836
"# Accesslog db syncprov.\n"
13837
"dn: olcOverlay=syncprov,olcDatabase={2}hdb,cn=config\n"
13838
"changetype: add\n"
13839
"objectClass: olcOverlayConfig\n"
13840
"objectClass: olcSyncProvConfig\n"
13841
"olcOverlay: syncprov\n"
13842
"olcSpNoPresent: TRUE\n"
13843
"olcSpReloadHint: TRUE\n"
13845
"# syncrepl Provider for primary db\n"
13846
"dn: olcOverlay=syncprov,olcDatabase={1}hdb,cn=config\n"
13847
"changetype: add\n"
13848
"objectClass: olcOverlayConfig\n"
13849
"objectClass: olcSyncProvConfig\n"
13850
"olcOverlay: syncprov\n"
13851
"olcSpNoPresent: TRUE\n"
13853
"# accesslog overlay definitions for primary db\n"
13854
"dn: olcOverlay=accesslog,olcDatabase={1}hdb,cn=config\n"
13855
"objectClass: olcOverlayConfig\n"
13856
"objectClass: olcAccessLogConfig\n"
13857
"olcOverlay: accesslog\n"
13858
"olcAccessLogDB: cn=accesslog\n"
13859
"olcAccessLogOps: writes\n"
13860
"olcAccessLogSuccess: TRUE\n"
13861
"# scan the accesslog DB every day, and purge entries older than 7 days\n"
13862
"olcAccessLogPurge: 07+00:00 01+00:00\n"
13865
#: serverguide/C/network-auth.xml:614(para)
13867
"The <application>AppArmor</application> profile for "
13868
"<application>slapd</application> will need to be adjusted for the accesslog "
13869
"database location. Edit <filename>/etc/apparmor.d/usr.sbin.slapd</filename> "
13873
#: serverguide/C/network-auth.xml:619(programlisting)
13877
" /var/lib/ldap/accesslog/ r,\n"
13878
" /var/lib/ldap/accesslog/** rwk,\n"
13881
#: serverguide/C/network-auth.xml:624(para)
13883
"Then create the directory, reload the <application>apparmor</application> "
13884
"profile, and copy the <filename>DB_CONFIG</filename> file:"
13887
#: serverguide/C/network-auth.xml:630(command)
13888
msgid "sudo -u openldap mkdir /var/lib/ldap/accesslog"
13891
#: serverguide/C/network-auth.xml:631(command)
13892
msgid "sudo -u openldap cp /var/lib/ldap/DB_CONFIG /var/lib/ldap/accesslog/"
13895
#: serverguide/C/network-auth.xml:636(para)
13897
"Using the <emphasis>-u openldap</emphasis> option with the "
13898
"<application>sudo</application> commands above removes the need to adjust "
13899
"permissions for the new directory later."
13902
#: serverguide/C/network-auth.xml:645(para)
13904
"Edit the file and change the <emphasis>olcRootDN</emphasis> to match your "
13908
#: serverguide/C/network-auth.xml:649(programlisting)
13912
"olcRootDN: cn=admin,dc=example,dc=com\n"
13915
#: serverguide/C/network-auth.xml:657(para)
13917
"Next, add the LDIF file using the <application>ldapadd</application> utility:"
13920
#: serverguide/C/network-auth.xml:662(command)
13921
msgid "sudo ldapadd -Y EXTERNAL -H ldapi:/// -f provider_sync.ldif"
13924
#: serverguide/C/network-auth.xml:669(para)
13925
msgid "Restart <application>slapd</application>:"
13928
#: serverguide/C/network-auth.xml:674(command) serverguide/C/network-auth.xml:1040(command) serverguide/C/network-auth.xml:1227(command)
13929
msgid "sudo /etc/init.d/slapd restart"
13932
#: serverguide/C/network-auth.xml:680(para)
13934
"The <emphasis>Provider</emphasis> server is now configured, and it is time "
13935
"to configure a <emphasis>Consumer</emphasis> server."
13938
#: serverguide/C/network-auth.xml:687(title)
13939
msgid "Consumer Configuration"
13942
#: serverguide/C/network-auth.xml:692(para)
13944
"On the <emphasis>Consumer</emphasis> server configure it the same as the "
13945
"<emphasis>Provider</emphasis> except for the <emphasis>Syncrepl</emphasis> "
13946
"configuration steps."
13949
#: serverguide/C/network-auth.xml:697(para)
13950
msgid "Add the additional schema files:"
13953
#: serverguide/C/network-auth.xml:707(para)
13955
"Also, create, or copy from the provider server, the "
13956
"<filename>backend.example.com.ldif</filename>"
13959
#: serverguide/C/network-auth.xml:711(programlisting)
13963
"# Load dynamic backend modules\n"
13964
"dn: cn=module,cn=config\n"
13965
"objectClass: olcModuleList\n"
13967
"olcModulepath: /usr/lib/ldap\n"
13968
"olcModuleload: back_hdb\n"
13970
"# Database settings\n"
13971
"dn: olcDatabase=hdb,cn=config\n"
13972
"objectClass: olcDatabaseConfig\n"
13973
"objectClass: olcHdbConfig\n"
13974
"olcDatabase: {1}hdb\n"
13975
"olcSuffix: dc=example,dc=com\n"
13976
"olcDbDirectory: /var/lib/ldap\n"
13977
"olcRootDN: cn=admin,dc=example,dc=com\n"
13978
"olcRootPW: secret\n"
13979
"olcDbConfig: set_cachesize 0 2097152 0\n"
13980
"olcDbConfig: set_lk_max_objects 1500\n"
13981
"olcDbConfig: set_lk_max_locks 1500\n"
13982
"olcDbConfig: set_lk_max_lockers 1500\n"
13983
"olcDbIndex: objectClass eq\n"
13984
"olcLastMod: TRUE\n"
13985
"olcDbCheckpoint: 512 30\n"
13986
"olcAccess: to attrs=userPassword by dn=\"cn=admin,dc=example,dc=com\" write "
13987
"by anonymous auth by self write by * none\n"
13988
"olcAccess: to attrs=shadowLastChange by self write by * read\n"
13989
"olcAccess: to dn.base=\"\" by * read\n"
13990
"olcAccess: to * by dn=\"cn=admin,dc=example,dc=com\" write by * read\n"
13993
#: serverguide/C/network-auth.xml:741(para)
13994
msgid "And add the LDIF by entering:"
13997
#: serverguide/C/network-auth.xml:752(para)
13999
"Do the same with the <filename>frontend.example.com.ldif</filename> file "
14000
"listed above, and add it:"
14003
#: serverguide/C/network-auth.xml:760(para)
14005
"The two severs should now have the same configuration except for the "
14006
"<emphasis>Syncrepl</emphasis> options."
14009
#: serverguide/C/network-auth.xml:768(para)
14011
"Now create a file named <filename>consumer_sync.ldif</filename> containing:"
14014
#: serverguide/C/network-auth.xml:772(programlisting)
14018
"#Load the syncprov module.\n"
14019
"dn: cn=module{0},cn=config\n"
14020
"changetype: modify\n"
14021
"add: olcModuleLoad\n"
14022
"olcModuleLoad: syncprov\n"
14024
"# syncrepl specific indices\n"
14025
"dn: olcDatabase={1}hdb,cn=config\n"
14026
"changetype: modify\n"
14027
"add: olcDbIndex\n"
14028
"olcDbIndex: entryUUID eq\n"
14030
"add: olcSyncRepl\n"
14031
"olcSyncRepl: rid=0 provider=ldap://ldap01.example.com bindmethod=simple "
14032
"binddn=\"cn=admin,dc=example,dc=com\" \n"
14033
" credentials=secret searchbase=\"dc=example,dc=com\" "
14034
"logbase=\"cn=accesslog\" \n"
14035
" logfilter=\"(&(objectClass=auditWriteObject)(reqResult=0))\" "
14036
"schemachecking=on \n"
14037
" type=refreshAndPersist retry=\"60 +\" syncdata=accesslog\n"
14039
"add: olcUpdateRef\n"
14040
"olcUpdateRef: ldap://ldap01.example.com\n"
14043
#: serverguide/C/network-auth.xml:795(para)
14044
msgid "You will probably want to change the following attributes:"
14047
#: serverguide/C/network-auth.xml:800(para)
14048
msgid "<emphasis>ldap01.example.com</emphasis> to your server's hostname."
14051
#: serverguide/C/network-auth.xml:801(emphasis)
14055
#: serverguide/C/network-auth.xml:802(emphasis)
14056
msgid "credentials"
14059
#: serverguide/C/network-auth.xml:803(emphasis)
14063
#: serverguide/C/network-auth.xml:804(emphasis)
14064
msgid "olcUpdateRef:"
14067
#: serverguide/C/network-auth.xml:810(para)
14068
msgid "Add the LDIF file to the configuration tree:"
14071
#: serverguide/C/network-auth.xml:815(command)
14072
msgid "sudo ldapadd -c -Y EXTERNAL -H ldapi:/// -f consumer_sync.ldif"
14075
#: serverguide/C/network-auth.xml:821(para)
14077
"The frontend database should now sync between servers. You can add "
14078
"additional servers using the steps above as the need arises."
14081
#: serverguide/C/network-auth.xml:831(programlisting)
14083
msgid "127.0.0.1\tldap01.example.com ldap01"
14086
#: serverguide/C/network-auth.xml:827(para)
14088
"The <application>slapd</application> daemon will send log information to "
14089
"<filename>/var/log/syslog</filename> by default. So if all does "
14090
"<emphasis>not</emphasis> go well check there for errors and other "
14091
"troubleshooting information. Also, be sure that each server knows it's Fully "
14092
"Qualified Domain Name (FQDN). This is configured in "
14093
"<filename>/etc/hosts</filename> with a line similar to: <placeholder-1/>."
14096
#: serverguide/C/network-auth.xml:839(title)
14097
msgid "Setting up ACL"
14100
#: serverguide/C/network-auth.xml:841(para)
14102
"Authentication requires access to the password field, that should be not "
14103
"accessible by default. Also, in order for users to change their own "
14104
"password, using <command>passwd</command> or other utilities, "
14105
"<emphasis>shadowLastChange</emphasis> needs to be accessible once a user has "
14109
#: serverguide/C/network-auth.xml:848(para)
14111
"To view the Access Control List (ACL), use the "
14112
"<application>ldapsearch</application> utility:"
14115
#: serverguide/C/network-auth.xml:853(command)
14117
"ldapsearch -xLLL -b cn=config -D cn=admin,cn=config -W olcDatabase=hdb "
14121
#: serverguide/C/network-auth.xml:857(computeroutput)
14124
"Enter LDAP Password: \n"
14125
"dn: olcDatabase={1}hdb,cn=config\n"
14126
"olcAccess: {0}to attrs=userPassword,shadowLastChange by "
14127
"dn=\"cn=admin,dc=exampl\n"
14128
" e,dc=com\" write by anonymous auth by self write by * none\n"
14129
"olcAccess: {1}to dn.base=\"\" by * read\n"
14130
"olcAccess: {2}to * by dn=\"cn=admin,dc=example,dc=com\" write by * read\n"
14133
#: serverguide/C/network-auth.xml:869(title)
14134
msgid "TLS and SSL"
14137
#: serverguide/C/network-auth.xml:871(para)
14139
"When authenticating to an OpenLDAP server it is best to do so using an "
14140
"encrypted session. This can be accomplished using Transport Layer Security "
14141
"(TLS) and/or Secure Sockets Layer (SSL)."
14144
#: serverguide/C/network-auth.xml:876(para)
14146
"The first step in the process is to obtain or create a "
14147
"<emphasis>certificate</emphasis>. Because <application>slapd</application> "
14148
"is compiled using the <application>gnutls</application> library, the "
14149
"<application>certtool</application> utility will be used to create "
14153
#: serverguide/C/network-auth.xml:885(para)
14155
"First, install <application>gnutls-bin</application> by entering the "
14156
"following in a terminal:"
14159
#: serverguide/C/network-auth.xml:890(command)
14160
msgid "sudo apt-get install gnutls-bin"
14163
#: serverguide/C/network-auth.xml:896(para)
14165
"Next, create a private key for the <emphasis>Certificate "
14166
"Authority</emphasis> (CA):"
14169
#: serverguide/C/network-auth.xml:901(command)
14171
"sudo sh -c \"certtool --generate-privkey > /etc/ssl/private/cakey.pem\""
14174
#: serverguide/C/network-auth.xml:907(para)
14176
"Create a <filename>/etc/ssl/ca.info</filename> details file to self-sign the "
14177
"CA certificate containing:"
14180
#: serverguide/C/network-auth.xml:911(programlisting)
14184
"cn = Example Company\n"
14186
"cert_signing_key\n"
14189
#: serverguide/C/network-auth.xml:920(para)
14190
msgid "Now create the self-signed CA certificate:"
14193
#: serverguide/C/network-auth.xml:925(command)
14195
"sudo certtool --generate-self-signed --load-privkey "
14196
"/etc/ssl/private/cakey.pem \\ --template /etc/ssl/ca.info --outfile "
14197
"/etc/ssl/certs/cacert.pem"
14200
#: serverguide/C/network-auth.xml:932(para)
14201
msgid "Make a private key for the server:"
14204
#: serverguide/C/network-auth.xml:937(command)
14206
"sudo sh -c \"certtool --generate-privkey > "
14207
"/etc/ssl/private/ldap01_slapd_key.pem\""
14210
#: serverguide/C/network-auth.xml:941(para)
14212
"Replace <emphasis>ldap01</emphasis> in the filename with your server's "
14213
"hostname. Naming the certificate and key for the host and service that will "
14214
"be using them will help keep filenames and paths straight."
14217
#: serverguide/C/network-auth.xml:950(para)
14219
"To sign the server's certificate with the CA, create the "
14220
"<filename>/etc/ssl/ldap01.info</filename> info file containing:"
14223
#: serverguide/C/network-auth.xml:954(programlisting)
14227
"organization = Example Company\n"
14228
"cn = ldap01.example.com\n"
14234
#: serverguide/C/network-auth.xml:965(para)
14235
msgid "Create the server's certificate:"
14238
#: serverguide/C/network-auth.xml:970(command)
14240
"sudo certtool --generate-certificate --load-privkey /etc/ssl/private/x01-"
14241
"test_slapd_key.pem \\ --load-ca-certificate /etc/ssl/certs/cacert.pem --load-"
14242
"ca-privkey /etc/ssl/private/cakey.pem \\ --template /etc/ssl/x01-test.info --"
14243
"outfile /etc/ssl/certs/x01-test_slapd_cert.pem"
14246
#: serverguide/C/network-auth.xml:978(para)
14248
"Once you have a certificate, key, and CA cert installed, use "
14249
"<application>ldapmodify</application> to add the new configuration options:"
14252
#: serverguide/C/network-auth.xml:989(userinput)
14256
"add: olcTLSCACertificateFile\n"
14257
"olcTLSCACertificateFile: /etc/ssl/certs/cacert.pem\n"
14259
"add: olcTLSCertificateFile\n"
14260
"olcTLSCertificateFile: /etc/ssl/certs/ldap01_slapd_cert.pem\n"
14262
"add: olcTLSCertificateKeyFile\n"
14263
"olcTLSCertificateKeyFile: /etc/ssl/private/ldap01_slapd_key.pem"
14266
#: serverguide/C/network-auth.xml:988(computeroutput) serverguide/C/network-auth.xml:1159(computeroutput)
14269
"Enter LDAP Password:\n"
14270
"<placeholder-1/>\n"
14272
"modifying entry \"cn=config\"\n"
14275
#: serverguide/C/network-auth.xml:1004(para)
14277
"Adjust the <filename>ldap01_slapd_cert.pem</filename>, "
14278
"<filename>ldap01_slapd_key.pem</filename>, and "
14279
"<filename>cacert.pem</filename> names if yours are different."
14282
#: serverguide/C/network-auth.xml:1010(para)
14284
"Next, edit <filename>/etc/default/slapd</filename> uncomment the "
14285
"<emphasis>SLAPD_SERVICES</emphasis> option:"
14288
#: serverguide/C/network-auth.xml:1014(programlisting)
14292
"SLAPD_SERVICES=\"ldap:/// ldapi:/// ldaps:///\"\n"
14295
#: serverguide/C/network-auth.xml:1018(para)
14297
"Now the <emphasis>openldap</emphasis> user needs access to the certificate:"
14300
#: serverguide/C/network-auth.xml:1023(command)
14301
msgid "sudo adduser openldap ssl-cert"
14304
#: serverguide/C/network-auth.xml:1024(command)
14305
msgid "sudo chgrp ssl-cert /etc/ssl/private/ldap01_slapd_key.pem"
14308
#: serverguide/C/network-auth.xml:1025(command)
14309
msgid "sudo chmod g+r /etc/ssl/private/ldap01_slapd_key.pem"
14312
#: serverguide/C/network-auth.xml:1029(para)
14314
"If the <filename role=\"directory\">/etc/ssl/private</filename> and "
14315
"<filename>/etc/ssl/private/server.key</filename> have different permissions, "
14316
"adjust the commands appropriately."
14319
#: serverguide/C/network-auth.xml:1035(para)
14320
msgid "Finally, restart <application>slapd</application>:"
14323
#: serverguide/C/network-auth.xml:1043(para)
14325
"The <application>slapd</application> daemon should now be listening for "
14326
"LDAPS connections and be able to use STARTTLS during authentication."
14329
#: serverguide/C/network-auth.xml:1049(para)
14331
"If you run into troubles with the server not starting, check the "
14332
"/var/log/syslog. If you see errors like main: TLS init def ctx failed: -1, "
14333
"it is likely there is a configuration problem. Check that the certificate is "
14334
"signed by the authority from in the files configured, and that the ssl-cert "
14335
"group has read permissions on the private key."
14338
#: serverguide/C/network-auth.xml:1061(title)
14339
msgid "TLS Replication"
14342
#: serverguide/C/network-auth.xml:1063(para)
14344
"If you have setup <application>Syncrepl</application> between servers, it is "
14345
"prudent to encrypt the replication traffic using <emphasis>Transport Layer "
14346
"Security (TLS)</emphasis>. For details on setting up replication see <xref "
14347
"linkend=\"openldap-server-replication\"/>."
14350
#: serverguide/C/network-auth.xml:1069(para)
14352
"Assuming you have followed the above instructions and created a CA "
14353
"certificate and server certificate on the <emphasis>Provider</emphasis> "
14354
"server. Follow the following instructions to create a certificate and key "
14355
"for the <emphasis>Consumer</emphasis> server."
14358
#: serverguide/C/network-auth.xml:1078(para)
14359
msgid "Create a new key for the Consumer server:"
14362
#: serverguide/C/network-auth.xml:1083(command)
14363
msgid "mkdir ldap02-ssl"
14366
#: serverguide/C/network-auth.xml:1084(command)
14367
msgid "cd ldap02-ssl"
14370
#: serverguide/C/network-auth.xml:1085(command)
14371
msgid "certtool --generate-privkey > ldap02_slapd_key.pem"
14374
#: serverguide/C/network-auth.xml:1089(para)
14376
"Creating a new directory is not strictly necessary, but it will help keep "
14377
"things organized and make it easier to copy the files to the Consumer server."
14380
#: serverguide/C/network-auth.xml:1098(para)
14382
"Next, create an info file, <filename>ldap02.info</filename> for the Consumer "
14383
"server, changing the attributes to match your locality and server:"
14386
#: serverguide/C/network-auth.xml:1103(programlisting)
14391
"state = North Carolina\n"
14392
"locality = Winston-Salem\n"
14393
"organization = Example Company\n"
14394
"cn = ldap02.salem.edu\n"
14400
#: serverguide/C/network-auth.xml:1117(para)
14401
msgid "Create the certificate:"
14404
#: serverguide/C/network-auth.xml:1122(command)
14406
"sudo certtool --generate-certificate --load-privkey ldap02_slapd_key.pem \\ -"
14407
"-load-ca-certificate /etc/ssl/certs/cacert.pem --load-ca-privkey "
14408
"/etc/ssl/private/cakey.pem \\ --template ldap02.info --outfile "
14409
"ldap02_slapd_cert.pem"
14412
#: serverguide/C/network-auth.xml:1130(para)
14413
msgid "Copy the <filename>cacert.pem</filename> to the dicretory:"
14416
#: serverguide/C/network-auth.xml:1135(command)
14417
msgid "cp /etc/ssl/certs/cacert.pem ."
14420
#: serverguide/C/network-auth.xml:1141(para)
14422
"The only thing left is to copy the <filename>ldap02-ssl</filename> directory "
14423
"to the Consumer server, then copy <filename>ldap02_slapd_cert.pem</filename> "
14424
"and <filename>cacert.pem</filename> to <filename>/etc/ssl/certs</filename>, "
14425
"and copy <filename>ldap02_slapd_key.pem</filename> to "
14426
"<filename>/etc/ssl/private</filename>."
14429
#: serverguide/C/network-auth.xml:1150(para)
14431
"Once the files are in place adjust the <emphasis>cn=config</emphasis> tree "
14435
#: serverguide/C/network-auth.xml:1160(userinput)
14439
"add: olcTLSCACertificateFile\n"
14440
"olcTLSCACertificateFile: /etc/ssl/certs/cacert.pem\n"
14442
"add: olcTLSCertificateFile\n"
14443
"olcTLSCertificateFile: /etc/ssl/certs/ldap02_slapd_cert.pem\n"
14445
"add: olcTLSCertificateKeyFile\n"
14446
"olcTLSCertificateKeyFile: /etc/ssl/private/ldap02_slapd_key.pem"
14449
#: serverguide/C/network-auth.xml:1177(para)
14451
"As with the Provider you can now edit "
14452
"<filename>/etc/default/slapd</filename> and add the "
14453
"<emphasis>ldaps:///</emphasis> parameter to the "
14454
"<emphasis>SLAPD_SERVICES</emphasis> option."
14457
#: serverguide/C/network-auth.xml:1185(para)
14459
"Now that <emphasis>TLS</emphasis> has been setup on each server, once again "
14460
"modify the <emphasis>Consumer</emphasis> server's "
14461
"<emphasis>cn=config</emphasis> tree by entering the following in a terminal:"
14464
#: serverguide/C/network-auth.xml:1198(userinput)
14468
"dn: olcDatabase={1}hdb,cn=config\n"
14469
"replace: olcSyncrepl\n"
14470
"olcSyncrepl: {0}rid=0 provider=ldap://ldap01.example.com bindmethod=simple "
14472
" min,dc=example,dc=com\" credentials=secret searchbase=\"dc=example,dc=com\" "
14474
" e=\"cn=accesslog\" "
14475
"logfilter=\"(&(objectClass=auditWriteObject)(reqResult=0))\" s\n"
14476
" chemachecking=on type=refreshAndPersist retry=\"60 +\" syncdata=accesslog "
14480
#: serverguide/C/network-auth.xml:1195(computeroutput)
14483
"SASL/EXTERNAL authentication started\n"
14484
"SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth\n"
14486
"<placeholder-1/>\n"
14488
"modifying entry \"olcDatabase={1}hdb,cn=config\"\n"
14491
#: serverguide/C/network-auth.xml:1210(para)
14493
"If the LDAP server hostname does not match the Fully Qualified Domain Name "
14494
"(FQDN) in the certificate, you may have to edit "
14495
"<filename>/etc/ldap/ldap.conf</filename> and add the following TLS options:"
14498
#: serverguide/C/network-auth.xml:1215(programlisting)
14502
"TLS_CERT /etc/ssl/certs/ldap02_slapd_cert.pem\n"
14503
"TLS_KEY /etc/ssl/private/ldap02_slapd_key.pem\n"
14504
"TLS_CACERT /etc/ssl/certs/cacert.pem\n"
14507
#: serverguide/C/network-auth.xml:1222(para)
14509
"Finally, restart <application>slapd</application> on each of the servers:"
14512
#: serverguide/C/network-auth.xml:1235(title)
14513
msgid "LDAP Authentication"
14516
#: serverguide/C/network-auth.xml:1237(para)
14518
"Once you have a working LDAP server, the <application>auth-client-"
14519
"config</application> and <application>libnss-ldap</application> packages "
14520
"take the pain out of configuring an Ubuntu client to authenticate using "
14521
"LDAP. To install the packages from, a terminal prompt enter:"
14524
#: serverguide/C/network-auth.xml:1244(command)
14525
msgid "sudo apt-get install libnss-ldap"
14528
#: serverguide/C/network-auth.xml:1247(para)
14530
"During the install a menu dialog will ask you connection details about your "
14534
#: serverguide/C/network-auth.xml:1251(para)
14536
"If you make a mistake when entering your information you can execute the "
14537
"dialog again using:"
14540
#: serverguide/C/network-auth.xml:1256(command)
14541
msgid "sudo dpkg-reconfigure ldap-auth-config"
14544
#: serverguide/C/network-auth.xml:1259(para)
14546
"The results of the dialog can be seen in "
14547
"<filename>/etc/ldap.conf</filename>. If your server requires options not "
14548
"covered in the menu edit this file accordingly."
14551
#: serverguide/C/network-auth.xml:1264(para)
14553
"Now that <application>libnss-ldap</application> is configured enable the "
14554
"<application>auth-client-config</application> LDAP profile by entering:"
14557
#: serverguide/C/network-auth.xml:1270(command)
14558
msgid "sudo auth-client-config -t nss -p lac_ldap"
14561
#: serverguide/C/network-auth.xml:1275(para)
14563
"<emphasis>-t:</emphasis> only modifies "
14564
"<filename>/etc/nsswitch.conf</filename>."
14567
#: serverguide/C/network-auth.xml:1280(para)
14568
msgid "<emphasis>-p:</emphasis> name of the profile to enable, disable, etc."
14571
#: serverguide/C/network-auth.xml:1285(para)
14573
"<emphasis>lac_ldap:</emphasis> the <application>auth-client-"
14574
"config</application> profile that is part of the <application>ldap-auth-"
14575
"config</application> package."
14578
#: serverguide/C/network-auth.xml:1292(para)
14580
"Using the <application>pam-auth-update</application> utility, configure the "
14581
"system to use LDAP for authentication:"
14584
#: serverguide/C/network-auth.xml:1297(command)
14585
msgid "sudo pam-auth-update"
14588
#: serverguide/C/network-auth.xml:1300(para)
14590
"From the <application>pam-auth-update</application> menu, choose LDAP and "
14591
"any other authentication mechanisms you need."
14594
#: serverguide/C/network-auth.xml:1304(para)
14596
"You should now be able to login using user credentials stored in the LDAP "
14600
#: serverguide/C/network-auth.xml:1309(para)
14602
"If you are going to use LDAP to store Samba users you will need to configure "
14603
"the server to authenticate using LDAP. See <xref linkend=\"samba-ldap\"/> "
14607
#: serverguide/C/network-auth.xml:1317(title)
14608
msgid "User and Group Management"
14611
#: serverguide/C/network-auth.xml:1319(para)
14613
"The <application>ldap-utils</application> package comes with multiple "
14614
"utilities to manage the directory, but the long string of options needed, "
14615
"can make them a burden to use. The <application>ldapscripts</application> "
14616
"package contains configurable scripts to easily manage LDAP users and groups."
14619
#: serverguide/C/network-auth.xml:1325(para)
14620
msgid "To install the package, from a terminal enter:"
14623
#: serverguide/C/network-auth.xml:1330(command)
14624
msgid "sudo apt-get install ldapscripts"
14627
#: serverguide/C/network-auth.xml:1333(para)
14629
"Next, edit the config file "
14630
"<filename>/etc/ldapscripts/ldapscripts.conf</filename> uncommenting and "
14631
"changing the following to match your environment:"
14634
#: serverguide/C/network-auth.xml:1338(programlisting)
14638
"SERVER=localhost\n"
14639
"BINDDN='cn=admin,dc=example,dc=com'\n"
14640
"BINDPWDFILE=\"/etc/ldapscripts/ldapscripts.passwd\"\n"
14641
"SUFFIX='dc=example,dc=com'\n"
14642
"GSUFFIX='ou=Groups'\n"
14643
"USUFFIX='ou=People'\n"
14644
"MSUFFIX='ou=Computers'\n"
14650
#: serverguide/C/network-auth.xml:1351(para)
14652
"Now, create the <filename>ldapscripts.passwd</filename> file to allow "
14653
"authenticated access to the directory:"
14656
#: serverguide/C/network-auth.xml:1356(command)
14658
"sudo sh -c \"echo -n 'secret' > /etc/ldapscripts/ldapscripts.passwd\""
14661
#: serverguide/C/network-auth.xml:1357(command)
14662
msgid "sudo chmod 400 /etc/ldapscripts/ldapscripts.passwd"
14665
#: serverguide/C/network-auth.xml:1361(para)
14667
"Replace <quote>secret</quote> with the actual password for your LDAP admin "
14671
#: serverguide/C/network-auth.xml:1366(para)
14673
"The <application>ldapscripts</application> are now ready to help manage your "
14674
"directory. The following are some examples of how to use the scripts:"
14677
#: serverguide/C/network-auth.xml:1373(para)
14678
msgid "Create a new user:"
14681
#: serverguide/C/network-auth.xml:1377(command)
14682
msgid "sudo ldapadduser george example"
14685
#: serverguide/C/network-auth.xml:1379(para)
14687
"This will create a user with uid <emphasis role=\"italic\">george</emphasis> "
14688
"and set the user's primary group (gid) to <emphasis "
14689
"role=\"italic\">example</emphasis>"
14692
#: serverguide/C/network-auth.xml:1385(para)
14693
msgid "Change a user's password:"
14696
#: serverguide/C/network-auth.xml:1389(command)
14697
msgid "sudo ldapsetpasswd george"
14700
#: serverguide/C/network-auth.xml:1390(computeroutput)
14702
msgid "Changing password for user uid=george,ou=People,dc=example,dc=com"
14705
#: serverguide/C/network-auth.xml:1391(userinput)
14707
msgid "New Password: "
14710
#: serverguide/C/network-auth.xml:1392(userinput)
14712
msgid "New Password (verify): "
14715
#: serverguide/C/network-auth.xml:1396(para)
14716
msgid "Delete a user:"
14719
#: serverguide/C/network-auth.xml:1400(command)
14720
msgid "sudo ldapdeleteuser george"
14723
#: serverguide/C/network-auth.xml:1405(para)
14724
msgid "Add a group:"
14727
#: serverguide/C/network-auth.xml:1409(command)
14728
msgid "sudo ldapaddgroup qa"
14731
#: serverguide/C/network-auth.xml:1413(para)
14732
msgid "Delete a group:"
14735
#: serverguide/C/network-auth.xml:1417(command)
14736
msgid "sudo ldapdeletegroup qa"
14739
#: serverguide/C/network-auth.xml:1421(para)
14740
msgid "Add a user to a group:"
14743
#: serverguide/C/network-auth.xml:1425(command)
14744
msgid "sudo ldapaddusertogroup george qa"
14747
#: serverguide/C/network-auth.xml:1427(para)
14749
"You should now see a <emphasis>memberUid</emphasis> attribute for the "
14750
"<emphasis role=\"italic\">qa</emphasis> group with a value of <emphasis "
14751
"role=\"italic\">george</emphasis>."
14754
#: serverguide/C/network-auth.xml:1433(para)
14755
msgid "Remove a user from a group:"
14758
#: serverguide/C/network-auth.xml:1437(command)
14759
msgid "sudo ldapdeleteuserfromgroup george qa"
14762
#: serverguide/C/network-auth.xml:1439(para)
14764
"The <emphasis>memberUid</emphasis> attribute should now be removed from the "
14765
"<emphasis role=\"italic\">qa</emphasis> group."
14768
#: serverguide/C/network-auth.xml:1445(para)
14770
"The <application>ldapmodifyuser</application> script allows you to add, "
14771
"remove, or replace a user's attributes. The script uses the same syntax as "
14772
"the <application>ldapmodify</application> utility. For example:"
14775
#: serverguide/C/network-auth.xml:1450(command)
14776
msgid "sudo ldapmodifyuser george"
14779
#: serverguide/C/network-auth.xml:1451(computeroutput)
14782
"# About to modify the following entry :\n"
14783
"dn: uid=george,ou=People,dc=example,dc=com\n"
14784
"objectClass: account\n"
14785
"objectClass: posixAccount\n"
14788
"uidNumber: 1001\n"
14789
"gidNumber: 1001\n"
14790
"homeDirectory: /home/george\n"
14791
"loginShell: /bin/bash\n"
14793
"description: User account\n"
14794
"userPassword:: e1NTSEF9eXFsTFcyWlhwWkF1eGUybVdFWHZKRzJVMjFTSG9vcHk=\n"
14796
"# Enter your modifications here, end with CTRL-D.\n"
14797
"dn: uid=george,ou=People,dc=example,dc=com"
14800
#: serverguide/C/network-auth.xml:1467(userinput)
14804
"gecos: George Carlin"
14807
#: serverguide/C/network-auth.xml:1470(para)
14809
"The user's <emphasis>gecos</emphasis> should now be <quote>George "
14813
#: serverguide/C/network-auth.xml:1475(para)
14815
"Another great feature of <application>ldapscripts</application>, is the "
14816
"template system. Templates allow you to customize the attributes of user, "
14817
"group, and machine objectes. For example, to enable the "
14818
"<emphasis>user</emphasis> template edit "
14819
"<filename>/etc/ldapscripts/ldapscripts.conf</filename> changing:"
14822
#: serverguide/C/network-auth.xml:1482(programlisting)
14826
"UTEMPLATE=\"/etc/ldapscripts/ldapadduser.template\"\n"
14829
#: serverguide/C/network-auth.xml:1486(para)
14831
"There are <emphasis role=\"italic\">sample</emphasis> templates in the "
14832
"<filename>/etc/ldapscripts</filename> directory. Copy or rename the "
14833
"<filename>ldapadduser.template.sample</filename> file to "
14834
"<filename>/etc/ldapscripts/ldapadduser.template</filename>:"
14837
#: serverguide/C/network-auth.xml:1493(command)
14839
"sudo cp /etc/ldapscripts/ldapadduser.template.sample "
14840
"/etc/ldapscripts/ldapadduser.template"
14843
#: serverguide/C/network-auth.xml:1496(para)
14845
"Edit the new template to add the desired attributes. The following will "
14846
"create new user's as with an <emphasis>objectClass</emphasis> of "
14847
"<emphasis>inetOrgPerson</emphasis>:"
14850
#: serverguide/C/network-auth.xml:1501(programlisting)
14854
"dn: uid=<user>,<usuffix>,<suffix>\n"
14855
"objectClass: inetOrgPerson\n"
14856
"objectClass: posixAccount\n"
14857
"cn: <user>\n"
14858
"sn: <ask>\n"
14859
"uid: <user>\n"
14860
"uidNumber: <uid>\n"
14861
"gidNumber: <gid>\n"
14862
"homeDirectory: <home>\n"
14863
"loginShell: <shell>\n"
14864
"gecos: <user>\n"
14865
"description: User account\n"
14866
"title: Employee\n"
14869
#: serverguide/C/network-auth.xml:1517(para)
14871
"Notice the <emphasis><ask></emphasis> option used for the "
14872
"<emphasis>cn</emphasis> value. Using <ask> will configure "
14873
"<application>ldapadduser</application> to prompt you for the attribute value "
14874
"during user creation."
14877
#: serverguide/C/network-auth.xml:1525(para)
14879
"There are more useful scripts in the package, to see a full list enter: "
14880
"<command>dpkg -L ldapscripts | grep bin</command>"
14883
#: serverguide/C/network-auth.xml:1534(para)
14885
"The <ulink url=\"https://help.ubuntu.com/community/OpenLDAPServer\">OpenLDAP "
14886
"Ubuntu Wiki</ulink> page has more details."
14889
#: serverguide/C/network-auth.xml:1539(para)
14891
"For more information see <ulink url=\"http://www.openldap.org/\">OpenLDAP "
14892
"Home Page</ulink>"
14895
#: serverguide/C/network-auth.xml:1544(para)
14897
"Though starting to show it's age, a great source for in depth LDAP "
14898
"information is O'Reilly's <ulink "
14899
"url=\"http://www.oreilly.com/catalog/ldapsa/\">LDAP System "
14900
"Administration</ulink>"
14903
#: serverguide/C/network-auth.xml:1550(para)
14905
"Packt's <ulink url=\"http://www.packtpub.com/OpenLDAP-Developers-Server-Open-"
14906
"Source-Linux/book\">Mastering OpenLDAP</ulink> is a great reference covering "
14907
"newer versions of OpenLDAP."
14910
#: serverguide/C/network-auth.xml:1556(para)
14912
"For more information on <application>auth-client-config</application> see "
14913
"the man page: <command>man auth-client-config</command>."
14916
#: serverguide/C/network-auth.xml:1561(para)
14918
"For more details regarding the <application>ldapscripts</application> "
14919
"package see the man pages: <command>man ldapscripts</command>, <command>man "
14920
"ldapadduser</command>, <command>man ldapaddgroup</command>, etc."
14923
#: serverguide/C/network-auth.xml:1571(title)
14924
msgid "Samba and LDAP"
14927
#: serverguide/C/network-auth.xml:1573(para)
14929
"This section covers configuring Samba to use LDAP for user, group, and "
14930
"machine account information and authentication. The assumption is, you "
14931
"already have a working OpenLDAP directory installed and the server is "
14932
"configured to use it for authentication. See <xref linkend=\"openldap-"
14933
"server\"/> and <xref linkend=\"openldap-auth-config\"/> for details on "
14934
"setting up OpenLDAP. For more information on installing and configuring "
14935
"Samba see <xref linkend=\"windows-networking\"/>."
14938
#: serverguide/C/network-auth.xml:1583(para)
14940
"There are three packages needed when integrating Samba with LDAP. "
14941
"<application>samba</application>, <application>samba-doc</application>, and "
14942
"<application>smbldap-tools</application> packages . To install the packages, "
14943
"from a terminal enter:"
14946
#: serverguide/C/network-auth.xml:1589(command)
14947
msgid "sudo apt-get install samba samba-doc smbldap-tools"
14950
#: serverguide/C/network-auth.xml:1592(para)
14952
"Strictly speaking the <application>smbldap-tools</application> package isn't "
14953
"needed, but unless you have another package or custom scripts, a method of "
14954
"managing users, groups, and computer accounts is needed."
14957
#: serverguide/C/network-auth.xml:1599(title)
14958
msgid "OpenLDAP Configuration"
14961
#: serverguide/C/network-auth.xml:1601(para)
14963
"In order for Samba to use OpenLDAP as a <emphasis>passdb backend</emphasis>, "
14964
"the user objects in the directory will need additional attributes. This "
14965
"section assumes you want Samba to be configured as a Windows NT domain "
14966
"controller, and will add the necessary LDAP objects and attributes."
14969
#: serverguide/C/network-auth.xml:1609(para)
14971
"The Samba attributes are defined in the <filename>samba.schema</filename> "
14972
"file which is part of the <application>samba-doc</application> package. The "
14973
"schema file needs to be unzipped and copied to "
14974
"<filename>/etc/ldap/schema</filename>. From a terminal prompt enter:"
14977
#: serverguide/C/network-auth.xml:1616(command)
14979
"sudo cp /usr/share/doc/samba-doc/examples/LDAP/samba.schema.gz "
14980
"/etc/ldap/schema/"
14983
#: serverguide/C/network-auth.xml:1617(command)
14984
msgid "sudo gzip -d /etc/ldap/schema/samba.schema.gz"
14987
#: serverguide/C/network-auth.xml:1623(para)
14989
"The <emphasis>samba</emphasis> schema needs to be added to the "
14990
"<emphasis>cn=config</emphasis> tree. The procedure to add a new schema to "
14991
"<application>slapd</application> is also detailed in <xref "
14992
"linkend=\"openldap-configuration\"/>."
14995
#: serverguide/C/network-auth.xml:1631(para) serverguide/C/network-auth.xml:2666(para)
14997
"First, create a configuration file named "
14998
"<filename>schema_convert.conf</filename>, or a similar descriptive name, "
14999
"containing the following lines:"
15002
#: serverguide/C/network-auth.xml:1636(programlisting)
15006
"include /etc/ldap/schema/core.schema\n"
15007
"include /etc/ldap/schema/collective.schema\n"
15008
"include /etc/ldap/schema/corba.schema\n"
15009
"include /etc/ldap/schema/cosine.schema\n"
15010
"include /etc/ldap/schema/duaconf.schema\n"
15011
"include /etc/ldap/schema/dyngroup.schema\n"
15012
"include /etc/ldap/schema/inetorgperson.schema\n"
15013
"include /etc/ldap/schema/java.schema\n"
15014
"include /etc/ldap/schema/misc.schema\n"
15015
"include /etc/ldap/schema/nis.schema\n"
15016
"include /etc/ldap/schema/openldap.schema\n"
15017
"include /etc/ldap/schema/ppolicy.schema\n"
15018
"include /etc/ldap/schema/samba.schema\n"
15021
#: serverguide/C/network-auth.xml:1666(para) serverguide/C/network-auth.xml:2701(para)
15023
"Now use <application>slapcat</application> to convert the schema files:"
15026
#: serverguide/C/network-auth.xml:1671(command)
15028
"slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 -s "
15029
"\"cn={12}samba,cn=schema,cn=config\" > /tmp/cn=samba.ldif"
15032
#: serverguide/C/network-auth.xml:1674(para) serverguide/C/network-auth.xml:2709(para)
15034
"Change the above file and path names to match your own if they are different."
15037
#: serverguide/C/network-auth.xml:1681(para)
15039
"Edit the generated <filename>/tmp/cn\\=samba.ldif</filename> file, changing "
15040
"the following attributes:"
15043
#: serverguide/C/network-auth.xml:1685(programlisting)
15047
"dn: cn=samba,cn=schema,cn=config\n"
15052
#: serverguide/C/network-auth.xml:1695(programlisting)
15056
"structuralObjectClass: olcSchemaConfig\n"
15057
"entryUUID: b53b75ca-083f-102d-9fff-2f64fd123c95\n"
15058
"creatorsName: cn=config\n"
15059
"createTimestamp: 20080827045234Z\n"
15060
"entryCSN: 20080827045234.341425Z#000000#000#000000\n"
15061
"modifiersName: cn=config\n"
15062
"modifyTimestamp: 20080827045234Z\n"
15065
#: serverguide/C/network-auth.xml:1720(command)
15066
msgid "ldapadd -x -D cn=admin,cn=config -W -f /tmp/cn\\=samba.ldif"
15069
#: serverguide/C/network-auth.xml:1726(para)
15071
"There should now be a <emphasis>dn: "
15072
"cn={X}misc,cn=schema,cn=config</emphasis>, where \"X\" is the next "
15073
"sequential schema, entry in the cn=config tree."
15076
#: serverguide/C/network-auth.xml:1734(para)
15078
"Copy and paste the following into a file named "
15079
"<filename>samba_indexes.ldif</filename>:"
15082
#: serverguide/C/network-auth.xml:1738(programlisting)
15086
"dn: olcDatabase={1}hdb,cn=config\n"
15087
"changetype: modify\n"
15088
"add: olcDbIndex\n"
15089
"olcDbIndex: uidNumber eq\n"
15090
"olcDbIndex: gidNumber eq\n"
15091
"olcDbIndex: loginShell eq\n"
15092
"olcDbIndex: uid eq,pres,sub\n"
15093
"olcDbIndex: memberUid eq,pres,sub\n"
15094
"olcDbIndex: uniqueMember eq,pres\n"
15095
"olcDbIndex: sambaSID eq\n"
15096
"olcDbIndex: sambaPrimaryGroupSID eq\n"
15097
"olcDbIndex: sambaGroupType eq\n"
15098
"olcDbIndex: sambaSIDList eq\n"
15099
"olcDbIndex: sambaDomainName eq\n"
15100
"olcDbIndex: default sub\n"
15103
#: serverguide/C/network-auth.xml:1756(para)
15105
"Using the <application>ldapmodify</application> utility load the new indexes:"
15108
#: serverguide/C/network-auth.xml:1761(command)
15109
msgid "ldapmodify -x -D cn=admin,cn=config -W -f samba_indexes.ldif"
15112
#: serverguide/C/network-auth.xml:1763(para)
15114
"If all went well you should see the new indexes using "
15115
"<application>ldapsearch</application>:"
15118
#: serverguide/C/network-auth.xml:1768(command)
15120
"ldapsearch -xLLL -D cn=admin,cn=config -x -b cn=config -W olcDatabase={1}hdb"
15123
#: serverguide/C/network-auth.xml:1774(para)
15125
"Next, configure the <application>smbldap-tools</application> package to "
15126
"match your environment. The package comes with a configuration script that "
15127
"will ask questions about the needed options. To run the script enter:"
15130
#: serverguide/C/network-auth.xml:1780(command)
15131
msgid "sudo gzip -d /usr/share/doc/smbldap-tools/configure.pl.gz"
15134
#: serverguide/C/network-auth.xml:1781(command)
15135
msgid "sudo perl /usr/share/doc/smbldap-tools/configure.pl"
15138
#: serverguide/C/network-auth.xml:1784(para)
15140
"Once you have answered the questions, there should be <filename>/etc/smbldap-"
15141
"tools/smbldap.conf</filename> and <filename>/etc/smbldap-"
15142
"tools/smbldap_bind.conf</filename> files. These files are generated by the "
15143
"configure script, so if you made any mistakes while executing the script it "
15144
"may be simpler to edit the file appropriately."
15147
#: serverguide/C/network-auth.xml:1794(para)
15149
"The <application>smbldap-populate</application> script will add the "
15150
"necessary users, groups, and LDAP objects required for Samba. It is a good "
15151
"idea to make a backup LDAP Data Interchange Format (LDIF) file with "
15152
"<application>slapcat</application> before executing the command:"
15155
#: serverguide/C/network-auth.xml:1801(command)
15156
msgid "sudo slapcat -l backup.ldif"
15159
#: serverguide/C/network-auth.xml:1807(para)
15161
"Once you have a current backup execute <application>smbldap-"
15162
"populate</application> by entering:"
15165
#: serverguide/C/network-auth.xml:1812(command)
15166
msgid "sudo smbldap-populate"
15169
#: serverguide/C/network-auth.xml:1816(para)
15171
"You can create an LDIF file containing the new Samba objects by executing "
15172
"<command>sudo smbldap-populate -e samba.ldif</command>. This allows you to "
15173
"look over the changes making sure everything is correct."
15176
#: serverguide/C/network-auth.xml:1824(para)
15178
"Your LDAP directory now has the necessary domain information to authenticate "
15182
#: serverguide/C/network-auth.xml:1830(title)
15183
msgid "Samba Configuration"
15186
#: serverguide/C/network-auth.xml:1832(para)
15188
"There a multiple ways to configure Samba for details on some common "
15189
"configurations see <xref linkend=\"windows-networking\"/>. To configure "
15190
"Samba to use LDAP, edit the main Samba configuration file "
15191
"<filename>/etc/samba/smb.conf</filename> commenting the <emphasis>passdb "
15192
"backend</emphasis> option and adding the following:"
15195
#: serverguide/C/network-auth.xml:1838(programlisting)
15199
"# passdb backend = tdbsam\n"
15201
"# LDAP Settings\n"
15202
" passdb backend = ldapsam:ldap://hostname\n"
15203
" ldap suffix = dc=example,dc=com\n"
15204
" ldap user suffix = ou=People\n"
15205
" ldap group suffix = ou=Groups\n"
15206
" ldap machine suffix = ou=Computers\n"
15207
" ldap idmap suffix = ou=Idmap\n"
15208
" ldap admin dn = cn=admin,dc=example,dc=com\n"
15209
" ldap ssl = start tls\n"
15210
" ldap passwd sync = yes\n"
15212
" add machine script = sudo /usr/sbin/smbldap-useradd -t 0 -w \"%u\"\n"
15215
#: serverguide/C/network-auth.xml:1855(para)
15216
msgid "Restart <application>samba</application> to enable the new settings:"
15219
#: serverguide/C/network-auth.xml:1863(para)
15221
"Now Samba needs to know the LDAP admin password. From a terminal prompt "
15225
#: serverguide/C/network-auth.xml:1868(command)
15226
msgid "sudo smbpasswd -w secret"
15229
#: serverguide/C/network-auth.xml:1872(para)
15231
"Replacing <emphasis role=\"italic\">secret</emphasis> with your LDAP admin "
15235
#: serverguide/C/network-auth.xml:1877(para)
15237
"If you currently have users in LDAP, and you want them to authenticate using "
15238
"Samba, they will need some Samba attributes defined in the "
15239
"<filename>samba.schema</filename> file. Add the Samba attributes to existing "
15240
"users using the <application>smbpasswd</application> utility, replacing "
15241
"<emphasis role=\"italic\">username</emphasis> with an actual user:"
15244
#: serverguide/C/network-auth.xml:1885(command)
15245
msgid "sudo smbpasswd -a username"
15248
#: serverguide/C/network-auth.xml:1888(para)
15249
msgid "You will then be asked to enter the user's password."
15252
#: serverguide/C/network-auth.xml:1892(para)
15254
"To add new user, group, and machine accounts use the utilities from the "
15255
"<application>smbldap-tools</application> package. Here are some examples:"
15258
#: serverguide/C/network-auth.xml:1899(para)
15260
"To add a new user to LDAP with Samba attributes enter the following, "
15261
"replacing username with an actual username:"
15264
#: serverguide/C/network-auth.xml:1903(command)
15265
msgid "sudo smbldap-useradd -a -P username"
15268
#: serverguide/C/network-auth.xml:1905(para)
15270
"The <emphasis>-a</emphasis> option adds the Samba attributes, and the "
15271
"<emphasis>-P</emphasis> options calls the <application>smbldap-"
15272
"passwd</application> utility after the user is created allowing you to enter "
15273
"a password for the user."
15276
#: serverguide/C/network-auth.xml:1911(para)
15277
msgid "To remove a user from the directory enter:"
15280
#: serverguide/C/network-auth.xml:1915(command)
15281
msgid "sudo smbldap-userdel username"
15284
#: serverguide/C/network-auth.xml:1917(para)
15286
"The <application>smbldap-userdel</application> utility also has a <emphasis>-"
15287
"r</emphasis> option to remove the user's home directory."
15290
#: serverguide/C/network-auth.xml:1922(para)
15292
"Use <application>smbldap-groupadd</application> to add a group, replacing "
15293
"groupname with an appropriate group:"
15296
#: serverguide/C/network-auth.xml:1926(command)
15297
msgid "sudo smbldap-groupadd -a groupname"
15300
#: serverguide/C/network-auth.xml:1928(para)
15302
"Similar to <application>smbldap-useradd</application>, the <emphasis>-"
15303
"a</emphasis> adds the Samba attributes."
15306
#: serverguide/C/network-auth.xml:1933(para)
15308
"To add a user to a group use <application>smbldap-groupmod</application>:"
15311
#: serverguide/C/network-auth.xml:1937(command)
15312
msgid "sudo smbldap-groupmod -m username groupname"
15315
#: serverguide/C/network-auth.xml:1939(para)
15317
"Be sure to replace <emphasis>username</emphasis> with a real user. Also, the "
15318
"<emphasis>-m</emphasis> option can add more than one user at a time by "
15319
"listing them in <emphasis>comma separated</emphasis> format."
15322
#: serverguide/C/network-auth.xml:1945(para)
15324
"<application>smbldap-groupmod</application> can also be used to remove a "
15325
"user from a group:"
15328
#: serverguide/C/network-auth.xml:1949(command)
15329
msgid "sudo smbldap-groupmod -x username groupname"
15332
#: serverguide/C/network-auth.xml:1953(para)
15334
"Additionally, the <application>smbldap-useradd</application> utility can add "
15335
"Samba machine accounts:"
15338
#: serverguide/C/network-auth.xml:1957(command)
15339
msgid "sudo smbldap-useradd -t 0 -w username"
15342
#: serverguide/C/network-auth.xml:1959(para)
15344
"Replace <emphasis>username</emphasis> with the name of the workstation. The "
15345
"<emphasis>-t 0</emphasis> option creates the machine account without a "
15346
"delay, while the <emphasis>-w</emphasis> option specifies the user as a "
15347
"machine account. Also, note the <emphasis>add machine script</emphasis> "
15348
"option in <filename>/etc/samba/smb.conf</filename> was changed to use "
15349
"<application>smbldap-useradd</application>."
15352
#: serverguide/C/network-auth.xml:1968(para)
15354
"There are more useful utilities and options in the <application>smbldap-"
15355
"tools</application> package. The man page for each utility provides more "
15359
#: serverguide/C/network-auth.xml:1979(para)
15361
"There are multiple places where LDAP and Samba is documented in the <ulink "
15362
"url=\"http://samba.org/samba/docs/man/Samba-HOWTO-Collection/\">Samba HOWTO "
15363
"Collection</ulink>."
15366
#: serverguide/C/network-auth.xml:1985(para)
15368
"Specifically see the <ulink url=\"http://samba.org/samba/docs/man/Samba-"
15369
"HOWTO-Collection/passdb.html\">passdb section</ulink>."
15372
#: serverguide/C/network-auth.xml:1991(para)
15374
"Another good site is <ulink url=\"http://www.iallanis.info/smbldap-"
15375
"tools/docs/samba-ldap-howto/\">Samba OpenLDAP HOWTO</ulink>."
15378
#: serverguide/C/network-auth.xml:1997(para)
15380
"Again, for more information on <application>smbldap-tools</application> see "
15381
"the man pages: <command>man smbldap-useradd</command>, <command>man smbldap-"
15382
"groupadd</command>, <command>man smbldap-populate</command>, etc."
15385
#: serverguide/C/network-auth.xml:2004(para)
15387
"Also, there is a list of <ulink "
15388
"url=\"https://help.ubuntu.com/community/Samba#samba-ldap\">Ubuntu "
15389
"wiki</ulink> articles with more information."
15392
#: serverguide/C/network-auth.xml:2013(title)
15396
#: serverguide/C/network-auth.xml:2015(para)
15398
"<application>Kerberos</application> is a network authentication system based "
15399
"on the principal of a trusted third party. The other two parties being the "
15400
"user and the service the user wishes to authenticate to. Not all services "
15401
"and applications can use Kerberos, but for those that can, it brings the "
15402
"network environment one step closer to being Single Sign On (SSO)."
15405
#: serverguide/C/network-auth.xml:2021(para)
15407
"This section covers installation and configuration of a Kerberos server, and "
15408
"some example client configurations."
15411
#: serverguide/C/network-auth.xml:2028(para)
15413
"If you are new to Kerberos there are a few terms that are good to understand "
15414
"before setting up a Kerberos server. Most of the terms will relate to things "
15415
"you may be familiar with in other environments:"
15418
#: serverguide/C/network-auth.xml:2035(para)
15420
"<emphasis>Principal:</emphasis> any users, computers, and services provided "
15421
"by servers need to be defined as Kerberos Principals."
15424
#: serverguide/C/network-auth.xml:2040(para)
15426
"<emphasis>Instances:</emphasis> are used for service principals and special "
15427
"administrative principals."
15430
#: serverguide/C/network-auth.xml:2045(para)
15432
"<emphasis>Realms:</emphasis> the unique realm of control provided by the "
15433
"Kerberos installation. Usually the DNS domain converted to uppercase "
15437
#: serverguide/C/network-auth.xml:2051(para)
15439
"<emphasis>Key Distribution Center:</emphasis> (KDC) consist of three parts, "
15440
"a database of all principals, the authentication server, and the ticket "
15441
"granting server. For each realm there must be at least one KDC."
15444
#: serverguide/C/network-auth.xml:2057(para)
15446
"<emphasis>Ticket Granting Ticket:</emphasis> issued by the Authentication "
15447
"Server (AS), the Ticket Granting Ticket (TGT) is encrypted in the user's "
15448
"password which is known only to the user and the KDC."
15451
#: serverguide/C/network-auth.xml:2063(para)
15453
"<emphasis>Ticket Granting Server:</emphasis> (TGS) issues service tickets to "
15454
"clients upon request."
15457
#: serverguide/C/network-auth.xml:2068(para)
15459
"<emphasis>Tickets:</emphasis> confirm the identity of the two principals. "
15460
"One principal being a user and the other a service requested by the user. "
15461
"Tickets establish an encryption key used for secure communication during the "
15462
"authenticated session."
15465
#: serverguide/C/network-auth.xml:2074(para)
15467
"<emphasis>Keytab Files:</emphasis> are files extracted from the KDC "
15468
"principal database and contain the encryption key for a service or host."
15471
#: serverguide/C/network-auth.xml:2081(para)
15473
"To put the pieces together, a Realm has at least one KDC, preferably two for "
15474
"redundancy, which contains a database of Principals. When a user principal "
15475
"logs into a workstation, configured for Kerberos authentication, the KDC "
15476
"issues a Ticket Granting Ticket (TGT). If the user supplied credentials "
15477
"match, the user is authenticated and can then request tickets for Kerberized "
15478
"services from the Ticket Granting Server (TGS). The service tickets allow "
15479
"the user to authenticate to the service without entering another username "
15483
#: serverguide/C/network-auth.xml:2090(title)
15484
msgid "Kerberos Server"
15487
#: serverguide/C/network-auth.xml:2094(para)
15489
"Before installing the Kerberos server a properly configured DNS server is "
15490
"needed for your domain. Since the Kerberos Realm by convention matches the "
15491
"domain name, this section uses the <emphasis>example.com</emphasis> domain "
15492
"configured in <xref linkend=\"dns-primarymaster-configuration\"/>."
15495
#: serverguide/C/network-auth.xml:2100(para)
15497
"Also, Kerberos is a time sensitive protocol. So if the local system time "
15498
"between a client machine and the server differs by more than five minutes "
15499
"(by default), the workstation will not be able to authenticate. To correct "
15500
"the problem all hosts should have their time synchronized using the "
15501
"<emphasis>Network Time Protocol (NTP)</emphasis>. For details on setting up "
15502
"NTP see <xref linkend=\"NTP\"/>."
15505
#: serverguide/C/network-auth.xml:2107(para)
15507
"The first step in installing a Kerberos Realm is to install the "
15508
"<application>krb5-kdc</application> and <application>krb5-admin-"
15509
"server</application> packages. From a terminal enter:"
15512
#: serverguide/C/network-auth.xml:2113(command) serverguide/C/network-auth.xml:2288(command)
15513
msgid "sudo apt-get install krb5-kdc krb5-admin-server"
15516
#: serverguide/C/network-auth.xml:2116(para)
15518
"You will be asked at the end of the install to supply a name for the "
15519
"Kerberos and Admin servers, which may or may not be the same server, for the "
15523
#: serverguide/C/network-auth.xml:2121(para)
15525
"Next, create the new realm with the <application>kdb5_newrealm</application> "
15529
#: serverguide/C/network-auth.xml:2126(command)
15530
msgid "sudo krb5_newrealm"
15533
#: serverguide/C/network-auth.xml:2133(para)
15535
"The questions asked during installation are used to configure the "
15536
"<filename>/etc/krb5.conf</filename> file. If you need to adjust the Key "
15537
"Distribution Center (KDC) settings simply edit the file and restart the "
15538
"<application>krb5-kdc</application> daemon."
15541
#: serverguide/C/network-auth.xml:2141(para)
15543
"Now that the KDC running an admin user is needed. It is recommended to use a "
15544
"different username from your everyday username. Using the "
15545
"<application>kadmin.local</application> utility in a terminal prompt enter:"
15548
#: serverguide/C/network-auth.xml:2147(command) serverguide/C/network-auth.xml:2943(command)
15549
msgid "sudo kadmin.local"
15552
#: serverguide/C/network-auth.xml:2148(computeroutput)
15555
"Authenticating as principal root/admin@EXAMPLE.COM with password.\n"
15559
#: serverguide/C/network-auth.xml:2149(userinput)
15561
msgid " addprinc steve/admin"
15564
#: serverguide/C/network-auth.xml:2150(computeroutput)
15567
"WARNING: no policy specified for steve/admin@EXAMPLE.COM; defaulting to no "
15569
"Enter password for principal \"steve/admin@EXAMPLE.COM\": \n"
15570
"Re-enter password for principal \"steve/admin@EXAMPLE.COM\": \n"
15571
"Principal \"steve/admin@EXAMPLE.COM\" created.\n"
15575
#: serverguide/C/network-auth.xml:2154(userinput)
15580
#: serverguide/C/network-auth.xml:2157(para)
15582
"In the above example <emphasis role=\"italic\">steve</emphasis> is the "
15583
"<emphasis>Principal</emphasis>, <emphasis role=\"italic\">/admin</emphasis> "
15584
"is an <emphasis>Instance</emphasis>, and <emphasis "
15585
"role=\"italic\">@EXAMPLE.COM</emphasis> signifies the realm. The <emphasis "
15586
"role=\"italic\">\"every day\"</emphasis> Principal would be "
15587
"<emphasis>steve@EXAMPLE.COM</emphasis>, and should have only normal user "
15591
#: serverguide/C/network-auth.xml:2165(para)
15593
"Replace <emphasis>EXAMPLE.COM</emphasis> and <emphasis>steve</emphasis> with "
15594
"your Realm and admin username."
15597
#: serverguide/C/network-auth.xml:2173(para)
15599
"Next, the new admin user needs to have the appropriate Access Control List "
15600
"(ACL) permissions. The permissions are configured in the "
15601
"<filename>/etc/krb5kdc/kadm5.acl</filename> file:"
15604
#: serverguide/C/network-auth.xml:2178(programlisting)
15608
"steve/admin@EXAMPLE.COM *\n"
15611
#: serverguide/C/network-auth.xml:2182(para)
15613
"This entry grants <emphasis>steve/admin</emphasis> the ability to perform "
15614
"any operation on all principals in the realm."
15617
#: serverguide/C/network-auth.xml:2189(para)
15619
"Now restart the <application>krb5-admin-server</application> for the new ACL "
15623
#: serverguide/C/network-auth.xml:2194(command)
15624
msgid "sudo /etc/init.d/krb5-admin-server restart"
15627
#: serverguide/C/network-auth.xml:2200(para)
15629
"The new user principal can be tested using the <application>kinit "
15630
"utility</application>:"
15633
#: serverguide/C/network-auth.xml:2205(command)
15634
msgid "kinit steve/admin"
15637
#: serverguide/C/network-auth.xml:2206(computeroutput)
15639
msgid "steve/admin@EXAMPLE.COM's Password:"
15642
#: serverguide/C/network-auth.xml:2209(para)
15644
"After entering the password, use the <application>klist</application> "
15645
"utility to view information about the Ticket Granting Ticket (TGT):"
15648
#: serverguide/C/network-auth.xml:2215(command) serverguide/C/network-auth.xml:2550(command)
15652
#: serverguide/C/network-auth.xml:2216(computeroutput)
15655
"Credentials cache: FILE:/tmp/krb5cc_1000\n"
15656
" Principal: steve/admin@EXAMPLE.COM\n"
15658
" Issued Expires Principal\n"
15659
"Jul 13 17:53:34 Jul 14 03:53:34 krbtgt/EXAMPLE.COM@EXAMPLE.COM"
15662
#: serverguide/C/network-auth.xml:2223(para)
15664
"You may need to add an entry into the <filename>/etc/hosts</filename> for "
15665
"the KDC. For example:"
15668
#: serverguide/C/network-auth.xml:2227(programlisting)
15672
"192.168.0.1 kdc01.example.com kdc01\n"
15675
#: serverguide/C/network-auth.xml:2231(para)
15677
"Replacing <emphasis>192.168.0.1</emphasis> with the IP address of your KDC."
15680
#: serverguide/C/network-auth.xml:2238(para)
15682
"In order for clients to determine the KDC for the Realm some DNS SRV records "
15683
"are needed. Add the following to "
15684
"<filename>/etc/named/db.example.com</filename>:"
15687
#: serverguide/C/network-auth.xml:2243(programlisting)
15691
"_kerberos._udp.EXAMPLE.COM. IN SRV 1 0 88 kdc01.example.com.\n"
15692
"_kerberos._tcp.EXAMPLE.COM. IN SRV 1 0 88 kdc01.example.com.\n"
15693
"_kerberos._udp.EXAMPLE.COM. IN SRV 10 0 88 kdc02.example.com. \n"
15694
"_kerberos._tcp.EXAMPLE.COM. IN SRV 10 0 88 kdc02.example.com. \n"
15695
"_kerberos-adm._tcp.EXAMPLE.COM. IN SRV 1 0 749 kdc01.example.com.\n"
15696
"_kpasswd._udp.EXAMPLE.COM. IN SRV 1 0 464 kdc01.example.com.\n"
15699
#: serverguide/C/network-auth.xml:2253(para)
15701
"Replace <emphasis>EXAMPLE.COM</emphasis>, <emphasis>kdc01</emphasis>, and "
15702
"<emphasis>kdc02</emphasis> with your domain name, primary KDC, and secondary "
15706
#: serverguide/C/network-auth.xml:2259(para)
15708
"See <xref linkend=\"dns\"/> for detailed instructions on setting up DNS."
15711
#: serverguide/C/network-auth.xml:2266(para)
15712
msgid "Your new Kerberos Realm is now ready to authenticate clients."
15715
#: serverguide/C/network-auth.xml:2273(title)
15716
msgid "Secondary KDC"
15719
#: serverguide/C/network-auth.xml:2275(para)
15721
"Once you have one Key Distribution Center (KDC) on your network, it is good "
15722
"practice to have a Secondary KDC in case the primary becomes unavailable."
15725
#: serverguide/C/network-auth.xml:2283(para)
15727
"First, install the packages, and when asked for the Kerberos and Admin "
15728
"server names enter the name of the Primary KDC:"
15731
#: serverguide/C/network-auth.xml:2294(para)
15733
"Once you have the packages installed, create the Secondary KDC's host "
15734
"principal. From a terminal prompt, enter:"
15737
#: serverguide/C/network-auth.xml:2299(command)
15738
msgid "kadmin -q \"addprinc -randkey host/kdc02.example.com\""
15741
#: serverguide/C/network-auth.xml:2303(para)
15743
"After, issuing any <application>kadmin</application> commands you will be "
15744
"prompted for your <emphasis>username/admin@EXAMPLE.COM</emphasis> principal "
15748
#: serverguide/C/network-auth.xml:2312(para)
15749
msgid "Extract the <emphasis>keytab</emphasis> file:"
15752
#: serverguide/C/network-auth.xml:2317(command)
15753
msgid "kadmin -q \"ktadd -k keytab.kdc02 host/kdc02.example.com\""
15756
#: serverguide/C/network-auth.xml:2323(para)
15758
"There should now be a <filename>keytab.kdc02</filename> in the current "
15759
"directory, move the file to <filename>/etc/krb5.keytab</filename>:"
15762
#: serverguide/C/network-auth.xml:2329(command)
15763
msgid "sudo mv keytab.kdc02 /etc/krb5.keytab"
15766
#: serverguide/C/network-auth.xml:2333(para)
15768
"If the path to the <filename>keytab.kdc02</filename> file is different "
15769
"adjust accordingly."
15772
#: serverguide/C/network-auth.xml:2338(para)
15774
"Also, you can list the principals in a Keytab file, which can be useful when "
15775
"troubleshooting, using the <application>klist</application> utility:"
15778
#: serverguide/C/network-auth.xml:2344(command)
15779
msgid "sudo klist -k /etc/krb5.keytab"
15782
#: serverguide/C/network-auth.xml:2350(para)
15784
"Next, there needs to be a <filename>kpropd.acl</filename> file on each KDC "
15785
"that lists all KDCs for the Realm. For example, on both primary and "
15786
"secondary KDC, create <filename>/etc/krb5kdc/kpropd.acl</filename>:"
15789
#: serverguide/C/network-auth.xml:2355(programlisting)
15793
"host/kdc01.example.com@EXAMPLE.COM\n"
15794
"host/kdc02.example.com@EXAMPLE.COM\n"
15797
#: serverguide/C/network-auth.xml:2363(para)
15798
msgid "Create an empty database on the <emphasis>Secondary KDC</emphasis>:"
15801
#: serverguide/C/network-auth.xml:2368(command)
15802
msgid "sudo kdb5_util -s create"
15805
#: serverguide/C/network-auth.xml:2374(para)
15807
"Now start the <application>kpropd</application> daemon, which listens for "
15808
"connections from the <application>kprop</application> utility. "
15809
"<application>kprop</application> is used to transfer dump files:"
15812
#: serverguide/C/network-auth.xml:2381(command)
15813
msgid "sudo kpropd -S"
15816
#: serverguide/C/network-auth.xml:2387(para)
15818
"From a terminal on the <emphasis>Primary KDC</emphasis>, create a dump file "
15819
"of the principal database:"
15822
#: serverguide/C/network-auth.xml:2392(command)
15823
msgid "sudo kdb5_util dump /var/lib/krb5kdc/dump"
15826
#: serverguide/C/network-auth.xml:2398(para)
15828
"Extract the Primary KDC's <emphasis>keytab</emphasis> file and copy it to "
15829
"<filename>/etc/krb5.keytab</filename>:"
15832
#: serverguide/C/network-auth.xml:2403(command)
15833
msgid "kadmin -q \"ktadd -k keytab.kdc01 host/kdc01.example.com\""
15836
#: serverguide/C/network-auth.xml:2404(command)
15837
msgid "sudo mv keytab.kdc01 /etc/kr5b.keytab"
15840
#: serverguide/C/network-auth.xml:2408(para)
15842
"Make sure there is a <emphasis>host</emphasis> for "
15843
"<emphasis>kdc01.example.com</emphasis> before extracting the Keytab."
15846
#: serverguide/C/network-auth.xml:2416(para)
15848
"Using the <application>kprop</application> utility push the database to the "
15852
#: serverguide/C/network-auth.xml:2421(command)
15853
msgid "sudo kprop -r EXAMPLE.COM -f /var/lib/krb5kdc/dump kdc02.example.com"
15856
#: serverguide/C/network-auth.xml:2425(para)
15858
"There should be a <emphasis>SUCCEEDED</emphasis> message if the propagation "
15859
"worked. If there is an error message check "
15860
"<filename>/var/log/syslog</filename> on the secondary KDC for more "
15864
#: serverguide/C/network-auth.xml:2431(para)
15866
"You may also want to create a <application>cron</application> job to "
15867
"periodically update the database on the Secondary KDC. For example, the "
15868
"following will push the database every hour:"
15871
#: serverguide/C/network-auth.xml:2436(programlisting)
15875
"# m h dom mon dow command\n"
15876
"0 * * * * /usr/sbin/kdb5_util dump /var/lib/krb5kdc/dump && "
15877
"/usr/sbin/kprop -r EXAMPLE.COM -f /var/lib/krb5kdc/dump kdc02.example.com\n"
15880
#: serverguide/C/network-auth.xml:2444(para)
15882
"Back on the <emphasis>Secondary KDC</emphasis>, create a "
15883
"<emphasis>stash</emphasis> file to hold the Kerberos master key:"
15886
#: serverguide/C/network-auth.xml:2450(command)
15887
msgid "sudo kdb5_util stash"
15890
#: serverguide/C/network-auth.xml:2456(para)
15892
"Finally, start the <application>krb5-kdc</application> daemon on the "
15896
#: serverguide/C/network-auth.xml:2461(command) serverguide/C/network-auth.xml:3073(command)
15897
msgid "sudo /etc/init.d/krb5-kdc start"
15900
#: serverguide/C/network-auth.xml:2467(para)
15902
"The <emphasis>Secondary KDC</emphasis> should now be able to issue tickets "
15903
"for the Realm. You can test this by stopping the <application>krb5-"
15904
"kdc</application> daemon on the Primary KDC, then use "
15905
"<application>kinit</application> to request a ticket. If all goes well you "
15906
"should receive a ticket from the Secondary KDC."
15909
#: serverguide/C/network-auth.xml:2475(title)
15910
msgid "Kerberos Linux Client"
15913
#: serverguide/C/network-auth.xml:2477(para)
15915
"This section covers configuring a Linux system as a "
15916
"<application>Kerberos</application> client. This will allow access to any "
15917
"kerberized services once a user has successfully logged into the system."
15920
#: serverguide/C/network-auth.xml:2485(para)
15922
"In order to authenticate to a Kerberos Realm, the <application>krb5-"
15923
"user</application> and <application>libpam-krb5</application> packages are "
15924
"needed, along with a few others that are not strictly necessary but make "
15925
"life easier. To install the packages enter the following in a terminal "
15929
#: serverguide/C/network-auth.xml:2492(command)
15931
"sudo apt-get install krb5-user libpam-krb5 libpam-ccreds auth-client-config"
15934
#: serverguide/C/network-auth.xml:2495(para)
15936
"The <application>auth-client-config</application> package allows simple "
15937
"configuration of PAM for authentication from multiple sources, and the "
15938
"<application>libpam-ccreds</application> will cache authentication "
15939
"credentials allowing you to login in case the Key Distribution Center (KDC) "
15940
"is unavailable. This package is also useful for laptops that may "
15941
"authenticate using Kerberos while on the corporate network, but will need to "
15942
"be accessed off the network as well."
15945
#: serverguide/C/network-auth.xml:2506(para)
15946
msgid "To configure the client in a terminal enter:"
15949
#: serverguide/C/network-auth.xml:2511(command)
15950
msgid "sudo dpkg-reconfigure krb5-config"
15953
#: serverguide/C/network-auth.xml:2514(para)
15955
"You will then be prompted to enter the name of the Kerberos Realm. Also, if "
15956
"you don't have DNS configured with Kerberos <emphasis>SRV</emphasis> "
15957
"records, the menu will prompt you for the hostname of the Key Distribution "
15958
"Center (KDC) and Realm Administration server."
15961
#: serverguide/C/network-auth.xml:2520(para)
15963
"The <application>dpkg-reconfigure</application> adds entries to the "
15964
"<filename>/etc/krb5.conf</filename> file for your Realm. You should have "
15965
"entries similar to the following:"
15968
#: serverguide/C/network-auth.xml:2525(programlisting)
15973
" default_realm = EXAMPLE.COM\n"
15976
" EXAMPLE.COM = } \n"
15977
" kdc = 192.168.0.1 \n"
15978
" admin_server = 192.168.0.1\n"
15982
#: serverguide/C/network-auth.xml:2536(para)
15984
"You can test the configuration by requesting a ticket using the "
15985
"<application>kinit</application> utility. For example:"
15988
#: serverguide/C/network-auth.xml:2541(command)
15989
msgid "kinit steve@EXAMPLE.COM"
15992
#: serverguide/C/network-auth.xml:2542(computeroutput)
15994
msgid "Password for steve@EXAMPLE.COM:"
15997
#: serverguide/C/network-auth.xml:2545(para)
15999
"When a ticket has been granted, the details can be viewed using "
16000
"<application>klist</application>:"
16003
#: serverguide/C/network-auth.xml:2551(computeroutput)
16006
"Ticket cache: FILE:/tmp/krb5cc_1000\n"
16007
"Default principal: steve@EXAMPLE.COM\n"
16009
"Valid starting Expires Service principal\n"
16010
"07/24/08 05:18:56 07/24/08 15:18:56 krbtgt/EXAMPLE.COM@EXAMPLE.COM\n"
16011
" renew until 07/25/08 05:18:57\n"
16014
"Kerberos 4 ticket cache: /tmp/tkt1000\n"
16015
"klist: You have no tickets cached"
16018
#: serverguide/C/network-auth.xml:2563(para)
16020
"Next, use the <application>auth-client-config</application> to configure the "
16021
"<application>libpam-krb5</application> module to request a ticket during "
16025
#: serverguide/C/network-auth.xml:2569(command)
16026
msgid "sudo auth-client-config -a -p kerberos_example"
16029
#: serverguide/C/network-auth.xml:2572(para)
16031
"You will should now receive a ticket upon successful login authentication."
16034
#: serverguide/C/network-auth.xml:2583(para)
16036
"For more information on Kerberos see the <ulink "
16037
"url=\"http://web.mit.edu/Kerberos/\">MIT Kerberos</ulink> site."
16040
#: serverguide/C/network-auth.xml:2588(para)
16042
"The <ulink url=\"https://help.ubuntu.com/community/Kerberos\">Ubuntu Wiki "
16043
"Kerberos</ulink> page has more details."
16046
#: serverguide/C/network-auth.xml:2593(para)
16048
"O'Reilly's <ulink "
16049
"url=\"http://oreilly.com/catalog/9780596004033/\">Kerberos: The Definitive "
16050
"Guide</ulink> is a great reference when setting up Kerberos."
16053
#: serverguide/C/network-auth.xml:2599(para)
16055
"Also, feel free to stop by the <emphasis>#ubuntu-server</emphasis> IRC "
16056
"channel on <ulink url=\"http://freenode.net/\">Freenode</ulink> if you have "
16057
"Kerberos questions."
16060
#: serverguide/C/network-auth.xml:2609(title)
16061
msgid "Kerberos and LDAP"
16064
#: serverguide/C/network-auth.xml:2611(para)
16066
"Replicating a Kerberos principal database between two servers can be "
16067
"complicated, and adds an additional user database to your network. "
16068
"Fortunately, MIT Kerberos can be configured to use an "
16069
"<application>LDAP</application> directory as a principal database. This "
16070
"section covers configuring a primary and secondary kerberos server to use "
16071
"<application>OpenLDAP</application> for the principal database."
16074
#: serverguide/C/network-auth.xml:2619(title)
16075
msgid "Configuring OpenLDAP"
16078
#: serverguide/C/network-auth.xml:2621(para)
16080
"First, the necessary <emphasis>schema</emphasis> needs to be loaded on an "
16081
"<application>OpenLDAP</application> server that has network connectivity to "
16082
"the Primary and Secondary KDCs. The rest of this section assumes that you "
16083
"also have LDAP replication configured between at least two servers. For "
16084
"information on setting up OpenLDAP see <xref linkend=\"openldap-server\"/>."
16087
#: serverguide/C/network-auth.xml:2628(para)
16089
"It is also required to configure OpenLDAP for TLS and SSL connections, so "
16090
"that traffic between the KDC and LDAP server is encrypted. See <xref "
16091
"linkend=\"openldap-tls\"/> for details."
16094
#: serverguide/C/network-auth.xml:2635(para)
16096
"To load the schema into LDAP, on the LDAP server install the "
16097
"<application>krb5-kdc-ldap</application> package. From a terminal enter:"
16100
#: serverguide/C/network-auth.xml:2641(command)
16101
msgid "sudo apt-get install krb5-kdc-ldap"
16104
#: serverguide/C/network-auth.xml:2646(para)
16105
msgid "Next, extract the <filename>kerberos.schema.gz</filename> file:"
16108
#: serverguide/C/network-auth.xml:2651(command)
16109
msgid "sudo gzip -d /usr/share/doc/krb5-kdc-ldap/kerberos.schema.gz"
16112
#: serverguide/C/network-auth.xml:2652(command)
16114
"sudo cp /usr/share/doc/krb5-kdc-ldap/kerberos.schema /etc/ldap/schema/"
16117
#: serverguide/C/network-auth.xml:2658(para)
16119
"The <emphasis>kerberos</emphasis> schema needs to be added to the "
16120
"<emphasis>cn=config</emphasis> tree. The procedure to add a new schema to "
16121
"<application>slapd</application> is also detailed in <xref "
16122
"linkend=\"openldap-configuration\"/>."
16125
#: serverguide/C/network-auth.xml:2671(programlisting)
16129
"include /etc/ldap/schema/core.schema\n"
16130
"include /etc/ldap/schema/collective.schema\n"
16131
"include /etc/ldap/schema/corba.schema\n"
16132
"include /etc/ldap/schema/cosine.schema\n"
16133
"include /etc/ldap/schema/duaconf.schema\n"
16134
"include /etc/ldap/schema/dyngroup.schema\n"
16135
"include /etc/ldap/schema/inetorgperson.schema\n"
16136
"include /etc/ldap/schema/java.schema\n"
16137
"include /etc/ldap/schema/misc.schema\n"
16138
"include /etc/ldap/schema/nis.schema\n"
16139
"include /etc/ldap/schema/openldap.schema\n"
16140
"include /etc/ldap/schema/ppolicy.schema\n"
16141
"include /etc/ldap/schema/kerberos.schema\n"
16144
#: serverguide/C/network-auth.xml:2691(para)
16145
msgid "Create a temporary directory to hold the LDIF files:"
16148
#: serverguide/C/network-auth.xml:2706(command)
16150
"slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 -s "
16151
"\"cn={12}kerberos,cn=schema,cn=config\" > /tmp/cn=kerberos.ldif"
16154
#: serverguide/C/network-auth.xml:2716(para)
16156
"Edit the generated <filename>/tmp/cn\\=kerberos.ldif</filename> file, "
16157
"changing the following attributes:"
16160
#: serverguide/C/network-auth.xml:2720(programlisting)
16164
"dn: cn=kerberos,cn=schema,cn=config\n"
16169
#: serverguide/C/network-auth.xml:2726(para)
16170
msgid "And remove the following lines from the end of the file:"
16173
#: serverguide/C/network-auth.xml:2730(programlisting)
16177
"structuralObjectClass: olcSchemaConfig\n"
16178
"entryUUID: 18ccd010-746b-102d-9fbe-3760cca765dc\n"
16179
"creatorsName: cn=config\n"
16180
"createTimestamp: 20090111203515Z\n"
16181
"entryCSN: 20090111203515.326445Z#000000#000#000000\n"
16182
"modifiersName: cn=config\n"
16183
"modifyTimestamp: 20090111203515Z\n"
16186
#: serverguide/C/network-auth.xml:2749(para)
16187
msgid "Load the new schema with <application>ldapadd</application>:"
16190
#: serverguide/C/network-auth.xml:2754(command)
16191
msgid "ldapadd -x -D cn=admin,cn=config -W -f /tmp/cn\\=kerberos.ldif"
16194
#: serverguide/C/network-auth.xml:2760(para)
16196
"Add an index for the <emphasis>krb5principalname</emphasis> attribute:"
16199
#: serverguide/C/network-auth.xml:2765(command) serverguide/C/network-auth.xml:2782(command)
16200
msgid "ldapmodify -x -D cn=admin,cn=config -W"
16203
#: serverguide/C/network-auth.xml:2767(userinput)
16206
"dn: olcDatabase={1}hdb,cn=config\n"
16207
"add: olcDbIndex\n"
16208
"olcDbIndex: krbPrincipalName eq,pres,sub"
16211
#: serverguide/C/network-auth.xml:2766(computeroutput)
16214
"Enter LDAP Password:\n"
16215
"<placeholder-1/>\n"
16217
"modifying entry \"olcDatabase={1}hdb,cn=config\""
16220
#: serverguide/C/network-auth.xml:2777(para)
16221
msgid "Finally, update the Access Control Lists (ACL):"
16224
#: serverguide/C/network-auth.xml:2784(userinput)
16227
"dn: olcDatabase={1}hdb,cn=config\n"
16228
"replace: olcAccess\n"
16229
"olcAccess: to attrs=userPassword,shadowLastChange,krbPrincipalKey by "
16230
"dn=\"cn=admin,dc=exampl\n"
16231
" e,dc=com\" write by anonymous auth by self write by * none\n"
16234
"olcAccess: to dn.base=\"\" by * read\n"
16237
"olcAccess: to * by dn=\"cn=admin,dc=example,dc=com\" write by * read"
16240
#: serverguide/C/network-auth.xml:2783(computeroutput)
16243
"Enter LDAP Password: \n"
16244
"<placeholder-1/>\n"
16246
"modifying entry \"olcDatabase={1}hdb,cn=config\"\n"
16249
#: serverguide/C/network-auth.xml:2804(para)
16251
"That's it, your LDAP directory is now ready to serve as a Kerberos principal "
16255
#: serverguide/C/network-auth.xml:2810(title)
16256
msgid "Primary KDC Configuration"
16259
#: serverguide/C/network-auth.xml:2812(para)
16261
"With <application>OpenLDAP</application> configured it is time to configure "
16265
#: serverguide/C/network-auth.xml:2818(para)
16266
msgid "First, install the necessary packages, from a terminal enter:"
16269
#: serverguide/C/network-auth.xml:2823(command) serverguide/C/network-auth.xml:2980(command)
16270
msgid "sudo apt-get install krb5-kdc krb5-admin-server krb5-kdc-ldap"
16273
#: serverguide/C/network-auth.xml:2829(para)
16275
"Now edit <filename>/etc/krb5.conf</filename> adding the following options to "
16276
"under the appropriate sections:"
16279
#: serverguide/C/network-auth.xml:2833(programlisting)
16284
" default_realm = EXAMPLE.COM\n"
16289
" EXAMPLE.COM = {\n"
16290
" kdc = kdc01.example.com\n"
16291
" kdc = kdc02.example.com\n"
16292
" admin_server = kdc01.example.com\n"
16293
" admin_server = kdc02.example.com\n"
16294
" default_domain = example.com\n"
16295
" database_module = openldap_ldapconf\n"
16301
" .example.com = EXAMPLE.COM\n"
16307
" ldap_kerberos_container_dn = dc=example,dc=com\n"
16310
" openldap_ldapconf = {\n"
16311
" db_library = kldap\n"
16312
" ldap_kdc_dn = \"cn=admin,dc=example,dc=com\"\n"
16314
" # this object needs to have read rights on\n"
16315
" # the realm container, principal container and realm sub-"
16317
" ldap_kadmind_dn = \"cn=admin,dc=example,dc=com\"\n"
16319
" # this object needs to have read and write rights on\n"
16320
" # the realm container, principal container and realm sub-"
16322
" ldap_service_password_file = /etc/krb5kdc/service.keyfile\n"
16323
" ldap_servers = ldaps://ldap01.example.com "
16324
"ldaps://ldap02.example.com\n"
16325
" ldap_conns_per_server = 5\n"
16329
#: serverguide/C/network-auth.xml:2878(para)
16331
"Change <emphasis>example.com</emphasis>, "
16332
"<emphasis>dc=example,dc=com</emphasis>, "
16333
"<emphasis>cn=admin,dc=example,dc=com</emphasis>, and "
16334
"<emphasis>ldap01.example.com</emphasis> to the appropriate domain, LDAP "
16335
"object, and LDAP server for your network."
16338
#: serverguide/C/network-auth.xml:2887(para)
16340
"Next, use the <application>kdb5_ldap_util</application> utility to create "
16344
#: serverguide/C/network-auth.xml:2892(command)
16346
"sudo kdb5_ldap_util -D cn=admin,dc=example,dc=com create -subtrees "
16347
"dc=example,dc=com -r EXAMPLE.COM -s -H ldap://ldap01.example.com"
16350
#: serverguide/C/network-auth.xml:2898(para)
16352
"Create a stash of the password used to bind to the LDAP server. This "
16353
"password is used by the <emphasis>ldap_kdc_dn</emphasis> and "
16354
"<emphasis>ldap_kadmin_dn</emphasis> options in "
16355
"<filename>/etc/krb5.conf</filename>:"
16358
#: serverguide/C/network-auth.xml:2904(command) serverguide/C/network-auth.xml:3042(command)
16360
"sudo kdb5_ldap_util -D cn=admin,dc=example,dc=com stashsrvpw -f "
16361
"/etc/krb5kdc/service.keyfile cn=admin,dc=example,dc=com"
16364
#: serverguide/C/network-auth.xml:2910(para)
16365
msgid "Copy the CA certificate from the LDAP server:"
16368
#: serverguide/C/network-auth.xml:2915(command)
16369
msgid "scp ldap01:/etc/ssl/certs/cacert.pem ."
16372
#: serverguide/C/network-auth.xml:2916(command)
16373
msgid "sudo cp cacert.pem /etc/ssl/certs"
16376
#: serverguide/C/network-auth.xml:2919(para)
16378
"And edit <filename>/etc/ldap/ldap.conf</filename> to use the certificate:"
16381
#: serverguide/C/network-auth.xml:2923(programlisting)
16385
"TLS_CACERT /etc/ssl/certs/cacert.pem\n"
16388
#: serverguide/C/network-auth.xml:2928(para)
16390
"The certificate will also need to be copied to the Secondary KDC, to allow "
16391
"the connection to the LDAP servers using LDAPS."
16394
#: serverguide/C/network-auth.xml:2937(para)
16396
"You can now add Kerberos principals to the LDAP database, and they will be "
16397
"copied to any other LDAP servers configured for replication. To add a "
16398
"principal using the <application>kadmin.local</application> utility enter:"
16401
#: serverguide/C/network-auth.xml:2945(userinput)
16403
msgid "addprinc -x dn=\"uid=steve,ou=people,dc=example,dc=com\" steve"
16406
#: serverguide/C/network-auth.xml:2944(computeroutput)
16409
"Authenticating as principal root/admin@EXAMPLE.COM with password.\n"
16410
"kadmin.local: <placeholder-1/>\n"
16411
"WARNING: no policy specified for steve@EXAMPLE.COM; defaulting to no policy\n"
16412
"Enter password for principal \"steve@EXAMPLE.COM\": \n"
16413
"Re-enter password for principal \"steve@EXAMPLE.COM\": \n"
16414
"Principal \"steve@EXAMPLE.COM\" created."
16417
#: serverguide/C/network-auth.xml:2952(para)
16419
"There should now be krbPrincipalName, krbPrincipalKey, krbLastPwdChange, and "
16420
"krbExtraData attributes added to the "
16421
"<emphasis>uid=steve,ou=people,dc=example,dc=com</emphasis> user object. Use "
16422
"the <application>kinit</application> and <application>klist</application> "
16423
"utilities to test that the user is indeed issued a ticket."
16426
#: serverguide/C/network-auth.xml:2959(para)
16428
"If the user object is already created the <emphasis>-x dn=\"...\"</emphasis> "
16429
"option is needed to add the Kerberos attributes. Otherwise a new "
16430
"<emphasis>principal</emphasis> object will be created in the realm subtree."
16433
#: serverguide/C/network-auth.xml:2967(title)
16434
msgid "Secondary KDC Configuration"
16437
#: serverguide/C/network-auth.xml:2969(para)
16439
"Configuring a Secondary KDC using the LDAP backend is similar to configuring "
16440
"one using the normal Kerberos database."
16443
#: serverguide/C/network-auth.xml:2975(para)
16444
msgid "First, install the necessary packages. In a terminal enter:"
16447
#: serverguide/C/network-auth.xml:2986(para)
16449
"Next, edit <filename>/etc/krb5.conf</filename> to use the LDAP backend:"
16452
#: serverguide/C/network-auth.xml:2990(programlisting)
16457
" default_realm = EXAMPLE.COM\n"
16462
" EXAMPLE.COM = {\n"
16463
" kdc = kdc01.example.com\n"
16464
" kdc = kdc02.example.com\n"
16465
" admin_server = kdc01.example.com\n"
16466
" admin_server = kdc02.example.com\n"
16467
" default_domain = example.com\n"
16468
" database_module = openldap_ldapconf\n"
16474
" .example.com = EXAMPLE.COM\n"
16479
" ldap_kerberos_container_dn = dc=example,dc=com\n"
16482
" openldap_ldapconf = {\n"
16483
" db_library = kldap\n"
16484
" ldap_kdc_dn = \"cn=admin,dc=example,dc=com\"\n"
16486
" # this object needs to have read rights on\n"
16487
" # the realm container, principal container and realm sub-"
16489
" ldap_kadmind_dn = \"cn=admin,dc=example,dc=com\"\n"
16491
" # this object needs to have read and write rights on\n"
16492
" # the realm container, principal container and realm sub-"
16494
" ldap_service_password_file = /etc/krb5kdc/service.keyfile\n"
16495
" ldap_servers = ldaps://ldap01.example.com "
16496
"ldaps://ldap02.example.com\n"
16497
" ldap_conns_per_server = 5\n"
16501
#: serverguide/C/network-auth.xml:3037(para)
16502
msgid "Create the stash for the LDAP bind password:"
16505
#: serverguide/C/network-auth.xml:3048(para)
16507
"Now, on the <emphasis>Primary KDC</emphasis> copy the "
16508
"<filename>/etc/krb5kdc/.k5.EXAMPLE.COM</filename><emphasis>Master "
16509
"Key</emphasis> stash to the Secondary KDC. Be sure to copy the file over an "
16510
"encrypted connection such as <application>scp</application>, or on physical "
16514
#: serverguide/C/network-auth.xml:3055(command)
16515
msgid "sudo scp /etc/krb5kdc/.k5.EXAMPLE.COM steve@kdc02.example.com:~"
16518
#: serverguide/C/network-auth.xml:3056(command)
16519
msgid "sudo mv .k5.EXAMPLE.COM /etc/krb5kdc/"
16522
#: serverguide/C/network-auth.xml:3060(para)
16524
"Again, replace <emphasis>EXAMPLE.COM</emphasis> with your actual realm."
16527
#: serverguide/C/network-auth.xml:3068(para)
16528
msgid "Finally, start the <application>krb5-kdc</application> daemon:"
16531
#: serverguide/C/network-auth.xml:3079(para)
16533
"You now have redundant KDCs on your network, and with redundant LDAP servers "
16534
"you should be able to continue to authenticate users if one LDAP server, one "
16535
"Kerberos server, or one LDAP and one Kerberos server become unavailable."
16538
#: serverguide/C/network-auth.xml:3091(para)
16540
"The <ulink url=\"http://web.mit.edu/Kerberos/krb5-1.6/krb5-1.6.3/doc/krb5-"
16541
"admin.html#Configuring-Kerberos-with-OpenLDAP-back_002dend\"> Kerberos Admin "
16542
"Guide</ulink> has some additional details."
16545
#: serverguide/C/network-auth.xml:3097(para)
16547
"For more information on <application>kdb5_ldap_util</application> see <ulink "
16548
"url=\"http://web.mit.edu/Kerberos/krb5-1.6/krb5-1.6.3/doc/krb5-"
16549
"admin.html#Global-Operations-on-the-Kerberos-LDAP-Database\"> Section "
16550
"5.6</ulink> and the <ulink "
16551
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/kdb5_ldap_util.8.html"
16552
"\">kdb5_ldap_util man page</ulink>."
16555
#: serverguide/C/network-auth.xml:3105(para)
16557
"Another useful link is the <ulink "
16558
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/krb5.conf.5.html\">kr"
16559
"b5.conf man page</ulink>."
16562
#: serverguide/C/network-auth.xml:3110(para)
16564
"Also, see the <ulink "
16565
"url=\"https://help.ubuntu.com/community/Kerberos#kerberos-ldap\">Kerberos "
16566
"and LDAP</ulink> Ubuntu wiki page."
16569
#: serverguide/C/monitoring.xml:13(title)
16573
#: serverguide/C/monitoring.xml:17(para)
16575
"The monitoring of essential servers and services is an important part of "
16576
"system administration. Most network services are monitored for performance, "
16577
"availability, or both. This section will cover installation and "
16578
"configuration of <application>Nagios</application> for availability "
16579
"monitoring, and <application>Munin</application> for performance monitoring."
16582
#: serverguide/C/monitoring.xml:24(para)
16584
"The examples in this section will use two servers with hostnames "
16585
"<emphasis>server01</emphasis> and <emphasis>server02</emphasis>. "
16586
"<emphasis>Server01</emphasis> will be configured with "
16587
"<application>Nagios</application> to monitor services on itself and "
16588
"<emphasis>server02</emphasis>. Server01 will also be setup with the "
16589
"<application>munin</application> package to gather information from the "
16590
"network. Using the <application>munin-node</application> package, "
16591
"<emphasis>server02</emphasis> will be configured to send information to "
16592
"<emphasis>server01</emphasis>."
16595
#: serverguide/C/monitoring.xml:33(para)
16597
"Hopefully these simple examples will allow you to monitor additional servers "
16598
"and services on your network."
16601
#: serverguide/C/monitoring.xml:39(title)
16605
#: serverguide/C/monitoring.xml:44(para)
16607
"First, on <emphasis>server01</emphasis> install the "
16608
"<application>nagios</application> package. In a terminal enter:"
16611
#: serverguide/C/monitoring.xml:50(command)
16612
msgid "sudo apt-get install nagios3 nagios-nrpe-plugin"
16615
#: serverguide/C/monitoring.xml:53(para)
16617
"You will be asked to enter a password for the "
16618
"<emphasis>nagiosadmin</emphasis> user. The user's credentials are stored in "
16619
"<filename>/etc/nagios3/htpasswd.users</filename>. To change the "
16620
"<emphasis>nagiosadmin</emphasis> password, or add additional users to the "
16621
"Nagios CGI scripts, use the <application>htpasswd</application> that is part "
16622
"of the <application>apache2-utils</application> package."
16625
#: serverguide/C/monitoring.xml:60(para)
16627
"For example, to change the password for the <emphasis>nagiosadmin</emphasis> "
16631
#: serverguide/C/monitoring.xml:65(command)
16632
msgid "sudo htpasswd /etc/nagios3/htpasswd.users nagiosadmin"
16635
#: serverguide/C/monitoring.xml:68(para)
16636
msgid "To add a user:"
16639
#: serverguide/C/monitoring.xml:73(command)
16640
msgid "sudo htpasswd /etc/nagios3/htpasswd.users steve"
16643
#: serverguide/C/monitoring.xml:76(para)
16645
"Next, on <emphasis>server02</emphasis> install the <application>nagios-nrpe-"
16646
"server</application> package. From a terminal on server02 enter:"
16649
#: serverguide/C/monitoring.xml:82(command)
16650
msgid "sudo apt-get install nagios-nrpe-server"
16653
#: serverguide/C/monitoring.xml:86(para)
16655
"<application>NRPE</application> allows you to execute local checks on remote "
16656
"hosts. There are other ways of accomplishing this through other Nagios "
16657
"plugins as well as other checks."
16660
#: serverguide/C/monitoring.xml:94(title)
16661
msgid "Configuration Overview"
16664
#: serverguide/C/monitoring.xml:96(para)
16666
"There are a couple of directories containing "
16667
"<application>Nagios</application> configuration and check files."
16670
#: serverguide/C/monitoring.xml:102(para)
16672
"<filename>/etc/nagios3</filename>: contains configuration files for the "
16673
"operation of the <application>nagios</application> daemon, CGI files, hosts, "
16677
#: serverguide/C/monitoring.xml:108(para)
16679
"<filename>/etc/nagios-plugins</filename>: houses configuration files for the "
16683
#: serverguide/C/monitoring.xml:113(para)
16685
"<filename>/etc/nagios</filename>: on the remote host contains the "
16686
"<application>nagios-nrpe-server</application> configuration files."
16689
#: serverguide/C/monitoring.xml:118(para)
16691
"<filename>/usr/lib/nagios/plugins/</filename>: where the check binaries are "
16692
"stored. To see the options of a check use the <emphasis>-h</emphasis> option."
16695
#: serverguide/C/monitoring.xml:123(para)
16696
msgid "For example: <command>/usr/lib/nagios/plugins/check_dhcp -h</command>"
16699
#: serverguide/C/monitoring.xml:129(para)
16701
"There are a plethora of checks <application>Nagios</application> can be "
16702
"configured to execute for any given host. For this example Nagios will be "
16703
"configured to check disk space, DNS, and a MySQL hostgroup. The DNS check "
16704
"will be on <emphasis>server02</emphasis>, and the MySQL hostgroup will "
16705
"include both <emphasis>server01</emphasis> and <emphasis>server02</emphasis>."
16708
#: serverguide/C/monitoring.xml:136(para)
16710
"See <xref linkend=\"httpd\"/> for details on setting up Apache, <xref "
16711
"linkend=\"dns\"/> for DNS, and <xref linkend=\"mysql\"/> for MySQL."
16714
#: serverguide/C/monitoring.xml:141(para)
16716
"Additionally, there are some terms that once explained will hopefully make "
16717
"understanding Nagios configuration easier:"
16720
#: serverguide/C/monitoring.xml:147(para)
16722
"<emphasis>Host</emphasis>: a server, workstation, network device, etc that "
16723
"is being monitored."
16726
#: serverguide/C/monitoring.xml:152(para)
16728
"<emphasis>Host Group</emphasis>: a group of similar hosts. For example, you "
16729
"could group all web servers, file server, etc."
16732
#: serverguide/C/monitoring.xml:157(para)
16734
"<emphasis>Service</emphasis>: the service being monitored on the host. Such "
16735
"as HTTP, DNS, NFS, etc."
16738
#: serverguide/C/monitoring.xml:162(para)
16740
"<emphasis>Service Group</emphasis>: allows you to group multiple services "
16741
"together. This is useful for grouping multiple HTTP for example."
16744
#: serverguide/C/monitoring.xml:168(para)
16746
"<emphasis>Contact</emphasis>: person to be notified when an event takes "
16747
"place. Nagios can be configured to send emails, SMS messages, etc."
16750
#: serverguide/C/monitoring.xml:174(para)
16752
"By default Nagios is configured to check HTTP, disk space, SSH, current "
16753
"users, processes, and load on the <emphasis>localhost</emphasis>. Nagios "
16754
"will also <application>ping</application> check the "
16755
"<emphasis>gateway</emphasis>."
16758
#: serverguide/C/monitoring.xml:179(para)
16760
"Large Nagios installations can be quite complex to configure. It is usually "
16761
"best to start small, one or two hosts, get things configured the way you "
16762
"like then expand."
16765
#: serverguide/C/monitoring.xml:194(para)
16767
"First, create a <emphasis>host</emphasis> configuration file for "
16768
"<emphasis>server02</emphasis>. In a terminal enter:"
16771
#: serverguide/C/monitoring.xml:199(command)
16773
"sudo cp /etc/nagios3/conf.d/localhost_nagios2.cfg "
16774
"/etc/nagios3/conf.d/server02.cfg"
16777
#: serverguide/C/monitoring.xml:203(para)
16779
"In the above and following command examples, replace "
16780
"<emphasis>\"server01\"</emphasis>, "
16781
"<emphasis>\"server02\"</emphasis><emphasis>172.18.100.100</emphasis>, and "
16782
"<emphasis>172.18.100.101</emphasis> with the host names and IP addresses of "
16786
#: serverguide/C/monitoring.xml:212(para)
16787
msgid "Next, edit <filename>/etc/nagios3/conf.d/server02.cfg</filename>:"
16790
#: serverguide/C/monitoring.xml:216(programlisting)
16795
" use generic-host ; Name of host "
16796
"template to use\n"
16797
" host_name server02\n"
16798
" alias Server 02\n"
16799
" address 172.18.100.101\n"
16802
"# check DNS service.\n"
16803
"define service {\n"
16804
" use generic-service\n"
16805
" host_name server02\n"
16806
" service_description DNS\n"
16807
" check_command check_dns!172.18.100.101\n"
16811
#: serverguide/C/monitoring.xml:236(para)
16813
"Restart the <application>nagios</application> daemon to enable the new "
16817
#: serverguide/C/monitoring.xml:241(command) serverguide/C/monitoring.xml:308(command) serverguide/C/monitoring.xml:375(command)
16818
msgid "sudo /etc/init.d/nagios3 restart"
16821
#: serverguide/C/monitoring.xml:251(para)
16823
"Now add a service definition for the MySQL check by adding the following to "
16824
"<filename>/etc/nagios3/conf.d/services_nagios2.cfg</filename>:"
16827
#: serverguide/C/monitoring.xml:255(programlisting)
16831
"# check MySQL servers.\n"
16832
"define service {\n"
16833
" hostgroup_name mysql-servers\n"
16834
" service_description MySQL\n"
16836
"check_mysql_cmdlinecred!nagios!secret!$HOSTADDRESS\n"
16837
" use generic-service\n"
16838
" notification_interval 0 ; set > 0 if you want to be "
16843
#: serverguide/C/monitoring.xml:269(para)
16845
"A <emphasis>mysqsl-servers</emphasis> hostgroup now needs to be defined. "
16846
"Edit <filename>/etc/nagios3/conf.d/hostgroups_nagios2.cfg</filename> adding:"
16849
#: serverguide/C/monitoring.xml:274(programlisting)
16853
"# MySQL hostgroup.\n"
16854
"define hostgroup {\n"
16855
" hostgroup_name mysql-servers\n"
16856
" alias MySQL servers\n"
16857
" members localhost, server02\n"
16861
#: serverguide/C/monitoring.xml:286(para)
16863
"The Nagios check needs to authenticate to MySQL. To add a "
16864
"<emphasis>nagios</emphasis> user to MySQL enter:"
16867
#: serverguide/C/monitoring.xml:291(command)
16868
msgid "mysql -u root -p -e \"create user nagios identified by 'secret';\""
16871
#: serverguide/C/monitoring.xml:295(para)
16873
"The <emphasis>nagios</emphasis> user will need to be added all hosts in the "
16874
"<emphasis>mysql-servers</emphasis> hostgroup."
16877
#: serverguide/C/monitoring.xml:303(para)
16879
"Restart <application>nagios</application> to start checking the MySQL "
16883
#: serverguide/C/monitoring.xml:318(para)
16885
"Lastly configure NRPE to check the disk space on "
16886
"<emphasis>server02</emphasis>."
16889
#: serverguide/C/monitoring.xml:322(para)
16891
"On <emphasis>server01</emphasis> add the service check to "
16892
"<filename>/etc/nagios3/conf.d/server02.cfg</filename>:"
16895
#: serverguide/C/monitoring.xml:327(programlisting)
16899
"# NRPE disk check.\n"
16900
"define service {\n"
16901
" use generic-service\n"
16902
" host_name server02\n"
16903
" service_description nrpe-disk\n"
16905
"check_nrpe_1arg!check_all_disks!172.18.100.101\n"
16909
#: serverguide/C/monitoring.xml:340(para)
16911
"Now on <emphasis>server02</emphasis> edit "
16912
"<filename>/etc/nagios/nrpe.cfg</filename> changing:"
16915
#: serverguide/C/monitoring.xml:344(programlisting)
16919
"allowed_hosts=172.18.100.100\n"
16922
#: serverguide/C/monitoring.xml:348(para)
16923
msgid "And below in the command definition area add:"
16926
#: serverguide/C/monitoring.xml:352(programlisting)
16930
"command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -"
16934
#: serverguide/C/monitoring.xml:359(para)
16935
msgid "Finally, restart <application>nagios-nrpe-server</application>:"
16938
#: serverguide/C/monitoring.xml:364(command)
16939
msgid "sudo /etc/init.d/nagios-nrpe-server restart"
16942
#: serverguide/C/monitoring.xml:370(para)
16944
"Also, on <emphasis>server01</emphasis> restart "
16945
"<application>nagios</application>:"
16948
#: serverguide/C/monitoring.xml:383(para)
16950
"You should now be able to see the host and service checks in the Nagios CGI "
16951
"files. To access them point a browser to http://server01/nagios3. You will "
16952
"then be prompted for the <emphasis>nagiosadmin</emphasis> username and "
16956
#: serverguide/C/monitoring.xml:393(para)
16958
"This section has just scratched the surface of Nagios' features. The "
16959
"<application>nagios-plugins-extra</application> and <application>nagios-snmp-"
16960
"plugins</application> contain many more service checks."
16963
#: serverguide/C/monitoring.xml:400(para)
16965
"For more information see <ulink "
16966
"url=\"http://www.nagios.org/\">Nagios</ulink> website."
16969
#: serverguide/C/monitoring.xml:405(para)
16971
"Specifically the <ulink "
16972
"url=\"http://nagios.sourceforge.net/docs/3_0/\">Online Documentation</ulink> "
16976
#: serverguide/C/monitoring.xml:410(para)
16978
"There is also a list of <ulink "
16979
"url=\"http://www.nagios.org/propaganda/books/\">books</ulink> related to "
16980
"Nagios and network monitoring:"
16983
#: serverguide/C/monitoring.xml:416(para)
16985
"The <ulink url=\"https://help.ubuntu.com/community/Nagios\">Nagios Ubuntu "
16986
"Wiki</ulink> page also has more details."
16989
#: serverguide/C/monitoring.xml:425(title)
16993
#: serverguide/C/monitoring.xml:430(para)
16995
"Before installing <application>Munin</application> on "
16996
"<emphasis>server01</emphasis><application>apache2</application> will need to "
16997
"be installed. The default configuration is fine for running a "
16998
"<application>munin</application> server. For more information see <xref "
16999
"linkend=\"httpd\"/>."
17002
#: serverguide/C/monitoring.xml:436(para)
17004
"First, on <emphasis>server01</emphasis> install "
17005
"<application>munin</application>. In a terminal enter:"
17008
#: serverguide/C/monitoring.xml:441(command)
17009
msgid "sudo apt-get install munin"
17012
#: serverguide/C/monitoring.xml:444(para)
17014
"Now on <emphasis>server02</emphasis> install the <application>munin-"
17015
"node</application> package:"
17018
#: serverguide/C/monitoring.xml:449(command)
17019
msgid "sudo apt-get install munin-node"
17022
#: serverguide/C/monitoring.xml:456(para)
17024
"On <emphasis>server01</emphasis> edit the "
17025
"<filename>/etc/munin/munin.conf</filename> adding the IP address for "
17026
"<emphasis>server02</emphasis>:"
17029
#: serverguide/C/monitoring.xml:461(programlisting)
17033
"## First our \"normal\" host.\n"
17035
" address 172.18.100.101\n"
17038
#: serverguide/C/monitoring.xml:468(para)
17040
"Replace <emphasis>server02</emphasis> and "
17041
"<emphasis>172.18.100.101</emphasis> with the actual hostname and IP address "
17045
#: serverguide/C/monitoring.xml:474(para)
17047
"Next, configure <application>munin-node</application> on "
17048
"<emphasis>server02</emphasis>. Edit <filename>/etc/munin/munin-"
17049
"node.conf</filename> to allow access by <emphasis>server01</emphasis>:"
17052
#: serverguide/C/monitoring.xml:479(programlisting)
17056
"allow ^172\\.18\\.100\\.100$\n"
17059
#: serverguide/C/monitoring.xml:484(para)
17061
"Replace <emphasis>^172\\.18\\.100\\.100$</emphasis> with IP address for your "
17062
"<application>munin</application> server."
17065
#: serverguide/C/monitoring.xml:489(para)
17067
"Now restart <application>munin-node</application> on "
17068
"<emphasis>server02</emphasis> for the changes to take effect:"
17071
#: serverguide/C/monitoring.xml:494(command)
17072
msgid "sudo /etc/init.d/munin-node restart"
17075
#: serverguide/C/monitoring.xml:497(para)
17077
"Finally, in a browser go to <emphasis>http://server01/munin</emphasis>, and "
17078
"you should see links to nice graphs displaying information from the standard "
17079
"<emphasis>munin-plugins</emphasis> for disk, network, processes, and system."
17082
#: serverguide/C/monitoring.xml:503(para)
17084
"Since this is a new install it may take some time for the graphs to display "
17088
#: serverguide/C/monitoring.xml:510(title)
17089
msgid "Additional Plugins"
17092
#: serverguide/C/monitoring.xml:512(para)
17094
"The <application>munin-plugins-extra</application> package contains "
17095
"performance checks additional services such as DNS, DHCP, Samba, etc. To "
17096
"install the package, from a terminal enter:"
17099
#: serverguide/C/monitoring.xml:518(command)
17100
msgid "sudo apt-get install munin-plugins-extra"
17103
#: serverguide/C/monitoring.xml:521(para)
17104
msgid "Be sure to install the package on both the server and node machines."
17107
#: serverguide/C/monitoring.xml:531(para)
17109
"See the <ulink url=\"http://munin.projects.linpro.no/\">Munin</ulink> "
17110
"website for more details."
17113
#: serverguide/C/monitoring.xml:536(para)
17115
"Specifically the <ulink "
17116
"url=\"http://munin.projects.linpro.no/wiki/Documentation\">Munin "
17117
"Documentation</ulink> page includes information on additional plugins, "
17118
"writing plugins, etc."
17121
#: serverguide/C/monitoring.xml:542(para)
17123
"Also, there is a book in German by Open Source Press: <ulink "
17124
"url=\"https://www.opensourcepress.de/index.php?26&backPID=178&tt_prod"
17125
"ucts=152\">Munin Graphisches Netzwerk- und System-Monitoring</ulink>."
17128
#: serverguide/C/monitoring.xml:548(para)
17130
"Another resource is the <ulink "
17131
"url=\"https://help.ubuntu.com/community/Munin\">Munin Ubuntu Wiki</ulink> "
17135
#: serverguide/C/mail.xml:13(title)
17136
msgid "Email Services"
17139
#: serverguide/C/mail.xml:14(para)
17141
"The process of getting an email from one person to another over a network or "
17142
"the Internet involves many systems working together. Each of these systems "
17143
"must be correctly configured for the process to work. The sender uses a "
17144
"<emphasis>Mail User Agent</emphasis> (MUA), or email client, to send the "
17145
"message through one or more <emphasis>Mail Transfer Agents</emphasis> (MTA), "
17146
"the last of which will hand it off to a <emphasis>Mail Delivery "
17147
"Agent</emphasis> (MDA) for delivery to the recipient's mailbox, from which "
17148
"it will be retrieved by the recipient's email client, usually via a POP3 or "
17152
#: serverguide/C/mail.xml:24(title) serverguide/C/mail.xml:832(application) serverguide/C/mail.xml:866(title) serverguide/C/mail.xml:944(title) serverguide/C/mail.xml:1510(title)
17156
#: serverguide/C/mail.xml:25(para)
17158
"<application>Postfix</application> is the default Mail Transfer Agent (MTA) "
17159
"in Ubuntu. It attempts to be fast and easy to administer and secure. It is "
17160
"compatible with the MTA <application>sendmail</application>. This section "
17161
"explains how to install and configure <application>postfix</application>. It "
17162
"also explains how to set it up as an SMTP server using a secure connection "
17163
"(for sending emails securely)."
17166
#: serverguide/C/mail.xml:34(para)
17168
"This guide does not cover setting up Postfix <emphasis>Virtual "
17169
"Domains</emphasis>, for information on Virtual Domains and other advanced "
17170
"configurations see <xref linkend=\"postfix-references\"/>."
17173
#: serverguide/C/mail.xml:41(para)
17175
"To install <application>postfix</application> run the following command:"
17178
#: serverguide/C/mail.xml:47(para)
17180
"Simply press return when the installation process asks questions, the "
17181
"configuration will be done in greater detail in the next stage."
17184
#: serverguide/C/mail.xml:52(title)
17185
msgid "Basic Configuration"
17188
#: serverguide/C/mail.xml:53(para)
17190
"To configure <application>postfix</application>, run the following command:"
17193
#: serverguide/C/mail.xml:57(command)
17194
msgid "sudo dpkg-reconfigure postfix"
17197
#: serverguide/C/mail.xml:63(para)
17198
msgid "Internet Site"
17201
#: serverguide/C/mail.xml:64(para)
17202
msgid "mail.example.com"
17205
#: serverguide/C/mail.xml:65(para)
17209
#: serverguide/C/mail.xml:66(para)
17210
msgid "mail.example.com, localhost.localdomain, localhost"
17213
#: serverguide/C/mail.xml:67(para)
17217
#: serverguide/C/mail.xml:68(para)
17218
msgid "127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24"
17221
#: serverguide/C/mail.xml:69(para)
17225
#: serverguide/C/mail.xml:70(para)
17229
#: serverguide/C/mail.xml:71(para)
17233
#: serverguide/C/mail.xml:59(para)
17235
"The user interface will be displayed. On each screen, select the following "
17236
"values: <placeholder-1/>"
17239
#: serverguide/C/mail.xml:75(para)
17241
"Replace mail.example.com with the domain for which you'll accept email, "
17242
"192.168.0.0/24 with the actual network and class range of your mail server, "
17243
"and steve with the appropriate username."
17246
#: serverguide/C/mail.xml:81(para)
17248
"Now is a good time to decide which mailbox format you want to use. By "
17249
"default Postfix will use <emphasis role=\"strong\">mbox</emphasis> for the "
17250
"mailbox format. Rather than editing the configuration file directly, you can "
17251
"use the <command>postconf</command> command to configure all "
17252
"<application>postfix</application> parameters. The configuration parameters "
17253
"will be stored in <filename>/etc/postfix/main.cf</filename> file. Later if "
17254
"you wish to re-configure a particular parameter, you can either run the "
17255
"command or change it manually in the file."
17258
#: serverguide/C/mail.xml:92(para)
17260
"To configure the mailbox format for <emphasis "
17261
"role=\"strong\">Maildir:</emphasis>"
17264
#: serverguide/C/mail.xml:97(command)
17265
msgid "sudo postconf -e 'home_mailbox = Maildir/'"
17268
#: serverguide/C/mail.xml:100(para)
17270
"This will place new mail in /home/<emphasis "
17271
"role=\"italic\">username</emphasis>/Maildir so you will need to configure "
17272
"your Mail Delivery Agent (MDA) to use the same path."
17275
#: serverguide/C/mail.xml:108(title) serverguide/C/mail.xml:556(title)
17276
msgid "SMTP Authentication"
17279
#: serverguide/C/mail.xml:110(para)
17281
"SMTP-AUTH allows a client to identify itself through an authentication "
17282
"mechanism (SASL). Transport Layer Security (TLS) should be used to encrypt "
17283
"the authentication process. Once authenticated the SMTP server will allow "
17284
"the client to relay mail."
17287
#: serverguide/C/mail.xml:117(para)
17288
msgid "Configure Postfix for SMTP-AUTH using SASL (Dovecot SASL):"
17291
#: serverguide/C/mail.xml:120(screen)
17295
"sudo postconf -e 'smtpd_sasl_type = dovecot'\n"
17296
"sudo postconf -e 'smtpd_sasl_path = private/auth-client'\n"
17297
"sudo postconf -e 'smtpd_sasl_local_domain ='\n"
17298
"sudo postconf -e 'smtpd_sasl_security_options = noanonymous'\n"
17299
"sudo postconf -e 'broken_sasl_auth_clients = yes'\n"
17300
"sudo postconf -e 'smtpd_sasl_auth_enable = yes'\n"
17301
"sudo postconf -e 'smtpd_recipient_restrictions = "
17302
"permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'\n"
17303
"sudo postconf -e 'inet_interfaces = all'\n"
17306
#: serverguide/C/mail.xml:131(para)
17308
"The <emphasis>smtpd_sasl_path</emphasis> configuration is a path relative to "
17309
"the Postfix queue directory."
17312
#: serverguide/C/mail.xml:137(para)
17314
"Next, obtain a digital certificate for TLS. See <xref linkend=\"certificates-"
17315
"and-security\"/> for details. This example also uses a Certificate Authority "
17316
"(CA). For information on generating a CA certificate see <xref "
17317
"linkend=\"certificate-authority\"/>."
17320
#: serverguide/C/mail.xml:143(para)
17322
"You can get the digital certificate from a certificate authority. But unlike "
17323
"web clients, SMTP clients rarely complain about \"self-signed "
17324
"certificates\", so alternatively, you can create the certificate yourself. "
17325
"Refer to <xref linkend=\"creating-a-self-signed-certificate\"/> for more "
17329
#: serverguide/C/mail.xml:155(para)
17331
"Once you have a certificate, configure Postfix to provide TLS encryption for "
17332
"both incoming and outgoing mail:"
17335
#: serverguide/C/mail.xml:158(screen)
17339
"sudo postconf -e 'smtpd_tls_auth_only = no'\n"
17340
"sudo postconf -e 'smtp_use_tls = yes'\n"
17341
"sudo postconf -e 'smtpd_use_tls = yes'\n"
17342
"sudo postconf -e 'smtp_tls_note_starttls_offer = yes'\n"
17343
"sudo postconf -e 'smtpd_tls_key_file = /etc/ssl/private/server.key'\n"
17344
"sudo postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/server.crt'\n"
17345
"sudo postconf -e 'smtpd_tls_loglevel = 1'\n"
17346
"sudo postconf -e 'smtpd_tls_received_header = yes'\n"
17347
"sudo postconf -e 'smtpd_tls_session_cache_timeout = 3600s'\n"
17348
"sudo postconf -e 'tls_random_source = dev:/dev/urandom'\n"
17349
"sudo postconf -e 'myhostname = mail.example.com'\n"
17352
#: serverguide/C/mail.xml:173(para)
17354
"If you are using your own <emphasis>Certificate Authority</emphasis> to sign "
17355
"the certificate enter:"
17358
#: serverguide/C/mail.xml:177(command)
17359
msgid "sudo postconf -e 'smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem'"
17362
#: serverguide/C/mail.xml:180(para)
17364
"Again, for more details about certificates see <xref linkend=\"certificates-"
17365
"and-security\"/>."
17368
#: serverguide/C/mail.xml:186(para)
17370
"After running all the commands, <application>Postfix</application> is "
17371
"configured for SMTP-AUTH and a self-signed certificate has been created for "
17375
#: serverguide/C/mail.xml:191(para)
17377
"Now, the file <filename>/etc/postfix/main.cf</filename> should look like "
17378
"<ulink url=\"../sample/postfix_configuration\">this</ulink>."
17381
#: serverguide/C/mail.xml:195(para)
17383
"The postfix initial configuration is complete. Run the following command to "
17384
"restart the postfix daemon:"
17387
#: serverguide/C/mail.xml:201(command) serverguide/C/mail.xml:315(command) serverguide/C/mail.xml:378(command) serverguide/C/mail.xml:984(command) serverguide/C/mail.xml:1561(command)
17388
msgid "sudo /etc/init.d/postfix restart"
17391
#: serverguide/C/mail.xml:204(para)
17393
"<application>Postfix</application> supports SMTP-AUTH as defined in <ulink "
17394
"url=\"ftp://ftp.isi.edu/in-notes/rfc2554.txt\">RFC2554</ulink>. It is based "
17395
"on <ulink url=\"ftp://ftp.isi.edu/in-notes/rfc2222.txt\">SASL</ulink>. "
17396
"However it is still necessary to set up SASL authentication before you can "
17400
#: serverguide/C/mail.xml:214(title) serverguide/C/mail.xml:609(title)
17401
msgid "Configuring SASL"
17404
#: serverguide/C/mail.xml:215(para)
17406
"Postfix supports two SASL implementations Cyrus SASL and Dovecot SASL. To "
17407
"enable Dovecot SASL the <application>dovecot-common</application> package "
17408
"will need to be installed. From a terminal prompt enter the following:"
17411
#: serverguide/C/mail.xml:221(command)
17412
msgid "sudo apt-get install dovecot-common"
17415
#: serverguide/C/mail.xml:223(para)
17417
"Next you will need to edit <filename>/etc/dovecot/dovecot.conf</filename>. "
17418
"In the <emphasis>auth default</emphasis> section uncomment the "
17419
"<emphasis>socket listen</emphasis> option and change the following:"
17422
#: serverguide/C/mail.xml:227(programlisting)
17426
" socket listen {\n"
17428
" # Master socket provides access to userdb information. It's typically\n"
17429
" # used to give Dovecot's local delivery agent access to userdb so it\n"
17430
" # can find mailbox locations.\n"
17431
" #path = /var/run/dovecot/auth-master\n"
17433
" # Default user/group is the one who started dovecot-auth (root)\n"
17438
" # The client socket is generally safe to export to everyone. Typical "
17440
" # is to export it to your SMTP server so it can do SMTP AUTH lookups\n"
17442
" path = /var/spool/postfix/private/auth-client\n"
17444
" user = postfix\n"
17445
" group = postfix\n"
17450
#: serverguide/C/mail.xml:251(para)
17452
"In order to let <application>Outlook</application> clients use SMTPAUTH, in "
17453
"the <emphasis>auth default</emphasis> section of /etc/dovecot/dovecot.conf "
17454
"add <emphasis>\"login\"</emphasis>:"
17457
#: serverguide/C/mail.xml:256(programlisting)
17461
" mechanisms = plain login\n"
17464
#: serverguide/C/mail.xml:260(para)
17466
"Once you have <application>Dovecot</application> configured restart it with:"
17469
#: serverguide/C/mail.xml:264(command) serverguide/C/mail.xml:735(command)
17470
msgid "sudo /etc/init.d/dovecot restart"
17473
#: serverguide/C/mail.xml:269(title)
17474
msgid "Postfix-Dovecot"
17477
#: serverguide/C/mail.xml:271(para)
17479
"Another option for configuring <application>Postfix</application> for SMTP-"
17480
"AUTH is using the <application>dovecot-postfix</application> package. This "
17481
"package will install <application>Dovecot</application> and configure "
17482
"<application>Postfix</application> to use it for both SASL authentication "
17483
"and as a Mail Delivery Agent (MDA). The package also configures "
17484
"<application>Dovecot</application> for IMAP, IMAPS, POP3, and POP3S."
17487
#: serverguide/C/mail.xml:280(para)
17489
"You may or may not want to run IMAP, IMAPS, POP3, or POP3S on your mail "
17490
"server. For example, if you are configuring your server to be a mail "
17491
"gateway, spam/virus filter, etc. If this is the case it may be easier to use "
17492
"the above commands to configure Postfix for SMTPAUTH."
17495
#: serverguide/C/mail.xml:287(para)
17496
msgid "To install the package, from a terminal prompt enter:"
17499
#: serverguide/C/mail.xml:292(command)
17500
msgid "sudo apt-get install dovecot-postfix"
17503
#: serverguide/C/mail.xml:295(para)
17505
"You should now have a working mail server, but there are a few options that "
17506
"you may wish to further customize. For example, the package uses the "
17507
"certificate and key from the <application>ssl-cert</application> package, "
17508
"and in a production environment you should use a certificate and key "
17509
"generated for the host. See <xref linkend=\"certificates-and-security\"/> "
17510
"for more details."
17513
#: serverguide/C/mail.xml:301(para)
17515
"Once you have a customized certificate and key for the host, change the "
17516
"following options in <filename>/etc/postfix/main.cf</filename>:"
17519
#: serverguide/C/mail.xml:305(programlisting)
17523
"smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem\n"
17524
"smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key\n"
17527
#: serverguide/C/mail.xml:310(para)
17528
msgid "Then restart Postfix:"
17531
#: serverguide/C/mail.xml:321(para)
17533
"SMTP-AUTH configuration is complete. Now it is time to test the setup."
17536
#: serverguide/C/mail.xml:324(para)
17537
msgid "To see if SMTP-AUTH and TLS work properly, run the following command:"
17540
#: serverguide/C/mail.xml:329(command)
17541
msgid "telnet mail.example.com 25"
17544
#: serverguide/C/mail.xml:331(para)
17546
"After you have established the connection to the postfix mail server, type:"
17549
#: serverguide/C/mail.xml:335(screen)
17553
"ehlo mail.example.com\n"
17556
#: serverguide/C/mail.xml:338(para)
17558
"If you see the following lines among others, then everything is working "
17559
"perfectly. Type <command>quit</command> to exit."
17562
#: serverguide/C/mail.xml:342(programlisting)
17567
"250-AUTH LOGIN PLAIN\n"
17568
"250-AUTH=LOGIN PLAIN\n"
17572
#: serverguide/C/mail.xml:352(para)
17574
"This section introduces some common ways to determine the cause if problems "
17578
#: serverguide/C/mail.xml:356(title)
17579
msgid "Escaping chroot"
17582
#: serverguide/C/mail.xml:357(para)
17584
"The Ubuntu <application>postfix</application> package will by default "
17585
"install into a <emphasis>chroot</emphasis> environment for security reasons. "
17586
"This can add greater complexity when troubleshooting problems."
17589
#: serverguide/C/mail.xml:361(para)
17591
"To turn off the chroot operation locate for the following line in the "
17592
"<filename>/etc/postfix/master.cf</filename> configuration file:"
17595
#: serverguide/C/mail.xml:365(screen)
17599
"smtp inet n - - - - smtpd\n"
17602
#: serverguide/C/mail.xml:368(para)
17603
msgid "and modify it as follows:"
17606
#: serverguide/C/mail.xml:371(screen)
17610
"smtp inet n - n - - smtpd\n"
17613
#: serverguide/C/mail.xml:374(para)
17615
"You will then need to restart Postfix to use the new configuration. From a "
17616
"terminal prompt enter:"
17619
#: serverguide/C/mail.xml:382(title)
17623
#: serverguide/C/mail.xml:383(para)
17625
"<application>Postfix</application> sends all log messages to "
17626
"<filename>/var/log/mail.log</filename>. However error and warning messages "
17627
"can sometimes get lost in the normal log output so they are also logged to "
17628
"<filename>/var/log/mail.err</filename> and "
17629
"<filename>/var/log/mail.warn</filename> respectively."
17632
#: serverguide/C/mail.xml:388(para)
17634
"To see messages entered into the logs in real time you can use the "
17635
"<application>tail -f</application> command:"
17638
#: serverguide/C/mail.xml:393(command)
17639
msgid "tail -f /var/log/mail.err"
17642
#: serverguide/C/mail.xml:395(para)
17644
"The amount of detail that is recorded in the logs can be increased. Below "
17645
"are some configuration options for increasing the log level for some of the "
17646
"areas covered above."
17649
#: serverguide/C/mail.xml:401(para)
17651
"To increase <emphasis>TLS</emphasis> activity logging set the "
17652
"<emphasis>smtpd_tls_loglevel</emphasis> option to a value from 1 to 4."
17655
#: serverguide/C/mail.xml:405(command)
17656
msgid "sudo postconf -e 'smtpd_tls_loglevel = 4'"
17659
#: serverguide/C/mail.xml:409(para)
17661
"If you are having trouble sending or receiving mail from a specific domain "
17662
"you can add the domain to the <emphasis>debug_peer_list</emphasis> parameter."
17665
#: serverguide/C/mail.xml:414(command)
17666
msgid "sudo postconf -e 'debug_peer_list = problem.domain'"
17669
#: serverguide/C/mail.xml:418(para)
17671
"You can increase the verbosity of any <application>Postfix</application> "
17672
"daemon process by editing the <filename>/etc/postfix/master.cf</filename> "
17673
"and adding a <emphasis>-v</emphasis> after the entry. For example edit the "
17674
"<emphasis>smtp</emphasis> entry:"
17677
#: serverguide/C/mail.xml:422(programlisting)
17681
"smtp unix - - - - - smtp -v\n"
17684
#: serverguide/C/mail.xml:428(para)
17686
"It is important to note that after making one of the logging changes above "
17687
"the <application>Postfix</application> process will need to be reloaded in "
17688
"order to recognize the new configuration: <command>sudo /etc/init.d/postfix "
17692
#: serverguide/C/mail.xml:435(para)
17694
"To increase the amount of information logged when troubleshooting "
17695
"<emphasis>SASL</emphasis> issues you can set the following options in "
17696
"<filename>/etc/dovecot/dovecot.conf</filename>"
17699
#: serverguide/C/mail.xml:439(programlisting)
17704
"auth_debug_passwords=yes\n"
17707
#: serverguide/C/mail.xml:446(para)
17709
"Just like <application>Postfix</application> if you change a "
17710
"<application>Dovecot</application> configuration the process will need to be "
17711
"reloaded: <command>sudo /etc/init.d/dovecot reload</command>."
17714
#: serverguide/C/mail.xml:452(para)
17716
"Some of the options above can drastically increase the amount of information "
17717
"sent to the log files. Remember to return the log level back to normal after "
17718
"you have corrected the problem. Then reload the appropriate daemon for the "
17719
"new configuration to take affect."
17722
#: serverguide/C/mail.xml:460(para)
17724
"Administering a <application>Postfix</application> server can be a very "
17725
"complicated task. At some point you may need to turn to the Ubuntu community "
17726
"for more experienced help."
17729
#: serverguide/C/mail.xml:464(para)
17731
"A great place to ask for <application>Postfix</application> assistance, and "
17732
"get involved with the Ubuntu Server community, is the <emphasis>#ubuntu-"
17733
"server</emphasis> IRC channel on <ulink "
17734
"url=\"http://freenode.net\">freenode</ulink>. You can also post a message to "
17735
"one of the <ulink "
17736
"url=\"http://www.ubuntu.com/support/community/webforums\">Web Forums</ulink>."
17739
#: serverguide/C/mail.xml:469(para)
17741
"For in depth <application>Postfix</application> information Ubuntu "
17742
"developers highly recommend: <ulink url=\"http://www.postfix-book.com/\">The "
17743
"Book of Postfix</ulink>."
17746
#: serverguide/C/mail.xml:473(para)
17748
"Finally, the <ulink "
17749
"url=\"http://www.postfix.org/documentation.html\">Postfix</ulink> website "
17750
"also has great documentation on all the different configuration options "
17754
#: serverguide/C/mail.xml:477(para)
17756
"Also, the <ulink url=\"https://help.ubuntu.com/community/Postfix\">Ubuntu "
17757
"Wiki Postifx</ulink> page has more information."
17760
#: serverguide/C/mail.xml:485(title) serverguide/C/mail.xml:872(title) serverguide/C/mail.xml:988(title)
17764
#: serverguide/C/mail.xml:486(para)
17766
"<application>Exim4</application> is another Message Transfer Agent (MTA) "
17767
"developed at the University of Cambridge for use on Unix systems connected "
17768
"to the Internet. Exim can be installed in place of "
17769
"<application>sendmail</application>, although the configuration of "
17770
"<application>exim</application> is quite different to that of "
17771
"<application>sendmail</application>."
17774
#: serverguide/C/mail.xml:497(para)
17776
"To install <application>exim4</application>, run the following command: "
17778
"<command>sudo apt-get install exim4</command>\n"
17782
#: serverguide/C/mail.xml:506(para)
17784
"To configure <application>Exim4</application>, run the following command:"
17787
#: serverguide/C/mail.xml:510(command)
17788
msgid "sudo dpkg-reconfigure exim4-config"
17791
#: serverguide/C/mail.xml:512(para)
17793
"The user interface will be displayed. The user interface lets you configure "
17794
"many parameters. For example, In <application>Exim4</application> the "
17795
"configuration files are split among multiple files. If you wish to have them "
17796
"in one file you can configure accordingly in this user interface."
17799
#: serverguide/C/mail.xml:520(para)
17801
"All the parameters you configure in the user interface are stored in "
17802
"<filename>/etc/exim4/update-exim4.conf.conf</filename> file. If you wish to "
17803
"re-configure, either you re-run the configuration wizard or manually edit "
17804
"this file using your favorite editor. Once you configure, you can run the "
17805
"following command to generate the master configuration file:"
17808
#: serverguide/C/mail.xml:531(command) serverguide/C/mail.xml:604(command)
17809
msgid "sudo update-exim4.conf"
17812
#: serverguide/C/mail.xml:533(para)
17814
"The master configuration file, is generated and it is stored in "
17815
"<filename>/var/lib/exim4/config.autogenerated</filename>."
17818
#: serverguide/C/mail.xml:539(para)
17820
"At any time, you should not edit the master configuration file, "
17821
"<filename>/var/lib/exim4/config.autogenerated</filename> manually. It is "
17822
"updated automatically every time you run <command>update-exim4.conf</command>"
17825
#: serverguide/C/mail.xml:547(para)
17827
"You can run the following command to start <application>Exim4</application> "
17831
#: serverguide/C/mail.xml:552(command) serverguide/C/mail.xml:994(command)
17832
msgid "sudo /etc/init.d/exim4 start"
17835
#: serverguide/C/mail.xml:557(para)
17837
"This section covers configuring Exim4 to use SMTP-AUTH with TLS and SASL."
17840
#: serverguide/C/mail.xml:560(para)
17842
"The first step is to create a certificate for use with TLS. Enter the "
17843
"following into a terminal prompt:"
17846
#: serverguide/C/mail.xml:564(command)
17847
msgid "sudo /usr/share/doc/exim4-base/examples/exim-gencert"
17850
#: serverguide/C/mail.xml:566(para)
17852
"Now Exim4 needs to be configured for TLS by editing "
17853
"<filename>/etc/exim4/conf.d/main/03_exim4-config_tlsoptions</filename> add "
17857
#: serverguide/C/mail.xml:570(programlisting)
17861
"MAIN_TLS_ENABLE = yes\n"
17864
#: serverguide/C/mail.xml:573(para)
17866
"Next you need to configure <application>Exim4</application> to use the "
17867
"<application>saslauthd</application> for authentication. Edit "
17868
"<filename>/etc/exim4/conf.d/auth/30_exim4-config_examples</filename> and "
17869
"uncomment the <emphasis>plain_saslauthd_server</emphasis> and "
17870
"<emphasis>login_saslauthd_server</emphasis> sections:"
17873
#: serverguide/C/mail.xml:578(programlisting)
17877
" plain_saslauthd_server:\n"
17878
" driver = plaintext\n"
17879
" public_name = PLAIN\n"
17880
" server_condition = ${if saslauthd{{$auth2}{$auth3}}{1}{0}}\n"
17881
" server_set_id = $auth2\n"
17882
" server_prompts = :\n"
17883
" .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS\n"
17884
" server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}\n"
17887
" login_saslauthd_server:\n"
17888
" driver = plaintext\n"
17889
" public_name = LOGIN\n"
17890
" server_prompts = \"Username:: : Password::\"\n"
17891
" # don't send system passwords over unencrypted connections\n"
17892
" server_condition = ${if saslauthd{{$auth1}{$auth2}}{1}{0}}\n"
17893
" server_set_id = $auth1\n"
17894
" .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS\n"
17895
" server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}\n"
17899
#: serverguide/C/mail.xml:600(para)
17900
msgid "Finally, update the Exim4 configuration and restart the service:"
17903
#: serverguide/C/mail.xml:605(command)
17904
msgid "sudo /etc/init.d/exim4 restart"
17907
#: serverguide/C/mail.xml:610(para)
17909
"This section provides details on configuring the saslauthd to provide "
17910
"authentication for <application>Exim4</application>."
17913
#: serverguide/C/mail.xml:613(para)
17915
"The first step is to install the sasl2-bin package. From a terminal prompt "
17916
"enter the following:"
17919
#: serverguide/C/mail.xml:617(command)
17920
msgid "sudo apt-get install sasl2-bin"
17923
#: serverguide/C/mail.xml:619(para)
17925
"To configure saslauthd edit the /etc/default/saslauthd configuration file "
17926
"and set START=no to:"
17929
#: serverguide/C/mail.xml:622(programlisting)
17936
#: serverguide/C/mail.xml:625(para)
17938
"Next the <emphasis>Debian-exim</emphasis> user needs to be part of the "
17939
"<emphasis>sasl</emphasis> group in order for Exim4 to use the saslauthd "
17943
#: serverguide/C/mail.xml:630(command)
17944
msgid "sudo adduser Debian-exim sasl"
17947
#: serverguide/C/mail.xml:632(para)
17948
msgid "Now start the <application>saslauthd</application> service:"
17951
#: serverguide/C/mail.xml:636(command)
17952
msgid "sudo /etc/init.d/saslauthd start"
17955
#: serverguide/C/mail.xml:638(para)
17957
"<application>Exim4</application> is now configured with SMTP-AUTH using TLS "
17958
"and SASL authentication."
17961
#: serverguide/C/mail.xml:647(para)
17963
"See <ulink url=\"http://www.exim.org/\">exim.org</ulink> for more "
17967
#: serverguide/C/mail.xml:652(para)
17969
"There is also an <ulink url=\"http://www.uit.co.uk/content/exim-smtp-mail-"
17970
"server\">Exim4 Book</ulink> available."
17973
#: serverguide/C/mail.xml:657(para)
17975
"Another resource is the <ulink "
17976
"url=\"https://help.ubuntu.com/community/Exim4\">Exim4 Ubuntu Wiki </ulink> "
17980
#: serverguide/C/mail.xml:666(title)
17981
msgid "Dovecot Server"
17984
#: serverguide/C/mail.xml:667(para)
17986
"<application>Dovecot</application> is a Mail Delivery Agent, written with "
17987
"security primarily in mind. It supports the major mailbox formats: mbox or "
17988
"Maildir. This section explain how to set it up as an imap or pop3 server."
17991
#: serverguide/C/mail.xml:675(para)
17993
"To install <application>dovecot</application>, run the following command in "
17994
"the command prompt:"
17997
#: serverguide/C/mail.xml:680(command)
17998
msgid "sudo apt-get install dovecot-imapd dovecot-pop3d"
18001
#: serverguide/C/mail.xml:685(para)
18003
"To configure <application>dovecot</application>, you can edit the file "
18004
"<filename>/etc/dovecot/dovecot.conf</filename>. You can choose the protocol "
18005
"you use. It could be pop3, pop3s (pop3 secure), imap and imaps (imap "
18006
"secure). A description of these protocols is beyond the scope of this guide. "
18007
"For further information, refer to the Wikipedia articles on <ulink "
18008
"url=\"http://en.wikipedia.org/wiki/POP3\">POP3</ulink> and <ulink "
18009
"url=\"http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol\">IMAP</u"
18013
#: serverguide/C/mail.xml:695(para)
18015
"IMAPS and POP3S are more secure that the simple IMAP and POP3 because they "
18016
"use SSL encryption to connect. Once you have chosen the protocol, amend the "
18017
"following line in the file <filename>/etc/dovecot/dovecot.conf</filename>:"
18020
#: serverguide/C/mail.xml:701(programlisting)
18024
"protocols = pop3 pop3s imap imaps\n"
18027
#: serverguide/C/mail.xml:704(para)
18029
"Next, choose the mailbox you would like to use. "
18030
"<application>Dovecot</application> supports <emphasis "
18031
"role=\"strong\">maildir</emphasis> and <emphasis "
18032
"role=\"strong\">mbox</emphasis> formats. These are the most commonly used "
18033
"mailbox formats. They both have their own benefits and are discussed on "
18034
"<ulink url=\"http://wiki.dovecot.org/MailboxFormat\">the Dovecot web "
18038
#: serverguide/C/mail.xml:712(para)
18040
"Once you have chosen your mailbox type, edit the file "
18041
"<filename>/etc/dovecot/dovecot.conf</filename> and change the following line:"
18044
#: serverguide/C/mail.xml:717(programlisting)
18048
"mail_location = maildir:~/Maildir # (for maildir)\n"
18050
"mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u # (for mbox)\n"
18053
#: serverguide/C/mail.xml:723(para)
18055
"You should configure your Mail Transport Agent (MTA) to transfer the "
18056
"incoming mail to this type of mailbox if it is different from the one you "
18060
#: serverguide/C/mail.xml:729(para)
18062
"Once you have configured dovecot, restart the "
18063
"<application>dovecot</application> daemon in order to test your setup:"
18066
#: serverguide/C/mail.xml:738(para)
18068
"If you have enabled imap, or pop3, you can also try to log in with the "
18069
"commands <command>telnet localhost pop3</command> or <command>telnet "
18070
"localhost imap2</command>. If you see something like the following, the "
18071
"installation has been successful:"
18074
#: serverguide/C/mail.xml:745(programlisting)
18078
"bhuvan@rainbow:~$ telnet localhost pop3\n"
18079
"Trying 127.0.0.1...\n"
18080
"Connected to localhost.localdomain.\n"
18081
"Escape character is '^]'.\n"
18082
"+OK Dovecot ready.\n"
18085
#: serverguide/C/mail.xml:754(title)
18086
msgid "Dovecot SSL Configuration"
18089
#: serverguide/C/mail.xml:755(para)
18091
"To configure <application>dovecot</application> to use SSL, you can edit the "
18092
"file <filename>/etc/dovecot/dovecot.conf</filename> and amend following "
18096
#: serverguide/C/mail.xml:760(programlisting)
18100
"ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem\n"
18101
"ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key\n"
18102
"ssl_disable = no\n"
18103
"disable_plaintext_auth = no\n"
18106
#: serverguide/C/mail.xml:766(para)
18108
"You can get the SSL certificate from a Certificate Issuing Authority or you "
18109
"can create self signed SSL certificate. The latter is a good option for "
18110
"email, because SMTP clients rarely complain about \"self-signed "
18111
"certificates\". Please refer to <xref linkend=\"certificates-and-"
18112
"security\"/> for details about how to create self signed SSL certificate. "
18113
"Once you create the certificate, you will have a key file and a certificate "
18114
"file. Please copy them to the location pointed in the "
18115
"<filename>/etc/dovecot/dovecot.conf</filename> configuration file."
18118
#: serverguide/C/mail.xml:781(title)
18119
msgid "Firewall Configuration for an Email Server"
18122
#: serverguide/C/mail.xml:787(para)
18126
#: serverguide/C/mail.xml:788(para)
18127
msgid "IMAPS - 993"
18130
#: serverguide/C/mail.xml:789(para)
18134
#: serverguide/C/mail.xml:790(para)
18135
msgid "POP3S - 995"
18138
#: serverguide/C/mail.xml:782(para)
18140
"To access your mail server from another computer, you must configure your "
18141
"firewall to allow connections to the server on the necessary ports. "
18145
#: serverguide/C/mail.xml:799(para)
18147
"See the <ulink url=\"http://www.dovecot.org/\">Dovecot website</ulink> for "
18148
"more information."
18151
#: serverguide/C/mail.xml:804(para)
18153
"Also, the <ulink url=\"https://help.ubuntu.com/community/Dovecot\">Dovecot "
18154
"Ubuntu Wiki</ulink> page has more details."
18157
#: serverguide/C/mail.xml:813(title) serverguide/C/mail.xml:890(title) serverguide/C/mail.xml:1113(title)
18161
#: serverguide/C/mail.xml:814(para)
18163
"Mailman is an open source program for managing electronic mail discussions "
18164
"and e-newsletter lists. Many open source mailing lists (including all the "
18165
"<ulink url=\"http://lists.ubuntu.com\">Ubuntu mailing lists</ulink>) use "
18166
"Mailman as their mailing list software. It is powerful and easy to install "
18170
#: serverguide/C/mail.xml:824(para)
18172
"Mailman provides a web interface for the administrators and users, using an "
18173
"external mail server to send and receive emails. It works perfectly with the "
18174
"following mail servers:"
18177
#: serverguide/C/mail.xml:835(application)
18181
#: serverguide/C/mail.xml:838(application)
18185
#: serverguide/C/mail.xml:841(application)
18189
#: serverguide/C/mail.xml:846(para)
18191
"We will see how to install and configure Mailman with, the Apache web "
18192
"server, and either the Postfix or Exim mail server. If you wish to install "
18193
"Mailman with a different mail server, please refer to the references section."
18196
#: serverguide/C/mail.xml:853(para)
18198
"You only need to install one mail server and "
18199
"<application>Postfix</application> is the default Ubuntu Mail Transfer Agent."
18202
#: serverguide/C/mail.xml:858(title) serverguide/C/mail.xml:917(title)
18206
#: serverguide/C/mail.xml:859(para)
18208
"To install apache2 you refer to <ulink url=\"./web-servers.xml#http-"
18209
"installation\">HTTPD Installation</ulink> section for details."
18212
#: serverguide/C/mail.xml:867(para)
18214
"For instructions on installing and configuring Postfix refer to <xref "
18215
"linkend=\"postfix\"/>"
18218
#: serverguide/C/mail.xml:873(para)
18219
msgid "To install Exim4 refer to <xref linkend=\"exim4\"/>."
18222
#: serverguide/C/mail.xml:884(application)
18223
msgid "dc_use_split_config='true'"
18226
#: serverguide/C/mail.xml:876(para)
18228
"Once exim4 is installed, the configuration files are stored in the "
18229
"<filename>/etc/exim4</filename> directory. In Ubuntu, by default, the exim4 "
18230
"configuration files are split across different files. You can change this "
18231
"behavior by changing the following variable in the "
18232
"<filename>/etc/exim4/update-exim4.conf</filename> file: <placeholder-1/>"
18235
#: serverguide/C/mail.xml:891(para)
18237
"To install <application>Mailman</application>, run following command at a "
18241
#: serverguide/C/mail.xml:895(command)
18242
msgid "sudo apt-get install mailman"
18245
#: serverguide/C/mail.xml:897(para)
18247
"It copies the installation files in "
18248
"<application>/var/lib/mailman</application> directory. It installs the CGI "
18249
"scripts in <application>/usr/lib/cgi-bin/mailman</application> directory. It "
18250
"creates <emphasis>list</emphasis> linux user. It creates the "
18251
"<emphasis>list</emphasis> linux group. The mailman process will be owned by "
18255
#: serverguide/C/mail.xml:909(para)
18257
"This section assumes you have successfully installed "
18258
"<application>mailman</application>, <application>apache2</application>, and "
18259
"<application>postfix</application> or <application>exim4</application>. Now "
18260
"you just need to configure them."
18263
#: serverguide/C/mail.xml:918(para)
18265
"An example Apache configuration file comes with "
18266
"<application>Mailman</application> and is placed in "
18267
"<filename>/etc/mailman/apache.conf</filename>. In order for Apache to use "
18268
"the config file it needs to be copied to <filename>/etc/apache2/sites-"
18269
"available</filename>:"
18272
#: serverguide/C/mail.xml:924(command)
18274
"sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf"
18277
#: serverguide/C/mail.xml:926(para)
18279
"This will setup a new Apache <emphasis>VirtualHost</emphasis> for the "
18280
"Mailman administration site. Now enable the new configuration and restart "
18284
#: serverguide/C/mail.xml:931(command)
18285
msgid "sudo a2ensite mailman.conf"
18288
#: serverguide/C/mail.xml:934(para)
18290
"Mailman uses apache2 to render its CGI scripts. The mailman CGI scripts are "
18291
"installed in the <application>/usr/lib/cgi-bin/mailman</application> "
18292
"directory. So, the mailman url will be http://hostname/cgi-bin/mailman/. You "
18293
"can make changes to the <filename>/etc/apache2/sites-"
18294
"available/mailman.conf</filename> file if you wish to change this behavior."
18297
#: serverguide/C/mail.xml:945(para)
18299
"For <application>Postfix</application> integration, we will associate the "
18300
"domain lists.example.com with the mailing lists. Please replace "
18301
"<emphasis>lists.example.com</emphasis> with the domain of your choosing."
18304
#: serverguide/C/mail.xml:949(para)
18306
"You can use the postconf command to add the necessary configuration to "
18307
"<filename>/etc/postfix/main.cf</filename>:"
18310
#: serverguide/C/mail.xml:953(command)
18311
msgid "sudo postconf -e 'relay_domains = lists.example.com'"
18314
#: serverguide/C/mail.xml:954(command)
18315
msgid "sudo postconf -e 'transport_maps = hash:/etc/postfix/transport'"
18318
#: serverguide/C/mail.xml:955(command)
18319
msgid "sudo postconf -e 'mailman_destination_recipient_limit = 1'"
18322
#: serverguide/C/mail.xml:957(para)
18324
"In <filename>/etc/postfix/master.cf</filename> double check that you have "
18325
"the following transport:"
18328
#: serverguide/C/mail.xml:960(programlisting)
18332
"mailman unix - n n - - pipe\n"
18333
" flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py\n"
18334
" ${nexthop} ${user}\n"
18337
#: serverguide/C/mail.xml:965(para)
18339
"It calls the <emphasis>postfix-to-mailman.py</emphasis> script when a mail "
18340
"is delivered to a list."
18343
#: serverguide/C/mail.xml:968(para)
18345
"Associate the domain lists.example.com to the Mailman transport with the "
18346
"transport map. Edit the file <filename>/etc/postfix/transport</filename>:"
18349
#: serverguide/C/mail.xml:971(programlisting)
18353
"lists.example.com mailman:\n"
18356
#: serverguide/C/mail.xml:974(para)
18358
"Now have <application>Postfix</application> build the transport map by "
18359
"entering the following from a terminal prompt:"
18362
#: serverguide/C/mail.xml:978(command)
18363
msgid "sudo postmap -v /etc/postfix/transport"
18366
#: serverguide/C/mail.xml:980(para)
18367
msgid "Then restart Postfix to enable the new configurations:"
18370
#: serverguide/C/mail.xml:989(para)
18372
"Once Exim4 is installed, you can start the Exim server using the following "
18373
"command from a terminal prompt:"
18376
#: serverguide/C/mail.xml:1005(para) serverguide/C/mail.xml:1020(title)
18380
#: serverguide/C/mail.xml:1008(para) serverguide/C/mail.xml:1060(title)
18384
#: serverguide/C/mail.xml:1011(para) serverguide/C/mail.xml:1083(title)
18388
#: serverguide/C/mail.xml:996(para)
18390
"In order to make mailman work with Exim4, you need to configure Exim4. As "
18391
"mentioned earlier, by default, Exim4 uses multiple configuration files of "
18392
"different types. For details, please refer to the <ulink "
18393
"url=\"http://www.exim.org\">Exim</ulink> web site. To run mailman, we should "
18394
"add new a configuration file to the following configuration types: "
18395
"<placeholder-1/> Exim creates a master configuration file by sorting all "
18396
"these mini configuration files. So, the order of these configuration files "
18397
"is very important."
18400
#: serverguide/C/mail.xml:1027(programlisting)
18405
"# Home dir for your Mailman installation -- aka Mailman's prefix\n"
18407
"# On Ubuntu this should be \"/var/lib/mailman\"\n"
18408
"# This is normally the same as ~mailman\n"
18409
"MM_HOME=/var/lib/mailman\n"
18411
"# User and group for Mailman, should match your --with-mail-gid\n"
18412
"# switch to Mailman's configure script. Value is normally \"mailman\"\n"
18416
"# Domains that your lists are in - colon separated list\n"
18417
"# you may wish to add these into local_domains as well\n"
18418
"domainlist mm_domains=hostname.com\n"
18420
"# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n"
18422
"# These values are derived from the ones above and should not need\n"
18423
"# editing unless you have munged your mailman installation\n"
18425
"# The path of the Mailman mail wrapper script\n"
18426
"MM_WRAP=MM_HOME/mail/mailman\n"
18428
"# The path of the list config file (used as a required file when\n"
18429
"# verifying list addresses)\n"
18430
"MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck\n"
18434
#: serverguide/C/mail.xml:1021(para)
18436
"All the configuration files belonging to the main type are stored in the "
18437
"<filename>/etc/exim4/conf.d/main/</filename> directory. You can add the "
18438
"following content to a new file, named <filename>04_exim4-"
18439
"config_mailman</filename>: <placeholder-1/>"
18442
#: serverguide/C/mail.xml:1067(programlisting)
18446
" mailman_transport:\n"
18448
" command = MM_WRAP \\\n"
18449
" '${if def:local_part_suffix \\\n"
18450
" {${sg{$local_part_suffix}{-(\\\\w+)(\\\\+.*)?}{\\$1}}} "
18454
" current_directory = MM_HOME\n"
18455
" home_directory = MM_HOME\n"
18457
" group = MM_GID\n"
18460
#: serverguide/C/mail.xml:1061(para)
18462
"All the configuration files belonging to transport type are stored in the "
18463
"<filename>/etc/exim4/conf.d/transport/</filename> directory. You can add the "
18464
"following content to a new file named <filename> 40_exim4-"
18465
"config_mailman</filename>: <placeholder-1/>"
18468
#: serverguide/C/mail.xml:1088(programlisting)
18472
" mailman_router:\n"
18473
" driver = accept\n"
18474
" require_files = MM_HOME/lists/$local_part/config.pck\n"
18475
" local_part_suffix_optional\n"
18476
" local_part_suffix = -bounces : -bounces+* : \\\n"
18477
" -confirm+* : -join : -leave : \\\n"
18478
" -owner : -request : -admin\n"
18479
" transport = mailman_transport\n"
18482
#: serverguide/C/mail.xml:1084(para)
18484
"All the configuration files belonging to router type are stored in the "
18485
"<filename>/etc/exim4/conf.d/router/</filename> directory. You can add the "
18486
"following content in to a new file named <filename>101_exim4-"
18487
"config_mailman</filename>: <placeholder-1/>"
18490
#: serverguide/C/mail.xml:1101(para)
18492
"The order of main and transport configuration files can be in any order. "
18493
"But, the order of router configuration files must be the same. This "
18494
"particular file must appear before the <application>200_exim4-"
18495
"config_primary</application> file. These two configuration files contain "
18496
"same type of information. The first file takes the precedence. For more "
18497
"details, please refer to the references section."
18500
#: serverguide/C/mail.xml:1114(para)
18502
"Once mailman is installed, you can run it using the following command:"
18505
#: serverguide/C/mail.xml:1118(command)
18506
msgid "sudo /etc/init.d/mailman start"
18509
#: serverguide/C/mail.xml:1120(para)
18511
"Once mailman is installed, you should create the default mailing list. Run "
18512
"the following command to create the mailing list:"
18515
#: serverguide/C/mail.xml:1126(command)
18516
msgid "sudo /usr/sbin/newlist mailman"
18519
#: serverguide/C/mail.xml:1129(programlisting)
18523
" Enter the email address of the person running the list: bhuvan at "
18525
" Initial mailman password:\n"
18526
" To finish creating your mailing list, you must edit your "
18527
"<filename>/etc/aliases</filename> (or\n"
18528
" equivalent) file by adding the following lines, and possibly running the\n"
18529
" `newaliases' program:\n"
18531
" ## mailman mailing list\n"
18532
" mailman: \"|/var/lib/mailman/mail/mailman post mailman\"\n"
18533
" mailman-admin: \"|/var/lib/mailman/mail/mailman admin mailman\"\n"
18534
" mailman-bounces: \"|/var/lib/mailman/mail/mailman bounces mailman\"\n"
18535
" mailman-confirm: \"|/var/lib/mailman/mail/mailman confirm mailman\"\n"
18536
" mailman-join: \"|/var/lib/mailman/mail/mailman join mailman\"\n"
18537
" mailman-leave: \"|/var/lib/mailman/mail/mailman leave mailman\"\n"
18538
" mailman-owner: \"|/var/lib/mailman/mail/mailman owner mailman\"\n"
18539
" mailman-request: \"|/var/lib/mailman/mail/mailman request mailman\"\n"
18540
" mailman-subscribe: \"|/var/lib/mailman/mail/mailman subscribe "
18542
" mailman-unsubscribe: \"|/var/lib/mailman/mail/mailman unsubscribe "
18545
" Hit enter to notify mailman owner...\n"
18550
#: serverguide/C/mail.xml:1152(para)
18552
"We have configured either Postfix or Exim4 to recognize all emails from "
18553
"mailman. So, it is not mandatory to make any new entries in "
18554
"<filename>/etc/aliases</filename>. If you have made any changes to the "
18555
"configuration files, please ensure that you restart those services before "
18556
"continuing to next section."
18559
#: serverguide/C/mail.xml:1160(para)
18561
"The Exim4 does not use the above aliases to forward mails to Mailman, as it "
18562
"uses a <emphasis>discover</emphasis> approach. To suppress the aliases while "
18563
"creating the list, you can add <emphasis>MTA=None</emphasis> line in Mailman "
18564
"configuration file, <filename>/etc/mailman/mm_cfg.py</filename>."
18567
#: serverguide/C/mail.xml:1171(title)
18568
msgid "Administration"
18569
msgstr "Administracion"
18571
#: serverguide/C/mail.xml:1172(para)
18573
"We assume you have a default installation. The mailman cgi scripts are still "
18574
"in the <application>/usr/lib/cgi-bin/mailman/</application> directory. "
18575
"Mailman provides a web based administration facility. To access this page, "
18576
"point your browser to the following url:"
18579
#: serverguide/C/mail.xml:1180(para)
18580
msgid "http://hostname/cgi-bin/mailman/admin"
18583
#: serverguide/C/mail.xml:1184(para)
18585
"The default mailing list, <emphasis>mailman</emphasis>, will appear in this "
18586
"screen. If you click the mailing list name, it will ask for your "
18587
"authentication password. If you enter the correct password, you will be able "
18588
"to change administrative settings of this mailing list. You can create a new "
18589
"mailing list using the command line utility "
18590
"(<command>/usr/sbin/newlist</command>). Alternatively, you can create a new "
18591
"mailing list using the web interface."
18594
#: serverguide/C/mail.xml:1197(title)
18596
msgstr "Utilizaires"
18598
#: serverguide/C/mail.xml:1198(para)
18600
"Mailman provides a web based interface for users. To access this page, point "
18601
"your browser to the following url:"
18604
#: serverguide/C/mail.xml:1203(para)
18605
msgid "http://hostname/cgi-bin/mailman/listinfo"
18608
#: serverguide/C/mail.xml:1207(para)
18610
"The default mailing list, <emphasis>mailman</emphasis>, will appear in this "
18611
"screen. If you click the mailing list name, it will display the subscription "
18612
"form. You can enter your email address, name (optional), and password to "
18613
"subscribe. An email invitation will be sent to you. You can follow the "
18614
"instructions in the email to subscribe."
18617
#: serverguide/C/mail.xml:1219(ulink)
18618
msgid "GNU Mailman - Installation Manual"
18621
#: serverguide/C/mail.xml:1223(ulink)
18622
msgid "HOWTO - Using Exim 4 and Mailman 2.1 together"
18625
#: serverguide/C/mail.xml:1226(para)
18627
"Also, see the <ulink "
18628
"url=\"https://help.ubuntu.com/community/Mailman\">Mailman Ubuntu "
18629
"Wiki</ulink> page."
18632
#: serverguide/C/mail.xml:1232(title)
18633
msgid "Mail Filtering"
18636
#: serverguide/C/mail.xml:1233(para)
18638
"One of the largest issues with email today is the problem of Unsolicited "
18639
"Bulk Email (UBE). Also known as SPAM, such messages may also carry viruses "
18640
"and other forms of malware. According to some reports these messages make up "
18641
"the bulk of all email traffic on the Internet."
18644
#: serverguide/C/mail.xml:1238(para)
18646
"This section will cover integrating <application>Amavisd-new</application>, "
18647
"<application>Spamassassin</application>, and "
18648
"<application>ClamAV</application> with the "
18649
"<application>Postfix</application> Mail Transport Agent (MTA). "
18650
"<application>Postfix</application> can also check email validity by passing "
18651
"it through external content filters. These filters can sometimes determine "
18652
"if a message is spam without needing to process it with more resource "
18653
"intensive applications. Two common filters are <application>dkim-"
18654
"filter</application> and <application>python-policyd-spf</application>."
18657
#: serverguide/C/mail.xml:1248(para)
18659
"<application>Amavisd-new</application> is a wrapper program that can call "
18660
"any number of content filtering programs for spam detection, antivirus, etc."
18663
#: serverguide/C/mail.xml:1254(para)
18665
"<application>Spamassassin</application> uses a variety of mechanisms to "
18666
"filter email based on the message content."
18669
#: serverguide/C/mail.xml:1259(para)
18671
"<application>ClamAV</application> is an open source antivirus application."
18674
#: serverguide/C/mail.xml:1264(para)
18676
"<application>dkim-filter</application> implements a Sendmail Mail Filter "
18677
"(Milter) for the DomainKeys Identified Mail (DKIM) standard."
18680
#: serverguide/C/mail.xml:1270(para)
18682
"<application>python-policyd-spf</application> enables Sender Policy "
18683
"Framework (SPF) checking with <application>Postfix</application>."
18686
#: serverguide/C/mail.xml:1275(para)
18687
msgid "This is how the pieces fit together:"
18690
#: serverguide/C/mail.xml:1280(para)
18691
msgid "An email message is accepted by <application>Postfix</application>."
18694
#: serverguide/C/mail.xml:1285(para)
18696
"The message is passed through any external filters <application>dkim-"
18697
"filter</application> and <application>python-policyd-spf</application> in "
18701
#: serverguide/C/mail.xml:1291(para)
18702
msgid "<application>Amavisd-new</application> then processes the message."
18705
#: serverguide/C/mail.xml:1296(para)
18707
"<application>ClamAV</application> is used to scan the message. If the "
18708
"message contains a virus <application>Postfix</application> will reject the "
18712
#: serverguide/C/mail.xml:1302(para)
18714
"Clean messages will then be analyzed by "
18715
"<application>Spamassassin</application> to find out if the message is spam. "
18716
"<application>Spamassassin</application> will then add X-Header lines "
18717
"allowing <application>Amavisd-new</application> to further manipulate the "
18721
#: serverguide/C/mail.xml:1309(para)
18723
"For example, if a message has a Spam score of over fifty the message could "
18724
"be automatically dropped from the queue without the recipient ever having to "
18725
"be bothered. Another, way to handle flagged messages is to deliver them to "
18726
"the Mail User Agent (MUA) allowing the user to deal with the message as they "
18730
#: serverguide/C/mail.xml:1316(para)
18732
"See <xref linkend=\"postfix\"/> for instructions on installing and "
18733
"configuring Postfix."
18736
#: serverguide/C/mail.xml:1319(para)
18738
"To install the rest of the applications enter the following from a terminal "
18742
#: serverguide/C/mail.xml:1323(command)
18743
msgid "sudo apt-get install amavisd-new spamassassin clamav-daemon"
18746
#: serverguide/C/mail.xml:1324(command)
18747
msgid "sudo apt-get install dkim-filter python-policyd-spf"
18750
#: serverguide/C/mail.xml:1326(para)
18752
"There are some optional packages that integrate with "
18753
"<application>Spamassassin</application> for better spam detection:"
18756
#: serverguide/C/mail.xml:1330(command)
18757
msgid "sudo apt-get install pyzor razor"
18760
#: serverguide/C/mail.xml:1332(para)
18762
"Along with the main filtering applications compression utilities are needed "
18763
"to process some email attachments:"
18766
#: serverguide/C/mail.xml:1336(command)
18768
"sudo apt-get install arj cabextract cpio lha nomarch pax rar unrar unzip zip"
18771
#: serverguide/C/mail.xml:1339(para)
18773
"If some packages are not found, check that the "
18774
"<emphasis>multiverse</emphasis> repository is enabled in "
18775
"<filename>/etc/apt/sources.list</filename>"
18778
#: serverguide/C/mail.xml:1340(para)
18780
"If you make changes to the file, be sure to run <command>sudo apt-get "
18781
"update</command> before trying to install again."
18784
#: serverguide/C/mail.xml:1345(para)
18785
msgid "Now configure everything to work together and filter email."
18788
#: serverguide/C/mail.xml:1349(title)
18792
#: serverguide/C/mail.xml:1350(para)
18794
"The default behaviour of <application>ClamAV</application> will fit our "
18795
"needs. For more ClamAV configuration options, check the configuration files "
18796
"in <filename>/etc/clamav</filename>."
18799
#: serverguide/C/mail.xml:1355(para)
18801
"Add the <emphasis>clamav</emphasis> user to the <emphasis>amavis</emphasis> "
18802
"group in order for <application>Amavisd-new</application> to have the "
18803
"appropriate access to scan files:"
18806
#: serverguide/C/mail.xml:1360(command)
18807
msgid "sudo adduser clamav amavis"
18810
#: serverguide/C/mail.xml:1364(title)
18811
msgid "Spamassassin"
18814
#: serverguide/C/mail.xml:1365(para)
18816
"Spamassassin automatically detects optional components and will use them if "
18817
"they are present. This means that there is no need to configure "
18818
"<application>pyzor</application> and <application>razor</application>."
18821
#: serverguide/C/mail.xml:1369(para)
18823
"Edit <filename>/etc/default/spamassassin</filename> to activate the "
18824
"<application>Spamassassin</application> daemon. Change "
18825
"<emphasis>ENABLED=0</emphasis> to:"
18828
#: serverguide/C/mail.xml:1373(programlisting)
18835
#: serverguide/C/mail.xml:1376(para)
18836
msgid "Now start the daemon:"
18839
#: serverguide/C/mail.xml:1380(command)
18840
msgid "sudo /etc/init.d/spamassassin start"
18843
#: serverguide/C/mail.xml:1384(title)
18844
msgid "Amavisd-new"
18847
#: serverguide/C/mail.xml:1385(para)
18849
"First activate spam and antivirus detection in <application>Amavisd-"
18850
"new</application> by editing <filename>/etc/amavis/conf.d/15-"
18851
"content_filter_mode</filename>:"
18854
#: serverguide/C/mail.xml:1389(programlisting)
18860
"# You can modify this file to re-enable SPAM checking through spamassassin\n"
18861
"# and to re-enable antivirus checking.\n"
18864
"# Default antivirus checking mode\n"
18865
"# Uncomment the two lines below to enable it\n"
18868
"@bypass_virus_checks_maps = (\n"
18869
" \\%bypass_virus_checks, \\@bypass_virus_checks_acl, \\"
18870
"$bypass_virus_checks_re);\n"
18874
"# Default SPAM checking mode\n"
18875
"# Uncomment the two lines below to enable it\n"
18878
"@bypass_spam_checks_maps = (\n"
18879
" \\%bypass_spam_checks, \\@bypass_spam_checks_acl, \\"
18880
"$bypass_spam_checks_re);\n"
18882
"1; # insure a defined return\n"
18885
#: serverguide/C/mail.xml:1414(para)
18887
"Bouncing spam can be a bad idea as the return address is often faked. "
18888
"Consider editing <filename>/etc/amavis/conf.d/20-debian_defaults</filename> "
18889
"to set <emphasis>$final_spam_destiny</emphasis> to D_DISCARD rather than "
18890
"D_BOUNCE, as follows:"
18893
#: serverguide/C/mail.xml:1420(programlisting)
18897
"$final_spam_destiny = D_DISCARD;\n"
18900
#: serverguide/C/mail.xml:1424(para)
18902
"Additionally, you may want to adjust the following options to flag more "
18903
"messages as spam:"
18906
#: serverguide/C/mail.xml:1428(programlisting)
18910
"$sa_tag_level_deflt = -999; # add spam info headers if at, or above that "
18912
"$sa_tag2_level_deflt = 6.0; # add 'spam detected' headers at that level\n"
18913
"$sa_kill_level_deflt = 21.0; # triggers spam evasive actions\n"
18914
"$sa_dsn_cutoff_level = 4; # spam level beyond which a DSN is not sent\n"
18917
#: serverguide/C/mail.xml:1435(para)
18919
"If the server's <emphasis>hostname</emphasis> is different from the domain's "
18920
"MX record you may need to manually set the <emphasis>$myhostname</emphasis> "
18921
"option. Also, if the server receives mail for multiple domains the "
18922
"<emphasis>@local_domains_acl</emphasis> option will need to be customized. "
18923
"Edit the <filename>/etc/amavis/conf.d/50-user</filename> file:"
18926
#: serverguide/C/mail.xml:1442(programlisting)
18930
"$myhostname = 'mail.example.com';\n"
18931
"@local_domains_acl = ( \"example.com\", \"example.org\" );\n"
18934
#: serverguide/C/mail.xml:1447(para)
18936
"After configuration <application>Amavisd-new</application> needs to be "
18940
#: serverguide/C/mail.xml:1451(command) serverguide/C/mail.xml:1497(command)
18941
msgid "sudo /etc/init.d/amavis restart"
18944
#: serverguide/C/mail.xml:1454(title)
18945
msgid "DKIM Whitelist"
18948
#: serverguide/C/mail.xml:1456(para)
18950
"<application>Amavisd-new</application> can be configured to automatically "
18951
"<emphasis>Whitelist</emphasis> addresses from domains with valid Domain "
18952
"Keys. There are some pre-configured domains in the "
18953
"<filename>/etc/amavis/conf.d/40-policy_banks</filename>."
18956
#: serverguide/C/mail.xml:1462(para)
18957
msgid "There are multiple ways to configure the Whitelist for a domain:"
18960
#: serverguide/C/mail.xml:1468(para)
18962
"<emphasis>'example.com' => 'WHITELIST',</emphasis>: will whitelist any "
18963
"address from the \"example.com\" domain."
18966
#: serverguide/C/mail.xml:1473(para)
18968
"<emphasis>'.example.com' => 'WHITELIST',</emphasis>: will whitelist any "
18969
"address from any <emphasis>subdomains</emphasis> of \"example.com\" that "
18970
"have a valid signature."
18973
#: serverguide/C/mail.xml:1479(para)
18975
"<emphasis>'.example.com/@example.com' => 'WHITELIST',</emphasis>: will "
18976
"whitelist subdomains of \"example.com\" that use the signature of <emphasis "
18977
"role=\"italic\">example.com</emphasis> the parent domain."
18980
#: serverguide/C/mail.xml:1485(para)
18982
"<emphasis>'./@example.com' => 'WHITELIST',</emphasis>: adds addresses "
18983
"that have a valid signature from \"example.com\". This is usually used for "
18984
"discussion groups that sign thier messages."
18987
#: serverguide/C/mail.xml:1492(para)
18989
"A domain can also have multiple Whitelist configurations. After, editing the "
18990
"file restart <application>amaisd-new</application>:"
18993
#: serverguide/C/mail.xml:1501(para)
18995
"In this context, once a domain has been added to the Whitelist the message "
18996
"will not receive any anti-virus or spam filtering. This may or may not be "
18997
"the intended behavior you wish for a domain."
19000
#: serverguide/C/mail.xml:1511(para)
19002
"For <application>Postfix</application> integration, enter the following from "
19003
"a terminal prompt:"
19006
#: serverguide/C/mail.xml:1515(command)
19007
msgid "sudo postconf -e 'content_filter = smtp-amavis:[127.0.0.1]:10024'"
19010
#: serverguide/C/mail.xml:1517(para)
19012
"Next edit <filename>/etc/postfix/master.cf</filename> and add the following "
19013
"to the end of the file:"
19016
#: serverguide/C/mail.xml:1520(programlisting)
19020
"smtp-amavis unix - - - - 2 smtp\n"
19021
" -o smtp_data_done_timeout=1200\n"
19022
" -o smtp_send_xforward_command=yes\n"
19023
" -o disable_dns_lookups=yes\n"
19026
"127.0.0.1:10025 inet n - - - - smtpd\n"
19027
" -o content_filter=\n"
19028
" -o local_recipient_maps=\n"
19029
" -o relay_recipient_maps=\n"
19030
" -o smtpd_restriction_classes=\n"
19031
" -o smtpd_delay_reject=no\n"
19032
" -o smtpd_client_restrictions=permit_mynetworks,reject\n"
19033
" -o smtpd_helo_restrictions=\n"
19034
" -o smtpd_sender_restrictions=\n"
19035
" -o smtpd_recipient_restrictions=permit_mynetworks,reject\n"
19036
" -o smtpd_data_restrictions=reject_unauth_pipelining\n"
19037
" -o smtpd_end_of_data_restrictions=\n"
19038
" -o mynetworks=127.0.0.0/8\n"
19039
" -o smtpd_error_sleep_time=0\n"
19040
" -o smtpd_soft_error_limit=1001\n"
19041
" -o smtpd_hard_error_limit=1000\n"
19042
" -o smtpd_client_connection_count_limit=0\n"
19043
" -o smtpd_client_connection_rate_limit=0\n"
19045
"receive_override_options=no_header_body_checks,no_unknown_recipient_checks\n"
19048
#: serverguide/C/mail.xml:1547(para)
19050
"Also add the following two lines immediately below the "
19051
"<emphasis>\"pickup\"</emphasis> transport service:"
19054
#: serverguide/C/mail.xml:1550(programlisting)
19058
" -o content_filter=\n"
19059
" -o receive_override_options=no_header_body_checks\n"
19062
#: serverguide/C/mail.xml:1554(para)
19064
"This will prevent messages that are generated to report on spam from being "
19065
"classified as spam."
19068
#: serverguide/C/mail.xml:1557(para)
19069
msgid "Now restart <application>Postfix</application>:"
19072
#: serverguide/C/mail.xml:1563(para)
19073
msgid "Content filtering with spam and virus detection is now enabled."
19076
#: serverguide/C/mail.xml:1570(para)
19078
"First, test that the <application>Amavisd-new</application> SMTP is "
19082
#: serverguide/C/mail.xml:1573(programlisting)
19086
"telnet localhost 10024\n"
19087
"Trying 127.0.0.1...\n"
19088
"Connected to localhost.\n"
19089
"Escape character is '^]'.\n"
19090
"220 [127.0.0.1] ESMTP amavisd-new service ready\n"
19094
#: serverguide/C/mail.xml:1581(para)
19096
"In the Header of messages that go through the content filter you should see:"
19099
#: serverguide/C/mail.xml:1584(programlisting)
19104
"X-Virus-Scanned: Debian amavisd-new at example.com\n"
19105
"X-Spam-Status: No, hits=-2.3 tagged_above=-1000.0 required=5.0 tests=AWL, "
19110
#: serverguide/C/mail.xml:1591(para)
19112
"Your output will vary, but the important thing is that there are <emphasis>X-"
19113
"Virus-Scanned</emphasis> and <emphasis>X-Spam-Status</emphasis> entries."
19116
#: serverguide/C/mail.xml:1599(para)
19118
"The best way to figure out why something is going wrong is to check the log "
19122
#: serverguide/C/mail.xml:1604(para)
19124
"For instructions on <application>Postfix</application> logging see the <xref "
19125
"linkend=\"postfix-troubleshooting\"/> section."
19128
#: serverguide/C/mail.xml:1610(para)
19130
"<application>Amavisd-new</application> uses "
19131
"<application>Syslog</application> to send messages to "
19132
"<filename>/var/log/mail.log</filename>. The amount of detail can be "
19133
"increased by adding the <emphasis>$log_level</emphasis> option to "
19134
"<filename>/etc/amavis/conf.d/50-user</filename>, and setting the value from "
19138
#: serverguide/C/mail.xml:1615(programlisting)
19142
"$log_level = 2;\n"
19145
#: serverguide/C/mail.xml:1619(para)
19147
"When the <application>Amavisd-new</application> log output is increased "
19148
"<application>Spamassassin</application> log output is also increased."
19151
#: serverguide/C/mail.xml:1626(para)
19153
"The <application>ClamAV</application> log level can be increased by editing "
19154
"<filename>/etc/clamav/clamd.conf</filename> and setting the following option:"
19157
#: serverguide/C/mail.xml:1630(programlisting)
19161
"LogVerbose true\n"
19164
#: serverguide/C/mail.xml:1633(para)
19166
"By default <application>ClamAV</application> will send log messages to "
19167
"<filename>/var/log/clamav/clamav.log</filename>."
19170
#: serverguide/C/mail.xml:1639(para)
19172
"After changing an applications log settings remember to restart the service "
19173
"for the new settings to take affect. Also, once the issue you are "
19174
"troubleshooting is resolved it is a good idea to change the log settings "
19178
#: serverguide/C/mail.xml:1647(para)
19179
msgid "For more information on filtering mail see the following links:"
19182
#: serverguide/C/mail.xml:1653(ulink)
19183
msgid "Amavisd-new Documentation"
19186
#: serverguide/C/mail.xml:1657(para)
19188
"<ulink url=\"http://www.clamav.org/doc/latest/html/\">ClamAV "
19189
"Documentation</ulink> and <ulink "
19190
"url=\"http://wiki.clamav.net/Main/WebHome\">ClamAV Wiki</ulink>"
19193
#: serverguide/C/mail.xml:1664(ulink)
19194
msgid "Spamassassin Wiki"
19197
#: serverguide/C/mail.xml:1669(ulink)
19198
msgid "Pyzor Homepage"
19201
#: serverguide/C/mail.xml:1674(ulink)
19202
msgid "Razor Homepage"
19205
#: serverguide/C/mail.xml:1679(ulink)
19209
#: serverguide/C/mail.xml:1684(ulink)
19210
msgid "Postfix Amavis New"
19213
#: serverguide/C/mail.xml:1688(para)
19215
"Also, feel free to ask questions in the <emphasis>#ubuntu-server</emphasis> "
19216
"IRC channel on <ulink url=\"http://freenode.net\">freenode</ulink>."
19219
#: serverguide/C/lamp-applications.xml:13(title)
19220
msgid "LAMP Applications"
19223
#: serverguide/C/lamp-applications.xml:19(para)
19225
"LAMP installations (Linux + Apache + MySQL + PHP) are a popular setup for "
19226
"Ubuntu servers. There is a plethora of Open Source applications written "
19227
"using the LAMP application stack. Some popular LAMP applications are Wiki's, "
19228
"Content Management Systems, and Management Software such as phpMyAdmin."
19231
#: serverguide/C/lamp-applications.xml:26(para)
19233
"One advantage of LAMP is the substantial flexibility for different database, "
19234
"web server, and scripting languages. Popular substitutes for MySQL include "
19235
"Posgresql and SQLite. Python, Perl, and Ruby are also frequently used "
19239
#: serverguide/C/lamp-applications.xml:32(para)
19241
"The traditional way to install most <emphasis>LAMP</emphasis> applications "
19245
#: serverguide/C/lamp-applications.xml:38(para)
19246
msgid "Download an archive containing the application source files."
19249
#: serverguide/C/lamp-applications.xml:43(para)
19251
"Unpack the archive, usually in a directory accessible to a web server."
19254
#: serverguide/C/lamp-applications.xml:48(para)
19256
"Depending on where the source was extracted, configure a web browser to "
19260
#: serverguide/C/lamp-applications.xml:53(para)
19261
msgid "Configure the application to connect to the database."
19264
#: serverguide/C/lamp-applications.xml:58(para)
19266
"Run a script, or browse to a page of the application, to install the "
19267
"database needed by the application."
19270
#: serverguide/C/lamp-applications.xml:63(para)
19272
"Once the steps above, or similar steps, are completed you are ready to begin "
19273
"using the application."
19276
#: serverguide/C/lamp-applications.xml:69(para)
19278
"A disadvantage of using this approach is that the application files are not "
19279
"placed in the file system in a standard way, which can cause confusion as to "
19280
"where the application is installed. Another larger disadvantage is updating "
19281
"the application. When a new version is released, the same process used to "
19282
"install the application is needed to apply updates."
19285
#: serverguide/C/lamp-applications.xml:76(para)
19287
"Fortunately, a number of <emphasis>LAMP</emphasis> applications are already "
19288
"packaged for Ubuntu, and are available for installation in the same way as "
19289
"non-LAMP applications. Depending on the application some extra configuration "
19290
"and setup steps may be needed, however."
19293
#: serverguide/C/lamp-applications.xml:82(para)
19295
"This section covers howto install and configure the Wiki applications "
19296
"<application>MoinMoin</application>, <application>MediaWiki</application>, "
19297
"and the MySQL management application <application>phpMyAdmin</application>."
19300
#: serverguide/C/lamp-applications.xml:88(para)
19302
"A Wiki is a website that allows the visitors to easily add, remove and "
19303
"modify available content easily. The ease of interaction and operation makes "
19304
"Wiki an effective tool for mass collaborative authoring. The term Wiki is "
19305
"also referred to the collaborative software."
19308
#: serverguide/C/lamp-applications.xml:100(title)
19312
#: serverguide/C/lamp-applications.xml:102(para)
19314
"MoinMoin is a Wiki engine implemented in Python, based on the PikiPiki Wiki "
19315
"engine, and licensed under the GNU GPL."
19318
#: serverguide/C/lamp-applications.xml:110(para)
19320
"To install <application>MoinMoin</application>, run the following command in "
19321
"the command prompt:"
19324
#: serverguide/C/lamp-applications.xml:116(command)
19325
msgid "sudo apt-get install python-moinmoin"
19328
#: serverguide/C/lamp-applications.xml:119(para)
19330
"You should also install <application>apache2</application> web server. For "
19331
"installing <application>apache2</application> web server, please refer to "
19332
"<xref linkend=\"http-installation\"/> sub-section in <xref "
19333
"linkend=\"httpd\"/> section."
19336
#: serverguide/C/lamp-applications.xml:130(para)
19338
"For configuring your first Wiki application, please run the following set of "
19339
"commands. Let us assume that you are creating a Wiki named "
19340
"<emphasis>mywiki</emphasis>:"
19343
#: serverguide/C/lamp-applications.xml:137(command)
19344
msgid "cd /usr/share/moin"
19347
#: serverguide/C/lamp-applications.xml:138(command)
19348
msgid "sudo mkdir mywiki"
19351
#: serverguide/C/lamp-applications.xml:139(command)
19352
msgid "sudo cp -R data mywiki"
19355
#: serverguide/C/lamp-applications.xml:140(command)
19356
msgid "sudo cp -R underlay mywiki"
19359
#: serverguide/C/lamp-applications.xml:141(command)
19360
msgid "sudo cp server/moin.cgi mywiki"
19363
#: serverguide/C/lamp-applications.xml:142(command)
19364
msgid "sudo chown -R www-data.www-data mywiki"
19367
#: serverguide/C/lamp-applications.xml:143(command)
19368
msgid "sudo chmod -R ug+rwX mywiki"
19371
#: serverguide/C/lamp-applications.xml:144(command)
19372
msgid "sudo chmod -R o-rwx mywiki"
19375
#: serverguide/C/lamp-applications.xml:147(para)
19377
"Now you should configure <application>MoinMoin</application> to find your "
19378
"new Wiki <emphasis>mywiki</emphasis>. To configure "
19379
"<application>MoinMoin</application>, open "
19380
"<filename>/etc/moin/mywiki.py</filename> file and change the following line:"
19383
#: serverguide/C/lamp-applications.xml:155(programlisting)
19385
msgid "data_dir = '/org/mywiki/data'"
19388
#: serverguide/C/lamp-applications.xml:157(para)
19392
#: serverguide/C/lamp-applications.xml:161(programlisting)
19394
msgid "data_dir = '/usr/share/moin/mywiki/data'"
19397
#: serverguide/C/lamp-applications.xml:163(para)
19399
"Also, below the <emphasis>data_dir</emphasis> option add the "
19400
"<emphasis>data_underlay_dir</emphasis>:"
19403
#: serverguide/C/lamp-applications.xml:167(programlisting)
19407
"data_underlay_dir='/usr/share/moin/mywiki/underlay'\n"
19410
#: serverguide/C/lamp-applications.xml:172(para)
19412
"If the <filename>/etc/moin/mywiki.py</filename> file does not exists, you "
19413
"should copy <filename>/etc/moin/moinmaster.py</filename> file to "
19414
"<filename>/etc/moin/mywiki.py</filename> file and do the above mentioned "
19418
#: serverguide/C/lamp-applications.xml:181(para)
19420
"If you have named your Wiki as <emphasis>my_wiki_name</emphasis> you should "
19421
"insert a line <quote>(\"my_wiki_name\", r\".*\")</quote> in "
19422
"<filename>/etc/moin/farmconfig.py</filename> file after the line "
19423
"<quote>(\"mywiki\", r\".*\")</quote>."
19426
#: serverguide/C/lamp-applications.xml:189(para)
19428
"Once you have configured <application>MoinMoin</application> to find your "
19429
"first Wiki application <emphasis>mywiki</emphasis>, you should configure "
19430
"<application>apache2</application> and make it ready for your Wiki "
19434
#: serverguide/C/lamp-applications.xml:196(para)
19436
"You should add the following lines in <filename>/etc/apache2/sites-"
19437
"available/default</filename> file inside the <quote><VirtualHost "
19438
"*></quote> tag:"
19441
#: serverguide/C/lamp-applications.xml:202(programlisting)
19446
" ScriptAlias /mywiki \"/usr/share/moin/mywiki/moin.cgi\"\n"
19447
" alias /moin_static184 \"/usr/share/moin/htdocs\"\n"
19448
" <Directory /usr/share/moin/htdocs>\n"
19449
" Order allow,deny\n"
19450
" allow from all\n"
19451
" </Directory>\n"
19455
#: serverguide/C/lamp-applications.xml:214(para)
19457
"Adjust the <emphasis>\"moin_static184\"</emphasis> in the "
19458
"<emphasis>alias</emphasis> line above, to the "
19459
"<application>moinmoin</application> version installed."
19462
#: serverguide/C/lamp-applications.xml:220(para)
19464
"Once you configure the <application>apache2</application> web server and "
19465
"make it ready for your Wiki application, you should restart it. You can run "
19466
"the following command to restart the <application>apache2</application> web "
19470
#: serverguide/C/lamp-applications.xml:233(title)
19471
msgid "Verification"
19474
#: serverguide/C/lamp-applications.xml:235(para)
19476
"You can verify the Wiki application and see if it works by pointing your web "
19477
"browser to the following URL:"
19480
#: serverguide/C/lamp-applications.xml:239(programlisting)
19484
"http://localhost/mywiki\n"
19487
#: serverguide/C/lamp-applications.xml:243(para)
19489
"You can also run the test command by pointing your web browser to the "
19493
#: serverguide/C/lamp-applications.xml:248(programlisting)
19497
"http://localhost/mywiki?action=test\n"
19500
#: serverguide/C/lamp-applications.xml:252(para)
19502
"For more details, please refer to the <ulink "
19503
"url=\"http://moinmo.in/\">MoinMoin</ulink> web site."
19506
#: serverguide/C/lamp-applications.xml:263(para)
19508
"For more information see the <ulink url=\"http://moinmo.in/\">moinmoin "
19512
#: serverguide/C/lamp-applications.xml:268(para)
19514
"Also, see the <ulink "
19515
"url=\"https://help.ubuntu.com/community/MoinMoin\">Ubuntu Wiki "
19516
"MoinMoin</ulink> page."
19519
#: serverguide/C/lamp-applications.xml:277(title)
19523
#: serverguide/C/lamp-applications.xml:279(para)
19525
"MediaWiki is an web based Wiki software written in the PHP language. It can "
19526
"either use <application>MySQL</application> or "
19527
"<application>PostgreSQL</application> Database Management System."
19530
#: serverguide/C/lamp-applications.xml:289(para)
19532
"Before installing <application>MediaWiki</application> you should also "
19533
"install <application>Apache2</application>, the "
19534
"<application>PHP5</application> scripting language and Database a Management "
19535
"System. <application>MySQL</application> or "
19536
"<application>PostgreSQL</application> are the most common, choose one "
19537
"depending on your need. Please refer to those sections in this manual for "
19538
"installation instructions."
19541
#: serverguide/C/lamp-applications.xml:297(para)
19543
"To install <application>MediaWiki</application>, run the following command "
19544
"in the command prompt:"
19547
#: serverguide/C/lamp-applications.xml:303(command)
19548
msgid "sudo apt-get install mediawiki php5-gd"
19551
#: serverguide/C/lamp-applications.xml:306(para)
19553
"For additional <application>MediaWiki</application> functionality see the "
19554
"<application>mediawiki-extensions</application> package."
19557
#: serverguide/C/lamp-applications.xml:316(para)
19559
"The Apache configuration file <filename>mediawiki.conf</filename> for "
19560
"MediaWiki is installed in <filename>/etc/apache2/conf.d/</filename> "
19561
"directory. You should uncomment the following line in this file to access "
19562
"MediaWiki application."
19565
#: serverguide/C/lamp-applications.xml:324(screen)
19569
"# Alias /mediawiki /var/lib/mediawiki\n"
19572
#: serverguide/C/lamp-applications.xml:328(para)
19574
"After you uncomment the above line, restart Apache server and access "
19575
"MediaWiki using the following url:"
19578
#: serverguide/C/lamp-applications.xml:333(programlisting)
19582
"http://localhost/mediawiki/config/index.php\n"
19585
#: serverguide/C/lamp-applications.xml:338(para)
19587
"Please read the <quote>Checking environment...</quote> section in this page. "
19588
"You should be able to fix many issues by carefully reading this section."
19591
#: serverguide/C/lamp-applications.xml:345(para)
19593
"Once the configuration is complete, you should copy the "
19594
"<filename>LocalSettings.php</filename> file to "
19595
"<filename>/etc/mediawiki</filename> directory:"
19598
#: serverguide/C/lamp-applications.xml:352(command)
19599
msgid "sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/"
19602
#: serverguide/C/lamp-applications.xml:355(para)
19604
"You may also want to edit "
19605
"<filename>/etc/mediawiki/LocalSettings.php</filename> adjusting:"
19608
#: serverguide/C/lamp-applications.xml:360(programlisting)
19612
"ini_set( 'memory_limit', '64M' );\n"
19615
#: serverguide/C/lamp-applications.xml:367(title)
19619
#: serverguide/C/lamp-applications.xml:368(para)
19621
"The extensions add new features and enhancements for the MediaWiki "
19622
"application. The extensions give wiki administrators and end users the "
19623
"ability to customize MediaWiki to their requirements."
19626
#: serverguide/C/lamp-applications.xml:374(para)
19628
"You can download MediaWiki extensions as an archive file or checkout from "
19629
"the Subversion repository. You should copy it to "
19630
"<filename>/var/lib/mediawiki/extensions</filename> directory. You should "
19631
"also add the following line at the end of file: "
19632
"<filename>/etc/mediawiki/LocalSettings.php</filename>."
19635
#: serverguide/C/lamp-applications.xml:382(programlisting)
19639
"require_once \"$IP/extensions/ExtentionName/ExtentionName.php\";\n"
19642
#: serverguide/C/lamp-applications.xml:392(para)
19644
"For more details, please refer to the <ulink "
19645
"url=\"http://www.mediawiki.org\">MediaWiki</ulink> web site."
19648
#: serverguide/C/lamp-applications.xml:398(para)
19650
"The <ulink url=\"http://www.packtpub.com/Mediawiki/book\">MediaWiki "
19651
"Administrators’ Tutorial Guide</ulink> contains a wealth of information for "
19652
"new MediaWiki administrators."
19655
#: serverguide/C/lamp-applications.xml:404(para)
19657
"Also, the <ulink url=\"https://help.ubuntu.com/community/MediaWiki\">Ubuntu "
19658
"Wiki MediaWiki</ulink> page is a good resource."
19661
#: serverguide/C/lamp-applications.xml:414(title)
19665
#: serverguide/C/lamp-applications.xml:416(para)
19667
"<application>phpMyAdmin</application> is a LAMP application specifically "
19668
"written for administering <application>MySQL</application> servers. Written "
19669
"in <application>PHP</application>, and accessed through a web browser, "
19670
"phpMyAdmin provides a graphical interface for database administration tasks."
19673
#: serverguide/C/lamp-applications.xml:425(para)
19675
"Before installing <application>phpMyAdmin</application> you will need access "
19676
"to a <application>MySQL</application> database either on the same host as "
19677
"that phpMyAdmin is installed on, or on a host accessible over the network. "
19678
"For more information see <xref linkend=\"mysql\"/>. From a terminal prompt "
19682
#: serverguide/C/lamp-applications.xml:432(command)
19683
msgid "sudo apt-get install phpmyadmin"
19686
#: serverguide/C/lamp-applications.xml:435(para)
19688
"At the prompt choose which web server to be configured for "
19689
"<application>phpMyAdmin</application>. The rest of this section will use "
19690
"<application>Apache2</application> for the web server."
19693
#: serverguide/C/lamp-applications.xml:440(para)
19695
"In a browser go to <emphasis>http://servername/phpmyadmin</emphasis>, "
19696
"replacing <emphasis role=\"italic\">serveranme</emphasis> with the server's "
19697
"actual hostname. At the login, page enter <emphasis>root</emphasis> for the "
19698
"<emphasis>username</emphasis>, or another <application>MySQL</application> "
19699
"user if you any setup, and enter the <application>MySQL</application> user's "
19703
#: serverguide/C/lamp-applications.xml:447(para)
19705
"Once logged in you can reset the <emphasis>root</emphasis> password if "
19706
"needed, create users, create/destroy databases and tables, etc."
19709
#: serverguide/C/lamp-applications.xml:455(para)
19711
"The configuration files for <application>phpMyAdmin</application> are "
19712
"located in <filename>/etc/phpmyadmin</filename>. The main configuration file "
19713
"is <filename>/etc/phpmyadmin/config.inc.php</filename>. This file contains "
19714
"configuration options that apply globally to "
19715
"<application>phpMyAdmin</application>."
19718
#: serverguide/C/lamp-applications.xml:461(para)
19720
"To use <application>phpMyAdmin</application> to administer a MySQL database "
19721
"hosted on another server, adjust the following in "
19722
"<filename>/etc/phpmyadmin/config.inc.php</filename>:"
19725
#: serverguide/C/lamp-applications.xml:466(programlisting)
19729
"$cfg['Servers'][$i]['host'] = 'db_server';\n"
19732
#: serverguide/C/lamp-applications.xml:471(para)
19734
"Replace <emphasis role=\"italic\">db_server</emphasis> with the actual "
19735
"remote database server name or IP address. Also, be sure that the "
19736
"<application>phpMyAdmin</application> host has permissions to access the "
19740
#: serverguide/C/lamp-applications.xml:477(para)
19742
"Once configured, log out of <application>phpMyAdmin</application> and back "
19743
"in, and you should be accessing the new server."
19746
#: serverguide/C/lamp-applications.xml:481(para)
19748
"The <filename>config.header.inc.php</filename> and "
19749
"<filename>config.footer.inc.php</filename> files are used to add a HTML "
19750
"header and footer to <application>phpMyAdmin</application>."
19753
#: serverguide/C/lamp-applications.xml:486(para)
19755
"Another important configuration file is "
19756
"<filename>/etc/phpmyadmin/apache.conf</filename>, this file is symlinked to "
19757
"<filename>/etc/apache2/conf.d/phpmyadmin.conf</filename>, and is used to "
19758
"configure <application>Apache2</application> to serve the "
19759
"<application>phpMyAdmin</application> site. The file contains directives for "
19760
"loading <application>PHP</application>, directory permissions, etc. For more "
19761
"information on configuring <application>Apache2</application> see <xref "
19762
"linkend=\"httpd\"/>."
19765
#: serverguide/C/lamp-applications.xml:500(para)
19767
"The <application>phpMyAdmin</application> documentation comes installed with "
19768
"the package and can be accessed from the <emphasis>phpMyAdmin "
19769
"Documentation</emphasis> link (a question mark with a box around it) under "
19770
"the phpMyAdmin logo. The official docs can also be access on the <ulink "
19771
"url=\"http://www.phpmyadmin.net/home_page/docs.php\">phpMyAdmin</ulink> site."
19774
#: serverguide/C/lamp-applications.xml:507(para)
19776
"Also, <ulink url=\"http://www.packtpub.com/phpmyadmin-3rd-"
19777
"edition/book\">Mastering phpMyAdmin</ulink> is a great resource."
19780
#: serverguide/C/lamp-applications.xml:512(para)
19782
"A third resource is the <ulink "
19783
"url=\"https://help.ubuntu.com/community/phpMyAdmin\">phpMyAdmin Ubuntu "
19784
"Wiki</ulink> page."
19787
#: serverguide/C/introduction.xml:14(para)
19788
msgid "Welcome to the <emphasis>Ubuntu Server Guide</emphasis>!"
19791
#: serverguide/C/introduction.xml:15(para)
19793
"Here you can find information on how to install and configure various server "
19794
"applications. It is a step-by-step, task-oriented guide for configuring and "
19795
"customizing your system."
19798
#: serverguide/C/introduction.xml:19(para)
19800
"This guide assumes you have a basic understanding of your Ubuntu system. "
19801
"Some installation details are covered in <xref linkend=\"installation\"/>, "
19802
"but if you need detailed instructions installing Ubuntu please refer to the "
19803
"<ulink url=\"https://help.ubuntu.com/10.04 LTS/installation-guide/\">Ubuntu "
19804
"Installation Guide</ulink>."
19807
#: serverguide/C/introduction.xml:25(para)
19809
"A HTML version of the manual is available online at <ulink "
19810
"url=\"http://help.ubuntu.com\">the Ubuntu Documentation website</ulink>. The "
19811
"HTML files are also available in the <application>ubuntu-"
19812
"serverguide</application> package. See <xref linkend=\"package-"
19813
"management\"/> for details on installing packages."
19816
#: serverguide/C/introduction.xml:32(para)
19818
"If you choose to install the <application>ubuntu-serverguide</application> "
19819
"you can view this document from a console by:"
19822
#: serverguide/C/introduction.xml:36(command)
19823
msgid "w3m /usr/share/ubuntu-serverguide/html/C/index.html"
19826
#: serverguide/C/introduction.xml:39(para)
19828
"If you are using a localized version of Ubuntu, replace "
19829
"<emphasis>C</emphasis> with your language localization (e.g. "
19830
"<emphasis>en_GB</emphasis>)."
19833
#: serverguide/C/introduction.xml:53(title)
19837
#: serverguide/C/introduction.xml:55(para)
19839
"There are a couple of different ways that Ubuntu Server Edition is "
19840
"supported, commercial support and community support. The main commercial "
19841
"support (and development funding) is available from Canonical Ltd. They "
19842
"supply reasonably priced support contracts on a per desktop or per server "
19843
"basis. For more information see the <ulink "
19844
"url=\"http://www.canonical.com/services/support\">Canonical Services</ulink> "
19848
#: serverguide/C/introduction.xml:62(para)
19850
"Community support is also provided by dedicated individuals, and companies, "
19851
"that wish to make Ubuntu the best distribution possible. Support is provided "
19852
"through multiple mailing lists, IRC channels, forums, blogs, wikis, etc. The "
19853
"large amount of information available can be overwhelming, but a good search "
19854
"engine query can usually provide an answer to your questions. See the <ulink "
19855
"url=\"http://www.ubuntu.com/support\">Ubuntu Support</ulink> page for more "
19859
#: serverguide/C/installation.xml:14(para)
19861
"This chapter provides a quick overview of installing Ubuntu 10.04 LTS Server "
19862
"Edition. For more detailed instructions, please refer to the <ulink "
19863
"url=\"https://help.ubuntu.com/10.04 LTS/installation-guide/\">Ubuntu "
19864
"Installation Guide</ulink>."
19867
#: serverguide/C/installation.xml:19(title)
19868
msgid "Preparing to Install"
19871
#: serverguide/C/installation.xml:20(para)
19873
"This section explains various aspects to consider before starting the "
19877
#: serverguide/C/installation.xml:24(title)
19878
msgid "System Requirements"
19881
#: serverguide/C/installation.xml:25(para)
19883
"Ubuntu 10.04 LTS Server Edition supports two (2) major architectures: Intel "
19884
"x86 and AMD64. The table below lists recommended hardware specifications. "
19885
"Depending on your needs, you might manage with less than this. However, most "
19886
"users risk being frustrated if they ignore these suggestions."
19889
#: serverguide/C/installation.xml:27(title)
19890
msgid "Recommended Minimum Requirements"
19893
#: serverguide/C/installation.xml:35(para)
19894
msgid "Install Type"
19897
#: serverguide/C/installation.xml:36(para)
19901
#: serverguide/C/installation.xml:37(para)
19902
msgid "Hard Drive Space"
19905
#: serverguide/C/installation.xml:40(para)
19906
msgid "Base System"
19909
#: serverguide/C/installation.xml:41(para)
19910
msgid "All Tasks Installed"
19913
#: serverguide/C/installation.xml:46(para)
19917
#: serverguide/C/installation.xml:47(para)
19918
msgid "128 megabytes"
19921
#: serverguide/C/installation.xml:48(para)
19922
msgid "500 megabytes"
19925
#: serverguide/C/installation.xml:49(para)
19929
#: serverguide/C/installation.xml:54(para)
19931
"The Server Edition provides a common base for all sorts of server "
19932
"applications. It is a minimalist design providing a platform for the desired "
19933
"services, such as file/print services, web hosting, email hosting, etc."
19936
#: serverguide/C/installation.xml:60(para)
19938
"The requirements for UEC are slightly different for Front End requirements "
19939
"see <xref linkend=\"uec-frontend-requirements\"/> and for UEC Node "
19940
"requirements see <xref linkend=\"uec-node-requirements\"/>."
19943
#: serverguide/C/installation.xml:68(title)
19944
msgid "Server and Desktop Differences"
19947
#: serverguide/C/installation.xml:69(para)
19949
"There are a few differences between the <emphasis>Ubuntu Server "
19950
"Edition</emphasis> and the <emphasis>Ubuntu Desktop Edition</emphasis>. It "
19951
"should be noted that both editions use the same "
19952
"<application>apt</application> repositories. Making it just as easy to "
19953
"install a <emphasis role=\"italic\">server</emphasis> application on the "
19954
"Desktop Edition as it is on the Server Edition."
19957
#: serverguide/C/installation.xml:75(para)
19959
"The differences between the two editions are the lack of an X window "
19960
"environment in the Server Edition, the installation process, and different "
19964
#: serverguide/C/installation.xml:82(title)
19965
msgid "Kernel Differences:"
19968
#: serverguide/C/installation.xml:85(para)
19970
"The Server Edition uses the <emphasis>Deadline</emphasis> I/O scheduler "
19971
"instead of the <emphasis>CFQ</emphasis> scheduler used by the Desktop "
19975
#: serverguide/C/installation.xml:91(para)
19976
msgid "<emphasis>Preemption</emphasis> is turned off in the Server Edition."
19979
#: serverguide/C/installation.xml:96(para)
19981
"The timer interrupt is 100 Hz in the Server Edition and 250 Hz in the "
19985
#: serverguide/C/installation.xml:102(para)
19987
"When running a 64-bit version of Ubuntu on 64-bit processors you are not "
19988
"limited by memory addressing space."
19991
#: serverguide/C/installation.xml:107(para)
19993
"To see all kernel configuration options you can look through "
19994
"<filename>/boot/config-2.6.31-server</filename>. Also, <ulink "
19995
"url=\"http://www.kroah.com/lkn/\">Linux Kernel in a Nutshell</ulink> is a "
19996
"great resource on the options available."
19999
#: serverguide/C/installation.xml:116(title)
20003
#: serverguide/C/installation.xml:119(para)
20005
"Before installing <application>Ubuntu Server Edition</application> you "
20006
"should make sure all data on the system is backed up. See <xref "
20007
"linkend=\"backups\"/> for backup options."
20010
#: serverguide/C/installation.xml:123(para)
20012
"If this is not the first time an operating system has been installed on your "
20013
"computer, it is likely you will need to re-partition your disk to make room "
20017
#: serverguide/C/installation.xml:127(para)
20019
"Any time you partition your disk, you should be prepared to lose everything "
20020
"on the disk should you make a mistake or something goes wrong during "
20021
"partitioning. The programs used in installation are quite reliable, most "
20022
"have seen years of use, but they also perform destructive actions."
20025
#: serverguide/C/installation.xml:139(title)
20026
msgid "Installing from CD"
20029
#: serverguide/C/installation.xml:140(para)
20031
"The basic steps to install Ubuntu Server Edition from CD are the same for "
20032
"installing any operating system from CD. Unlike the <emphasis>Desktop "
20033
"Edition</emphasis> the <emphasis>Server Edition</emphasis> does not include "
20034
"a graphical installation program. Instead the Server Edition uses a console "
20035
"menu based process."
20038
#: serverguide/C/installation.xml:147(para)
20040
"First, download and burn the appropriate ISO file from the <ulink "
20041
"url=\"http://www.ubuntu.com/getubuntu/download\"> Ubuntu web site</ulink>."
20044
#: serverguide/C/installation.xml:153(para)
20045
msgid "Boot the system from the CD-ROM drive."
20048
#: serverguide/C/installation.xml:158(para)
20050
"At the boot prompt you will be asked to select the language. Afterwards the "
20051
"installation process begins by asking for your keyboard layout."
20054
#: serverguide/C/installation.xml:164(para)
20056
"From the main boot menu there are some additional options to install Ubuntu "
20057
"Server Edition. You can install a basic Ubuntu Server, or install Ubuntu "
20058
"Server as part of a <emphasis>Ubuntu Enterprise Cloud</emphasis>. For more "
20059
"information on UEC see <xref linkend=\"uec\"/>. The rest of this section "
20060
"will cover the basic Ubuntu Server install."
20063
#: serverguide/C/installation.xml:172(para)
20065
"The installer then discovers your hardware configuration, and configures the "
20066
"network settings using DHCP. If you do not wish to use DHCP at the next "
20067
"screen choose \"Go Back\", and you have the option to \"Configure the "
20068
"network manually\"."
20071
#: serverguide/C/installation.xml:179(para)
20072
msgid "Next, the installer asks for the system's hostname and Time Zone."
20075
#: serverguide/C/installation.xml:184(para)
20077
"You can then choose from several options to configure the hard drive layout. "
20078
"For advanced disk options see <xref linkend=\"advanced-installation\"/>."
20081
#: serverguide/C/installation.xml:190(para)
20082
msgid "The Ubuntu base system is then installed."
20085
#: serverguide/C/installation.xml:195(para)
20087
"A new user is setup, this user will have <emphasis>root</emphasis> access "
20088
"through the <application>sudo</application> utility."
20091
#: serverguide/C/installation.xml:201(para)
20093
"After the user is setup, you will be asked to encrypt your <filename "
20094
"role=\"directory\">home</filename> directory."
20097
#: serverguide/C/installation.xml:207(para)
20099
"The next step in the installation process is to decide how you want to "
20100
"update the system. There are three options:"
20103
#: serverguide/C/installation.xml:213(para)
20105
"<emphasis>No automatic updates</emphasis>: this requires an administrator to "
20106
"log into the machine and manually install updates."
20109
#: serverguide/C/installation.xml:219(para)
20111
"<emphasis>Install security updates Automatically</emphasis>: will install "
20112
"the <application>unattended-upgrades</application> package, which will "
20113
"install security updates without the intervention of an administrator. For "
20114
"more details see <xref linkend=\"automatic-updates\"/>."
20117
#: serverguide/C/installation.xml:226(para)
20119
"<emphasis>Manage the system with Landscape</emphasis>: Landscape is a paid "
20120
"service provided by Canonical to help manage your Ubuntu machines. See the "
20121
"<ulink url=\"http://www.canonical.com/projects/landscape\">Landscape</ulink> "
20122
"site for details."
20125
#: serverguide/C/installation.xml:235(para)
20127
"You now have the option to install, or not install, several package tasks. "
20128
"See <xref linkend=\"install-tasks\"/> for details. Also, there is an option "
20129
"to launch <application>aptitude</application> to choose specific packages to "
20130
"install. For more information see <xref linkend=\"aptitude\"/>."
20133
#: serverguide/C/installation.xml:243(para)
20134
msgid "Finally, the last step before rebooting is to set the clock to UTC."
20137
#: serverguide/C/installation.xml:249(para)
20139
"If at any point during installation you are not satisfied by the default "
20140
"setting, use the \"Go Back\" function at any prompt to be brought to a "
20141
"detailed installation menu that will allow you to modify the default "
20145
#: serverguide/C/installation.xml:254(para)
20147
"At some point during the installation process you may want to read the help "
20148
"screen provided by the installation system. To do this, press F1."
20151
#: serverguide/C/installation.xml:259(para)
20153
"Once again, for detailed instructions see the <ulink "
20154
"url=\"https://help.ubuntu.com/10.04 LTS/installation-guide/\"> Ubuntu "
20155
"Installation Guide</ulink>."
20158
#: serverguide/C/installation.xml:265(title)
20159
msgid "Package Tasks"
20162
#: serverguide/C/installation.xml:266(para)
20164
"During the Server Edition installation you have the option of installing "
20165
"additional packages from the CD. The packages are grouped by the type of "
20166
"service they provide."
20169
#: serverguide/C/installation.xml:272(para)
20170
msgid "Cloud computing: Walrus storage service"
20173
#: serverguide/C/installation.xml:277(para)
20174
msgid "Cloud computing: all-in-one cluster"
20177
#: serverguide/C/installation.xml:282(para)
20178
msgid "Cloud computing: Cluster controller"
20181
#: serverguide/C/installation.xml:287(para)
20182
msgid "Cloud computing: Node controller"
20185
#: serverguide/C/installation.xml:292(para)
20186
msgid "Cloud computing: Storage controller"
20189
#: serverguide/C/installation.xml:297(para)
20190
msgid "Cloud computing: top-level cloud controller"
20193
#: serverguide/C/installation.xml:302(para)
20194
msgid "DNS server: Selects the BIND DNS server and its documentation."
20197
#: serverguide/C/installation.xml:307(para)
20198
msgid "LAMP server: Selects a ready-made Linux/Apache/MySQL/PHP server."
20201
#: serverguide/C/installation.xml:312(para)
20203
"Mail server: This task selects a variety of package useful for a general "
20204
"purpose mail server system."
20207
#: serverguide/C/installation.xml:317(para)
20208
msgid "OpenSSH server: Selects packages needed for an OpenSSH server."
20211
#: serverguide/C/installation.xml:322(para)
20213
"PostgreSQL database: This task selects client and server packages for the "
20214
"PostgreSQL database."
20217
#: serverguide/C/installation.xml:327(para)
20218
msgid "Print server: This task sets up your system to be a print server."
20221
#: serverguide/C/installation.xml:332(para)
20223
"Samba File server: This task sets up your system to be a Samba file server, "
20224
"which is especially suitable in networks with both Windows and Linux systems."
20227
#: serverguide/C/installation.xml:338(para)
20229
"Tomcat server: Installs the Apache Tomcat and needed dependencies Java, gcj, "
20233
#: serverguide/C/installation.xml:343(para)
20235
"Virtual machine host: Includes packages needed to run KVM virtual machines."
20238
#: serverguide/C/installation.xml:348(para)
20240
"Manually select packages: Executes <application>apptitude</application> "
20241
"allowing you to individually select packages."
20244
#: serverguide/C/installation.xml:353(para)
20246
"Installing the package groups is accomplished using the "
20247
"<application>tasksel</application> utility. One of the important difference "
20248
"between Ubuntu (or Debian) and other GNU/Linux distribution is that, when "
20249
"installed, a package is also configured to reasonable defaults, eventually "
20250
"prompting you for additional required information. Likewise, when installing "
20251
"a task, the packages are not only installed, but also configured to provided "
20252
"a fully integrated service."
20255
#: serverguide/C/installation.xml:360(para)
20257
"For more information on the <emphasis>Cloud Computing</emphasis> tasks see "
20258
"<xref linkend=\"uec\"/>."
20261
#: serverguide/C/installation.xml:363(para)
20263
"Once the installation process has finished you can view a list of available "
20264
"tasks by entering the following from a terminal prompt:"
20267
#: serverguide/C/installation.xml:368(command)
20268
msgid "tasksel --list-tasks"
20271
#: serverguide/C/installation.xml:371(para)
20273
"The output will list tasks from other Ubuntu based distributions such as "
20274
"Kubuntu and Edubuntu. Note that you can also invoke the "
20275
"<command>tasksel</command> command by itself, which will bring up a menu of "
20276
"the different tasks available."
20279
#: serverguide/C/installation.xml:377(para)
20281
"You can view a list of which packages are installed with each task using the "
20282
"<emphasis>--task-packages</emphasis> option. For example, to list the "
20283
"packages installed with the <emphasis>DNS Server</emphasis> task enter the "
20287
#: serverguide/C/installation.xml:382(command)
20288
msgid "tasksel --task-packages dns-server"
20291
#: serverguide/C/installation.xml:384(para)
20292
msgid "The output of the command should list:"
20295
#: serverguide/C/installation.xml:387(programlisting)
20304
#: serverguide/C/installation.xml:392(para)
20306
"Also, if you did not install one of the tasks during the installation "
20307
"process, but for example you decide to make your new LAMP server a DNS "
20308
"server as well. Simply insert the installation CD and from a terminal:"
20311
#: serverguide/C/installation.xml:397(command)
20312
msgid "sudo tasksel install dns-server"
20315
#: serverguide/C/installation.xml:402(title)
20319
#: serverguide/C/installation.xml:403(para)
20321
"There are several ways to upgrade from one Ubuntu release to another. This "
20322
"section gives an overview of the recommended upgrade method."
20325
#: serverguide/C/installation.xml:407(title) serverguide/C/installation.xml:422(command)
20326
msgid "do-release-upgrade"
20329
#: serverguide/C/installation.xml:408(para)
20331
"The recommended way to upgrade a Server Edition installation is to use the "
20332
"<application>do-release-upgrade</application> utility. Part of the "
20333
"<emphasis>update-manager-core</emphasis> package, it does not have any "
20334
"graphical dependencies and is installed by default."
20337
#: serverguide/C/installation.xml:413(para)
20339
"Debian based systems can also be upgraded by using <command>apt-get dist-"
20340
"upgrade</command>. However, using <application>do-release-"
20341
"upgrade</application> is recommended because it has the ability to handle "
20342
"system configuration changes sometimes needed between releases."
20345
#: serverguide/C/installation.xml:418(para)
20346
msgid "To upgrade to a newer release, from a terminal prompt enter:"
20349
#: serverguide/C/installation.xml:424(para)
20351
"It is also possible to use <application>do-release-upgrade</application> to "
20352
"upgrade to a development version of Ubuntu. To accomplish this use the "
20353
"<emphasis>-d</emphasis> switch:"
20356
#: serverguide/C/installation.xml:429(command)
20357
msgid "do-release-upgrade -d"
20360
#: serverguide/C/installation.xml:432(para)
20362
"Upgrading to a development release is <emphasis>not</emphasis> recommended "
20363
"for production environments."
20366
#: serverguide/C/installation.xml:439(title)
20367
msgid "Advanced Installation"
20370
#: serverguide/C/installation.xml:442(title)
20371
msgid "Software RAID"
20374
#: serverguide/C/installation.xml:444(para)
20376
"RAID is a method of configuring multiple hard drives to act as one, reducing "
20377
"the probability of catastrophic data loss in case of drive failure. RAID is "
20378
"implemented in either software (where the operating system knows about both "
20379
"drives and actively maintains both of them) or hardware (where a special "
20380
"controller makes the OS think there's only one drive and maintains the "
20381
"drives 'invisibly')."
20384
#: serverguide/C/installation.xml:451(para)
20386
"The RAID software included with current versions of Linux (and Ubuntu) is "
20387
"based on the <application>'mdadm'</application> driver and works very well, "
20388
"better even than many so-called 'hardware' RAID controllers. This section "
20389
"will guide you through installing Ubuntu Server Edition using two RAID1 "
20390
"partitions on two physical hard drives, one for <emphasis>/</emphasis> and "
20391
"another for <emphasis>swap</emphasis>."
20394
#: serverguide/C/installation.xml:461(para) serverguide/C/installation.xml:975(para)
20396
"Follow the installation steps until you get to the <emphasis>Partition "
20397
"disks</emphasis> step, then:"
20400
#: serverguide/C/installation.xml:468(para)
20401
msgid "Select <emphasis>Manual</emphasis> as the partition method."
20404
#: serverguide/C/installation.xml:475(para)
20406
"Select the first hard drive, and agree to <emphasis>\"Create a new empty "
20407
"partition table on this device?\"</emphasis>."
20410
#: serverguide/C/installation.xml:479(para)
20412
"Repeat this step for each drive you wish to be part of the RAID array."
20415
#: serverguide/C/installation.xml:486(para)
20417
"Select the <emphasis>\"FREE SPACE\"</emphasis> on the first drive then "
20418
"select <emphasis>\"Create a new partition\"</emphasis>."
20421
#: serverguide/C/installation.xml:493(para)
20423
"Next, select the <emphasis>Size</emphasis> of the partition. This partition "
20424
"will be the <emphasis>swap</emphasis> partition, and a general rule for swap "
20425
"size is twice that of RAM. Enter the partition size, then choose "
20426
"<emphasis>Primary</emphasis>, then <emphasis>Beginning</emphasis>."
20429
#: serverguide/C/installation.xml:502(para)
20431
"Select the <emphasis>\"Use as:\"</emphasis> line at the top. By default this "
20432
"is <emphasis role=\"italic\">\"Ext4 journaling file system\"</emphasis>, "
20433
"change that to <emphasis>\"physical volume for RAID\"</emphasis> then "
20434
"<emphasis>\"Done setting up partition\"</emphasis>."
20437
#: serverguide/C/installation.xml:511(para)
20439
"For the <emphasis>/</emphasis> partition once again select <emphasis>\"Free "
20440
"Space\"</emphasis> on the first drive then <emphasis>\"Create a new "
20441
"partition\"</emphasis>."
20444
#: serverguide/C/installation.xml:519(para)
20446
"Use the rest of the free space on the drive and choose "
20447
"<emphasis>Continue</emphasis>, then <emphasis>Primary</emphasis>."
20450
#: serverguide/C/installation.xml:526(para)
20452
"As with the swap partition, select the <emphasis>\"Use as:\"</emphasis> line "
20453
"at the top, changing it to <emphasis>\"physical volume for "
20454
"RAID\"</emphasis>. Also select the <emphasis>\"Bootable flag:\"</emphasis> "
20455
"line to change the value to <emphasis>\"on\"</emphasis>. Then choose "
20456
"<emphasis>\"Done setting up partition\"</emphasis>."
20459
#: serverguide/C/installation.xml:536(para)
20460
msgid "Repeat steps three through eight for the other disk and partitions."
20463
#: serverguide/C/installation.xml:545(title)
20464
msgid "RAID Configuration"
20467
#: serverguide/C/installation.xml:547(para)
20468
msgid "With the partitions setup the arrays are ready to be configured:"
20471
#: serverguide/C/installation.xml:554(para)
20473
"Back in the main \"Partition Disks\" page, select <emphasis>\"Configure "
20474
"Software RAID\"</emphasis> at the top."
20477
#: serverguide/C/installation.xml:561(para)
20478
msgid "Select <emphasis>\"yes\"</emphasis> to write the changes to disk."
20481
#: serverguide/C/installation.xml:568(para)
20482
msgid "Choose <emphasis>\"Create MD device\"</emphasis>."
20485
#: serverguide/C/installation.xml:575(para)
20487
"For this example, select <emphasis>\"RAID1\"</emphasis>, but if you are "
20488
"using a different setup choose the appropriate type (RAID0 RAID1 RAID5)."
20491
#: serverguide/C/installation.xml:581(para)
20493
"In order to use <emphasis>RAID5</emphasis> you need at least "
20494
"<emphasis>three</emphasis> drives. Using RAID0 or RAID1 only "
20495
"<emphasis>two</emphasis> drives are required."
20498
#: serverguide/C/installation.xml:590(para)
20500
"Enter the number of active devices <emphasis>\"2\"</emphasis>, or the amount "
20501
"of hard drives you have, for the array. Then select "
20502
"<emphasis>\"Continue\"</emphasis>."
20505
#: serverguide/C/installation.xml:598(para)
20507
"Next, enter the number of spare devices <emphasis>\"0\"</emphasis> by "
20508
"default, then choose <emphasis>\"Continue\"</emphasis>."
20511
#: serverguide/C/installation.xml:605(para)
20513
"Choose which partitions to use. Generally they will be sda1, sdb1, sdc1, "
20514
"etc. The numbers will usually match and the different letters correspond to "
20515
"different hard drives."
20518
#: serverguide/C/installation.xml:610(para)
20520
"For the <emphasis>swap</emphasis> partition choose <emphasis>sda1</emphasis> "
20521
"and <emphasis>sdb1</emphasis>. Select <emphasis>\"Continue\"</emphasis> to "
20522
"go to the next step."
20525
#: serverguide/C/installation.xml:618(para)
20527
"Repeat steps <emphasis>three</emphasis> through <emphasis>seven</emphasis> "
20528
"for the <emphasis>/</emphasis> partition choosing <emphasis>sda2</emphasis> "
20529
"and <emphasis>sdb2</emphasis>."
20532
#: serverguide/C/installation.xml:626(para)
20533
msgid "Once done select <emphasis>\"Finish\"</emphasis>."
20536
#: serverguide/C/installation.xml:636(title)
20540
#: serverguide/C/installation.xml:638(para)
20542
"There should now be a list of hard drives and RAID devices. The next step is "
20543
"to format and set the mount point for the RAID devices. Treat the RAID "
20544
"device as a local hard drive, format and mount accordingly."
20547
#: serverguide/C/installation.xml:646(para)
20549
"Select <emphasis>\"#1\"</emphasis> under the <emphasis>\"RAID1 device "
20550
"#0\"</emphasis> partition."
20553
#: serverguide/C/installation.xml:653(para)
20555
"Choose <emphasis>\"Use as:\"</emphasis>. Then select <emphasis>\"swap "
20556
"area\"</emphasis>, then <emphasis>\"Done setting up partition\"</emphasis>."
20559
#: serverguide/C/installation.xml:661(para)
20561
"Next, select <emphasis>\"#1\"</emphasis> under the <emphasis>\"RAID1 device "
20562
"#1\"</emphasis> partition."
20565
#: serverguide/C/installation.xml:668(para)
20567
"Choose <emphasis>\"Use as:\"</emphasis>. Then select <emphasis>\"Ext4 "
20568
"journaling file system\"</emphasis>."
20571
#: serverguide/C/installation.xml:675(para)
20573
"Then select the <emphasis>\"Mount point\"</emphasis> and choose "
20574
"<emphasis>\"/ - the root file system\"</emphasis>. Change any of the other "
20575
"options as appropriate, then select <emphasis>\"Done setting up "
20576
"partition\"</emphasis>."
20579
#: serverguide/C/installation.xml:683(para)
20581
"Finally, select <emphasis>\"Finish partitioning and write changes to "
20582
"disk\"</emphasis>."
20585
#: serverguide/C/installation.xml:690(para)
20587
"If you choose to place the root partition on a RAID array, the installer "
20588
"will then ask if you would like to boot in a <emphasis>degraded</emphasis> "
20589
"state. See <xref linkend=\"raid-degraded\"/> for further details."
20592
#: serverguide/C/installation.xml:695(para)
20593
msgid "The installation process will then continue normally."
20596
#: serverguide/C/installation.xml:701(title)
20597
msgid "Degraded RAID"
20600
#: serverguide/C/installation.xml:703(para)
20602
"At some point in the life of the computer a disk failure event may occur. "
20603
"When this happens, using Software RAID, the operating system will place the "
20604
"array into what is known as a <emphasis>degraded</emphasis> state."
20607
#: serverguide/C/installation.xml:708(para)
20609
"If the array has become degraded, due to the chance of data corruption, by "
20610
"default Ubuntu Server Edition will boot to <emphasis>initramfs</emphasis> "
20611
"after thirty seconds. Once the initramfs has booted there is a fifteen "
20612
"second prompt giving you the option to go ahead and boot the system, or "
20613
"attempt manual recover. Booting to the initramfs prompt may or may not be "
20614
"the desired behavior, especially if the machine is in a remote location. "
20615
"Booting to a degraded array can be configured several ways:"
20618
#: serverguide/C/installation.xml:719(para)
20620
"The <application>dpkg-reconfigure</application> utility can be used to "
20621
"configure the default behavior, and during the process you will be queried "
20622
"about additional settings related to the array. Such as monitoring, email "
20623
"alerts, etc. To reconfigure <application>mdadm</application> enter the "
20627
#: serverguide/C/installation.xml:726(command)
20628
msgid "sudo dpkg-reconfigure mdadm"
20631
#: serverguide/C/installation.xml:732(para)
20633
"The <command>dpkg-reconfigure mdadm</command> process will change the "
20634
"<filename>/etc/initramfs-tools/conf.d/mdadm</filename> configuration file. "
20635
"The file has the advantage of being able to pre-configure the system's "
20636
"behavior, and can also be manually edited:"
20639
#: serverguide/C/installation.xml:738(programlisting)
20643
"BOOT_DEGRADED=true\n"
20646
#: serverguide/C/installation.xml:743(para)
20647
msgid "The configuration file can be overridden by using a Kernel argument."
20650
#: serverguide/C/installation.xml:751(para)
20652
"Using a Kernel argument will allow the system to boot to a degraded array as "
20656
#: serverguide/C/installation.xml:757(para)
20658
"When the server is booting press <keycap>Shift</keycap> to open the "
20659
"<application>Grub</application> menu."
20662
#: serverguide/C/installation.xml:762(para)
20663
msgid "Press <keycap>e</keycap> to edit your kernel command options."
20666
#: serverguide/C/installation.xml:767(para)
20667
msgid "Press the <keycap>down</keycap> arrow to highlight the kernel line."
20670
#: serverguide/C/installation.xml:772(para)
20672
"Add <emphasis>\"bootdegraded=true\"</emphasis> (without the quotes) to the "
20676
#: serverguide/C/installation.xml:777(para)
20678
"Press <keycombo><keycap>Ctrl</keycap><keycap>x</keycap></keycombo> to boot "
20682
#: serverguide/C/installation.xml:786(para)
20684
"Once the system has booted you can either repair the array see <xref "
20685
"linkend=\"raid-maintenance\"/> for details, or copy important data to "
20686
"another machine due to major hardware failure."
20689
#: serverguide/C/installation.xml:793(title)
20690
msgid "RAID Maintenance"
20693
#: serverguide/C/installation.xml:795(para)
20695
"The <application>mdadm</application> utility can be used to view the status "
20696
"of an array, add disks to an array, remove disks, etc:"
20699
#: serverguide/C/installation.xml:802(para)
20700
msgid "To view the status of an array, from a terminal prompt enter:"
20703
#: serverguide/C/installation.xml:806(command)
20704
msgid "sudo mdadm -D /dev/md0"
20707
#: serverguide/C/installation.xml:809(para)
20709
"The <emphasis>-D</emphasis> tells <application>mdadm</application> to "
20710
"display <emphasis>detailed</emphasis> information about the "
20711
"<filename>/dev/md0</filename> device. Replace <filename>/dev/md0</filename> "
20712
"with the appropriate RAID device."
20715
#: serverguide/C/installation.xml:815(para)
20716
msgid "To view the status of a disk in an array:"
20719
#: serverguide/C/installation.xml:819(command)
20720
msgid "sudo mdadm -E /dev/sda1"
20723
#: serverguide/C/installation.xml:821(para)
20725
"The output if very similar to the <command>mdadm -D</command> command, "
20726
"adjust <filename>/dev/sda1</filename> for each disk."
20729
#: serverguide/C/installation.xml:826(para)
20730
msgid "If a disk fails and needs to be removed from an array enter:"
20733
#: serverguide/C/installation.xml:830(command)
20734
msgid "sudo mdadm --remove /dev/md0 /dev/sda1"
20737
#: serverguide/C/installation.xml:832(para)
20739
"Change <filename>/dev/md0</filename> and <filename>/dev/sda1</filename> to "
20740
"the appropriate RAID device and disk."
20743
#: serverguide/C/installation.xml:837(para)
20744
msgid "Similarly, to add a new disk:"
20747
#: serverguide/C/installation.xml:841(command)
20748
msgid "sudo mdadm --add /dev/md0 /dev/sda1"
20751
#: serverguide/C/installation.xml:846(para)
20753
"Sometimes a disk can change to a <emphasis>faulty</emphasis> state even "
20754
"though there is nothing physically wrong with the drive. It is usually "
20755
"worthwhile to remove the drive from the array then re-add it. This will "
20756
"cause the drive to re-sync with the array. If the drive will not sync with "
20757
"the array, it is a good indication of hardware failure."
20760
#: serverguide/C/installation.xml:852(para)
20762
"The <filename>/proc/mdstat</filename> file also contains useful information "
20763
"about the system's RAID devices:"
20766
#: serverguide/C/installation.xml:857(command)
20767
msgid "cat /proc/mdstat"
20770
#: serverguide/C/installation.xml:858(computeroutput)
20773
"Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] "
20775
"md0 : active raid1 sda1[0] sdb1[1]\n"
20776
" 10016384 blocks [2/2] [UU]\n"
20778
"unused devices: <none>"
20781
#: serverguide/C/installation.xml:865(para)
20783
"The following command is great for watching the status of a syncing drive:"
20786
#: serverguide/C/installation.xml:870(command)
20787
msgid "watch -n1 cat /proc/mdstat"
20790
#: serverguide/C/installation.xml:873(para)
20792
"Press <emphasis>Ctrl+c</emphasis> to stop the "
20793
"<application>watch</application> command."
20796
#: serverguide/C/installation.xml:877(para)
20798
"If you do need to replace a faulty drive, after the drive has been replaced "
20799
"and synced, <application>grub</application> will need to be installed. To "
20800
"install <application>grub</application> on the new drive, enter the "
20804
#: serverguide/C/installation.xml:883(command)
20805
msgid "sudo grub-install /dev/md0"
20808
#: serverguide/C/installation.xml:886(para)
20810
"Replace <filename>/dev/md0</filename> with the appropriate array device name."
20813
#: serverguide/C/installation.xml:894(para)
20815
"The topic of RAID arrays is a complex one due to the plethora of ways RAID "
20816
"can be configured. Please see the following links for more information:"
20819
#: serverguide/C/installation.xml:901(para)
20821
"<ulink url=\"https://help.ubuntu.com/community/Installation#raid\">Ubuntu "
20822
"Wiki Articles on RAID</ulink>."
20825
#: serverguide/C/installation.xml:907(ulink)
20826
msgid "Software RAID HOWTO"
20829
#: serverguide/C/installation.xml:912(ulink)
20830
msgid "Managing RAID on Linux"
20833
#: serverguide/C/installation.xml:919(title)
20834
msgid "Logical Volume Manager (LVM)"
20837
#: serverguide/C/installation.xml:921(para)
20839
"Logical Volume Manger, or <emphasis>LVM</emphasis>, allows administrators to "
20840
"create <emphasis>logical</emphasis> volumes out of one or multiple physical "
20841
"hard disks. LVM volumes can be created on both software RAID partitions and "
20842
"standard partitions residing on a single disk. Volumes can also be extended, "
20843
"giving greater flexibility to systems as requirements change."
20846
#: serverguide/C/installation.xml:930(para)
20848
"A side effect of LVM's power and flexibility is a greater degree of "
20849
"complication. Before diving into the LVM installation process, it is best to "
20850
"get familiar with some terms."
20853
#: serverguide/C/installation.xml:937(para)
20855
"<emphasis>Volume Group (VG):</emphasis> contains one or several Logical "
20859
#: serverguide/C/installation.xml:942(para)
20861
"<emphasis>Logical Volume (LV):</emphasis> is similar to a partition in a non-"
20862
"LVM system. Multiple Physical Volumes (PV) can make up one LV, on top of "
20863
"which resides the actual EXT3, XFS, JFS, etc filesystem."
20866
#: serverguide/C/installation.xml:948(para)
20868
"<emphasis>Physical Volume (PV):</emphasis> physical hard disk or software "
20869
"RAID partition. The Volume Group can be extended by adding more PVs."
20872
#: serverguide/C/installation.xml:959(para)
20874
"As an example this section covers installing Ubuntu Server Edition with "
20875
"<filename role=\"directory\">/srv</filename> mounted on a LVM volume. During "
20876
"the initial install only one Physical Volume (PV) will be part of the Volume "
20877
"Group (VG). Another PV will be added after install to demonstrate how a VG "
20881
#: serverguide/C/installation.xml:965(para)
20883
"There are several installation options for LVM, <emphasis>\"Guided - use the "
20884
"entire disk and setup LVM\"</emphasis> which will also allow you to assign a "
20885
"portion of the available space to LVM, <emphasis>\"Guided - use entire and "
20886
"setup encrypted LVM\"</emphasis>, or <emphasis>Manually</emphasis> setup the "
20887
"partitions and configure LVM. At this time the only way to configure a "
20888
"system with both LVM and standard partitions, during installation, is to use "
20889
"the Manual approach."
20892
#: serverguide/C/installation.xml:982(para)
20894
"At the <emphasis>\"Partition Disks</emphasis> screen choose "
20895
"<emphasis>\"Manual\"</emphasis>."
20898
#: serverguide/C/installation.xml:989(para)
20900
"Select the hard disk and on the next screen choose \"yes\" to "
20901
"<emphasis>\"Create a new empty partition table on this device\"</emphasis>."
20904
#: serverguide/C/installation.xml:996(para)
20906
"Next, create standard <emphasis>/boot</emphasis>, <emphasis>swap</emphasis>, "
20907
"and <emphasis>/</emphasis> partitions with whichever filesystem you prefer."
20910
#: serverguide/C/installation.xml:1004(para)
20912
"For the LVM <emphasis>/srv</emphasis>, create a new "
20913
"<emphasis>Logical</emphasis> partition. Then change <emphasis>\"Use "
20914
"as\"</emphasis> to <emphasis>\"physical volume for LVM\"</emphasis> then "
20915
"<emphasis>\"Done setting up the partition\"</emphasis>."
20918
#: serverguide/C/installation.xml:1012(para)
20920
"Now select <emphasis>\"Configure the Logical Volume Manager\"</emphasis> at "
20921
"the top, and choose <emphasis>\"Yes\"</emphasis> to write the changes to "
20925
#: serverguide/C/installation.xml:1020(para)
20927
"For the <emphasis>\"LVM configuration action\"</emphasis> on the next "
20928
"screen, choose <emphasis>\"Create volume group\"</emphasis>. Enter a name "
20929
"for the VG such as <emphasis>vg01</emphasis>, or something more descriptive. "
20930
"After entering a name, select the partition configured for LVM, and choose "
20931
"<emphasis>\"Continue\"</emphasis>."
20934
#: serverguide/C/installation.xml:1029(para)
20936
"Back at the <emphasis>\"LVM configuration action\"</emphasis> screen, select "
20937
"<emphasis>\"Create logical volume\"</emphasis>. Select the newly created "
20938
"volume group, and enter a name for the new LV, for example "
20939
"<emphasis>srv</emphasis> since that is the intended mount point. Then choose "
20940
"a size, which may be the full partition because it can always be extended "
20941
"later. Choose <emphasis>\"Finish\"</emphasis> and you should be back at the "
20942
"main <emphasis>\"Partition Disks\"</emphasis> screen."
20945
#: serverguide/C/installation.xml:1039(para)
20947
"Now add a filesystem to the new LVM. Select the partition under "
20948
"<emphasis>\"LVM VG vg01, LV srv\"</emphasis>, or whatever name you have "
20949
"chosen, the choose <emphasis>Use as</emphasis>. Setup a file system as "
20950
"normal selecting <emphasis>/srv</emphasis> as the mount point. Once done, "
20951
"select <emphasis>\"Done setting up the partition\"</emphasis>."
20954
#: serverguide/C/installation.xml:1048(para)
20956
"Finally, select <emphasis>\"Finish partitioning and write changes to "
20957
"disk\"</emphasis>. Then confirm the changes and continue with the rest of "
20958
"the installation."
20961
#: serverguide/C/installation.xml:1056(para)
20962
msgid "There are some useful utilities to view information about LVM:"
20965
#: serverguide/C/installation.xml:1061(para)
20967
"<emphasis>vgdisplay:</emphasis> shows information about Volume Groups."
20970
#: serverguide/C/installation.xml:1062(para)
20972
"<emphasis>lvdisplay:</emphasis> has information about Logical Volumes."
20975
#: serverguide/C/installation.xml:1063(para)
20977
"<emphasis>pvdisplay:</emphasis> similarly displays information about "
20978
"Physical Volumes."
20981
#: serverguide/C/installation.xml:1068(title)
20982
msgid "Extending Volume Groups"
20985
#: serverguide/C/installation.xml:1070(para)
20987
"Continuing with <emphasis>srv</emphasis> as an LVM volume example, this "
20988
"section covers adding a second hard disk, creating a Physical Volume (PV), "
20989
"adding it to the volume group (VG), extending the logical volume <filename "
20990
"role=\"directory\">srv</filename> and finally extending the filesystem. This "
20991
"example assumes a second hard disk has been added to the system. This hard "
20992
"disk will be named <filename>/dev/sdb</filename> in our example. BEWARE: "
20993
"make sure you don't already have an existing <filename>/dev/sdb</filename> "
20994
"before issuing the commands below. You could lose some data if you issue "
20995
"those commands on a non-empty disk. In our example we will use the entire "
20996
"disk as a physical volume (you could choose to create partitions and use "
20997
"them as different physical volumes)"
21000
#: serverguide/C/installation.xml:1082(para)
21001
msgid "First, create the physical volume, in a terminal execute:"
21004
#: serverguide/C/installation.xml:1087(command)
21005
msgid "sudo pvcreate /dev/sdb"
21008
#: serverguide/C/installation.xml:1093(para)
21009
msgid "Now extend the Volume Group (VG):"
21012
#: serverguide/C/installation.xml:1098(command)
21013
msgid "sudo vgextend vg01 /dev/sdb"
21016
#: serverguide/C/installation.xml:1104(para)
21018
"Use <application>vgdisplay</application> to find out the free physical "
21019
"extents - Free PE / size (the size you can allocate). We will assume a free "
21020
"size of 511 PE (equivalent to 2GB with a PE size of 4MB) and we will use the "
21021
"whole free space available. Use your own PE and/or free space."
21024
#: serverguide/C/installation.xml:1110(para)
21026
"The Logical Volume (LV) can now be extended by different methods, we will "
21027
"only see how to use the PE to extend the LV:"
21030
#: serverguide/C/installation.xml:1115(command)
21031
msgid "sudo lvextend /dev/vg01/srv -l +511"
21034
#: serverguide/C/installation.xml:1118(para)
21036
"The <emphasis>-l</emphasis> option allows the LV to be extended using PE. "
21037
"The <emphasis>-L</emphasis> option allows the LV to be extended using Meg, "
21038
"Gig, Tera, etc bytes."
21041
#: serverguide/C/installation.xml:1126(para)
21043
"Even though you are supposed to be able to <emphasis>expand</emphasis> an "
21044
"ext3 or ext4 filesystem without unmounting it first, it may be a good "
21045
"pratice to unmount it anyway and check the filesystem, so that you don't "
21046
"mess up the day you want to reduce a logical volume (in that case unmounting "
21047
"first is compulsory)."
21050
#: serverguide/C/installation.xml:1132(para)
21052
"The following commands are for an <emphasis>EXT3</emphasis> or "
21053
"<emphasis>EXT4</emphasis> filesystem. If you are using another filesystem "
21054
"there may be other utilities available."
21057
#: serverguide/C/installation.xml:1139(command)
21058
msgid "sudo e2fsck -f /dev/vg01/srv"
21061
#: serverguide/C/installation.xml:1142(para)
21063
"The <emphasis>-f</emphasis> option of <application>e2fsck</application> "
21064
"forces checking even if the system seems clean."
21067
#: serverguide/C/installation.xml:1149(para)
21068
msgid "Finally, resize the filesystem:"
21071
#: serverguide/C/installation.xml:1154(command)
21072
msgid "sudo resize2fs /dev/vg01/srv"
21075
#: serverguide/C/installation.xml:1160(para)
21076
msgid "Now mount the partition and check its size."
21079
#: serverguide/C/installation.xml:1165(command)
21080
msgid "mount /dev/vg01/srv /srv && df -h /srv"
21083
#: serverguide/C/installation.xml:1177(para)
21086
"url=\"https://help.ubuntu.com/community/Installation#lvm\">Ubuntu Wiki LVM "
21087
"Articles</ulink>."
21090
#: serverguide/C/installation.xml:1182(para)
21092
"See the <ulink url=\"http://tldp.org/HOWTO/LVM-HOWTO/index.html\">LVM "
21093
"HOWTO</ulink> for more information."
21096
#: serverguide/C/installation.xml:1187(para)
21098
"Another good article is <ulink "
21099
"url=\"http://www.linuxdevcenter.com/pub/a/linux/2006/04/27/managing-disk-"
21100
"space-with-lvm.html\">Managing Disk Space with LVM</ulink> on O'Reilly's "
21101
"linuxdevcenter.com site."
21104
#: serverguide/C/installation.xml:1194(para)
21106
"For more information on <application>fdisk</application> see the <ulink "
21107
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/fdisk.8.html\">fdisk "
21108
"man page</ulink>."
21111
#: serverguide/C/file-server.xml:13(title)
21112
msgid "File Servers"
21115
#: serverguide/C/file-server.xml:15(para)
21117
"If you have more than one computer on a single network. At some point you "
21118
"will probably need to share files between them. In this section we cover "
21119
"installing and configuring FTP, NFS, and CUPS."
21122
#: serverguide/C/file-server.xml:22(title)
21126
#: serverguide/C/file-server.xml:24(para)
21128
"File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading "
21129
"files between computers. FTP works on a client/server model. The server "
21130
"component is called an <emphasis>FTP daemon</emphasis>. It continuously "
21131
"listens for FTP requests from remote clients. When a request is received, it "
21132
"manages the login and sets up the connection. For the duration of the "
21133
"session it executes any of commands sent by the FTP client."
21136
#: serverguide/C/file-server.xml:33(para)
21137
msgid "Access to an FTP server can be managed in two ways:"
21140
#: serverguide/C/file-server.xml:37(para)
21144
#: serverguide/C/file-server.xml:40(para)
21145
msgid "Authenticated"
21148
#: serverguide/C/file-server.xml:43(para)
21150
"In the Anonymous mode, remote clients can access the FTP server by using the "
21151
"default user account called \"anonymous\" or \"ftp\" and sending an email "
21152
"address as the password. In the Authenticated mode a user must have an "
21153
"account and a password. User access to the FTP server directories and files "
21154
"is dependent on the permissions defined for the account used at login. As a "
21155
"general rule, the FTP daemon will hide the root directory of the FTP server "
21156
"and change it to the FTP Home directory. This hides the rest of the file "
21157
"system from remote sessions."
21160
#: serverguide/C/file-server.xml:55(title)
21161
msgid "vsftpd - FTP Server Installation"
21164
#: serverguide/C/file-server.xml:57(para)
21166
"vsftpd is an FTP daemon available in Ubuntu. It is easy to install, set up, "
21167
"and maintain. To install <application>vsftpd</application> you can run the "
21168
"following command:"
21171
#: serverguide/C/file-server.xml:65(command)
21172
msgid "sudo apt-get install vsftpd"
21175
#: serverguide/C/file-server.xml:71(title)
21176
msgid "Anonymous FTP Configuration"
21179
#: serverguide/C/file-server.xml:73(para)
21181
"By default <application>vsftpd</application> is configured to only allow "
21182
"anonymous download. During installation a <emphasis>ftp</emphasis> user is "
21183
"created with a home directory of <filename>/home/ftp</filename>. This is the "
21184
"default FTP directory."
21187
#: serverguide/C/file-server.xml:80(para)
21189
"If you wish to change this location, to <filename>/srv/ftp</filename> for "
21190
"example, simply create a directory in another location and change the "
21191
"<emphasis>ftp</emphasis> user's home directory:"
21194
#: serverguide/C/file-server.xml:87(command)
21195
msgid "sudo mkdir /srv/ftp"
21198
#: serverguide/C/file-server.xml:88(command)
21199
msgid "sudo usermod -d /srv/ftp ftp"
21202
#: serverguide/C/file-server.xml:91(para)
21203
msgid "After making the change restart <application>vsftpd</application>:"
21206
#: serverguide/C/file-server.xml:96(command) serverguide/C/file-server.xml:124(command) serverguide/C/file-server.xml:189(command) serverguide/C/file-server.xml:237(command)
21207
msgid "sudo /etc/init.d/vsftpd restart"
21210
#: serverguide/C/file-server.xml:99(para)
21212
"Finally, copy any files and directories you would like to make available "
21213
"through anonymous FTP to <filename>/srv/ftp</filename>."
21216
#: serverguide/C/file-server.xml:106(title)
21217
msgid "User Authenticated FTP Configuration"
21220
#: serverguide/C/file-server.xml:108(para)
21222
"To configure <application>vsftpd</application> to authenticate system users "
21223
"and allow them to upload files edit <filename>/etc/vsftpd.conf</filename>:"
21226
#: serverguide/C/file-server.xml:114(programlisting)
21230
"local_enable=YES\n"
21231
"write_enable=YES\n"
21234
#: serverguide/C/file-server.xml:119(para)
21235
msgid "Now restart <application>vsftpd</application>:"
21238
#: serverguide/C/file-server.xml:127(para)
21240
"Now when system users login to FTP they will start in their "
21241
"<emphasis>home</emphasis> directories where they can download, upload, "
21242
"create directories, etc."
21245
#: serverguide/C/file-server.xml:133(para)
21247
"Similarly, by default, the anonymous users are not allowed to upload files "
21248
"to FTP server. To change this setting, you should uncomment the following "
21249
"line, and restart <application>vsftpd</application>:"
21252
#: serverguide/C/file-server.xml:140(programlisting)
21256
"anon_upload_enable=YES\n"
21259
#: serverguide/C/file-server.xml:145(para)
21261
"Enabling anonymous FTP upload can be an extreme security risk. It is best to "
21262
"not enable anonymous upload on servers accessed directly from the Internet."
21265
#: serverguide/C/file-server.xml:151(para)
21267
"The configuration file consists of many configuration parameters. The "
21268
"information about each parameter is available in the configuration file. "
21269
"Alternatively, you can refer to the man page, <command>man 5 "
21270
"vsftpd.conf</command> for details of each parameter."
21273
#: serverguide/C/file-server.xml:162(title)
21274
msgid "Securing FTP"
21277
#: serverguide/C/file-server.xml:164(para)
21279
"There are options in <filename>/etc/vsftpd.conf</filename> to help make "
21280
"<application>vsftpd</application> more secure. For example users can be "
21281
"limited to their home directories by uncommenting:"
21284
#: serverguide/C/file-server.xml:170(programlisting)
21288
"chroot_local_user=YES\n"
21291
#: serverguide/C/file-server.xml:174(para)
21293
"You can also limit a specific list of users to just their home directories:"
21296
#: serverguide/C/file-server.xml:178(programlisting)
21300
"chroot_list_enable=YES\n"
21301
"chroot_list_file=/etc/vsftpd.chroot_list\n"
21304
#: serverguide/C/file-server.xml:183(para)
21306
"After uncommenting the above options, create a "
21307
"<filename>/etc/vsftpd.chroot_list</filename> containing a list of users one "
21308
"per line. Then restart <application>vsftpd</application>:"
21311
#: serverguide/C/file-server.xml:192(para)
21313
"Also, the <filename>/etc/ftpusers</filename> file is a list of users that "
21314
"are <emphasis>disallowed</emphasis> FTP access. The default list includes "
21315
"root, daemon, nobody, etc. To disable FTP access for additional users simply "
21316
"add them to the list."
21319
#: serverguide/C/file-server.xml:199(para)
21321
"FTP can also be encrypted using <emphasis>FTPS</emphasis>. Different from "
21322
"<emphasis>SFTP</emphasis>, <emphasis>FTPS</emphasis> is FTP over Secure "
21323
"Socket Layer (SSL). <emphasis>SFTP</emphasis> is a FTP like session over an "
21324
"encrypted <emphasis>SSH</emphasis> connection. A major difference is that "
21325
"users of SFTP need to have a <emphasis>shell</emphasis> account on the "
21326
"system, instead of a <emphasis>nologin</emphasis> shell. Providing all users "
21327
"with a shell may not be ideal for some environments, such as a shared web "
21331
#: serverguide/C/file-server.xml:208(para)
21333
"To configure <emphasis>FTPS</emphasis>, edit "
21334
"<filename>/etc/vsftpd.conf</filename> and at the bottom add:"
21337
#: serverguide/C/file-server.xml:212(programlisting)
21344
#: serverguide/C/file-server.xml:216(para)
21345
msgid "Also, notice the certificate and key related options:"
21348
#: serverguide/C/file-server.xml:220(programlisting)
21352
"rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem\n"
21353
"rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key\n"
21356
#: serverguide/C/file-server.xml:225(para)
21358
"By default these options are set the certificate and key provided by the "
21359
"<application>ssl-cert</application> package. In a production environment "
21360
"these should be replaced with a certificate and key generated for the "
21361
"specific host. For more information on certificates see <xref "
21362
"linkend=\"certificates-and-security\"/>."
21365
#: serverguide/C/file-server.xml:231(para)
21367
"Now restart <application>vsftpd</application>, and non-anonymous users will "
21368
"be forced to use <emphasis>FTPS</emphasis>:"
21371
#: serverguide/C/file-server.xml:240(para)
21373
"To allow users with a shell of <filename>/usr/sbin/nologin</filename> access "
21374
"to FTP, but have no shell access, edit <filename>/etc/shells</filename> "
21375
"adding the <emphasis>nologin</emphasis> shell:"
21378
#: serverguide/C/file-server.xml:245(programlisting)
21382
"# /etc/shells: valid login shells\n"
21395
"/usr/bin/screen\n"
21396
"/usr/sbin/nologin\n"
21399
#: serverguide/C/file-server.xml:263(para)
21401
"This is necessary because, by default <application>vsftpd</application> uses "
21402
"PAM for authentication, and the <filename>/etc/pam.d/vsftpd</filename> "
21403
"configuration file contains:"
21406
#: serverguide/C/file-server.xml:268(programlisting)
21410
"auth required pam_shells.so\n"
21413
#: serverguide/C/file-server.xml:272(para)
21415
"The <emphasis>shells</emphasis> PAM module restricts access to shells listed "
21416
"in the <filename>/etc/shells</filename> file."
21419
#: serverguide/C/file-server.xml:277(para)
21421
"Most popular FTP clients can be configured connect using FTPS. The "
21422
"<application>lftp</application> command line FTP client has the ability to "
21423
"use FTPS as well."
21426
#: serverguide/C/file-server.xml:288(para)
21428
"See the <ulink url=\"http://vsftpd.beasts.org/vsftpd_conf.html\">vsftpd "
21429
"website</ulink> for more information."
21432
#: serverguide/C/file-server.xml:293(para)
21434
"For detailed <filename>/etc/vsftpd.conf</filename> options see the <ulink "
21435
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/vsftpd.conf.5.html\">"
21436
"vsftpd.conf man page</ulink>."
21439
#: serverguide/C/file-server.xml:299(para)
21441
"The CodeGurus article <ulink "
21442
"url=\"http://www.codeguru.com/csharp/.net/net_general/internet/article.php/c1"
21443
"4329\"> FTPS vs. SFTP: What to Choose</ulink> has useful information "
21444
"contrasting FTPS and SFTP."
21447
#: serverguide/C/file-server.xml:305(para)
21449
"Also, for more information see the <ulink "
21450
"url=\"https://help.ubuntu.com/community/vsftpd\">Ubuntu Wiki vsftpd</ulink> "
21454
#: serverguide/C/file-server.xml:315(title)
21455
msgid "Network File System (NFS)"
21458
#: serverguide/C/file-server.xml:316(para)
21460
"NFS allows a system to share directories and files with others over a "
21461
"network. By using NFS, users and programs can access files on remote systems "
21462
"almost as if they were local files."
21465
#: serverguide/C/file-server.xml:322(para)
21466
msgid "Some of the most notable benefits that NFS can provide are:"
21469
#: serverguide/C/file-server.xml:328(para)
21471
"Local workstations use less disk space because commonly used data can be "
21472
"stored on a single machine and still remain accessible to others over the "
21476
#: serverguide/C/file-server.xml:333(para)
21478
"There is no need for users to have separate home directories on every "
21479
"network machine. Home directories could be set up on the NFS server and made "
21480
"available throughout the network."
21483
#: serverguide/C/file-server.xml:339(para)
21485
"Storage devices such as floppy disks, CDROM drives, and USB Thumb drives can "
21486
"be used by other machines on the network. This may reduce the number of "
21487
"removable media drives throughout the network."
21490
#: serverguide/C/file-server.xml:349(para)
21492
"At a terminal prompt enter the following command to install the NFS Server:"
21495
#: serverguide/C/file-server.xml:355(command)
21496
msgid "sudo apt-get install nfs-kernel-server"
21499
#: serverguide/C/file-server.xml:361(para)
21501
"You can configure the directories to be exported by adding them to the "
21502
"<filename>/etc/exports</filename> file. For example:"
21505
#: serverguide/C/file-server.xml:366(screen)
21509
"/ubuntu *(ro,sync,no_root_squash)\n"
21510
"/home *(rw,sync,no_root_squash)\n"
21513
#: serverguide/C/file-server.xml:372(para)
21515
"You can replace * with one of the hostname formats. Make the hostname "
21516
"declaration as specific as possible so unwanted systems cannot access the "
21520
#: serverguide/C/file-server.xml:378(para)
21522
"To start the NFS server, you can run the following command at a terminal "
21526
#: serverguide/C/file-server.xml:383(command)
21527
msgid "sudo /etc/init.d/nfs-kernel-server start"
21530
#: serverguide/C/file-server.xml:388(title)
21531
msgid "NFS Client Configuration"
21534
#: serverguide/C/file-server.xml:389(para)
21536
"Use the <application>mount</application> command to mount a shared NFS "
21537
"directory from another machine, by typing a command line similar to the "
21538
"following at a terminal prompt:"
21541
#: serverguide/C/file-server.xml:395(command)
21542
msgid "sudo mount example.hostname.com:/ubuntu /local/ubuntu"
21545
#: serverguide/C/file-server.xml:399(para)
21547
"The mount point directory <filename>/local/ubuntu</filename> must exist. "
21548
"There should be no files or subdirectories in the "
21549
"<filename>/local/ubuntu</filename> directory."
21552
#: serverguide/C/file-server.xml:406(para)
21554
"An alternate way to mount an NFS share from another machine is to add a line "
21555
"to the <filename>/etc/fstab</filename> file. The line must state the "
21556
"hostname of the NFS server, the directory on the server being exported, and "
21557
"the directory on the local machine where the NFS share is to be mounted."
21560
#: serverguide/C/file-server.xml:414(para)
21562
"The general syntax for the line in <filename>/etc/fstab</filename> file is "
21566
#: serverguide/C/file-server.xml:420(programlisting)
21570
"example.hostname.com:/ubuntu /local/ubuntu nfs "
21571
"rsize=8192,wsize=8192,timeo=14,intr\n"
21574
#: serverguide/C/file-server.xml:424(para)
21576
"If you have trouble mounting an NFS share, make sure the <application>nfs-"
21577
"common</application> package is installed on your client. To install "
21578
"<application>nfs-common</application> enter the following command at the "
21579
"terminal prompt: <screen>\n"
21580
"<command>sudo apt-get install nfs-common</command>\n"
21584
#: serverguide/C/file-server.xml:437(ulink)
21585
msgid "Linux NFS faq"
21588
#: serverguide/C/file-server.xml:439(ulink)
21589
msgid "Ubuntu Wiki NFS Howto"
21592
#: serverguide/C/file-server.xml:445(title)
21593
msgid "CUPS - Print Server"
21596
#: serverguide/C/file-server.xml:446(para)
21598
"The primary mechanism for Ubuntu printing and print services is the "
21599
"<emphasis role=\"bold\">Common UNIX Printing System</emphasis> (CUPS). This "
21600
"printing system is a freely available, portable printing layer which has "
21601
"become the new standard for printing in most Linux distributions."
21604
#: serverguide/C/file-server.xml:453(para)
21606
"CUPS manages print jobs and queues and provides network printing using the "
21607
"standard Internet Printing Protocol (IPP), while offering support for a very "
21608
"large range of printers, from dot-matrix to laser and many in between. CUPS "
21609
"also supports PostScript Printer Description (PPD) and auto-detection of "
21610
"network printers, and features a simple web-based configuration and "
21611
"administration tool."
21614
#: serverguide/C/file-server.xml:463(para)
21616
"To install CUPS on your Ubuntu computer, simply use "
21617
"<application>sudo</application> with the <application>apt-get</application> "
21618
"command and give the packages to install as the first parameter. A complete "
21619
"CUPS install has many package dependencies, but they may all be specified on "
21620
"the same command line. Enter the following at a terminal prompt to install "
21624
#: serverguide/C/file-server.xml:468(command)
21625
msgid "sudo apt-get install cups"
21628
#: serverguide/C/file-server.xml:471(para)
21630
"Upon authenticating with your user password, the packages should be "
21631
"downloaded and installed without error. Upon the conclusion of installation, "
21632
"the CUPS server will be started automatically."
21635
#: serverguide/C/file-server.xml:476(para)
21637
"For troubleshooting purposes, you can access CUPS server errors via the "
21638
"error log file at: <filename>/var/log/cups/error_log</filename>. If the "
21639
"error log does not show enough information to troubleshoot any problems you "
21640
"encounter, the verbosity of the CUPS log can be increased by changing the "
21641
"<emphasis role=\"bold\">LogLevel</emphasis> directive in the configuration "
21642
"file (discussed below) to \"debug\" or even \"debug2\", which logs "
21643
"everything, from the default of \"info\". If you make this change, remember "
21644
"to change it back once you've solved your problem, to prevent the log file "
21645
"from becoming overly large."
21648
#: serverguide/C/file-server.xml:489(para)
21650
"The Common UNIX Printing System server's behavior is configured through the "
21651
"directives contained in the file <filename>/etc/cups/cupsd.conf</filename>. "
21652
"The CUPS configuration file follows the same syntax as the primary "
21653
"configuration file for the Apache HTTP server, so users familiar with "
21654
"editing Apache's configuration file should feel at ease when editing the "
21655
"CUPS configuration file. Some examples of settings you may wish to change "
21656
"initially will be presented here."
21659
#: serverguide/C/file-server.xml:499(para)
21661
"Prior to editing the configuration file, you should make a copy of the "
21662
"original file and protect it from writing, so you will have the original "
21663
"settings as a reference, and to reuse as necessary."
21666
#: serverguide/C/file-server.xml:503(para)
21668
"Copy the <filename>/etc/cups/cupsd.conf</filename> file and protect it from "
21669
"writing with the following commands, issued at a terminal prompt:"
21672
#: serverguide/C/file-server.xml:509(command)
21673
msgid "sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original"
21676
#: serverguide/C/file-server.xml:510(command)
21677
msgid "sudo chmod a-w /etc/cups/cupsd.conf.original"
21680
#: serverguide/C/file-server.xml:515(para)
21682
"<emphasis role=\"bold\">ServerAdmin</emphasis>: To configure the email "
21683
"address of the designated administrator of the CUPS server, simply edit the "
21684
"<filename>/etc/cups/cupsd.conf</filename> configuration file with your "
21685
"preferred text editor, and add or modify the <emphasis "
21686
"role=\"italics\">ServerAdmin</emphasis> line accordingly. For example, if "
21687
"you are the Administrator for the CUPS server, and your e-mail address is "
21688
"'bjoy@somebigco.com', then you would modify the ServerAdmin line to appear "
21692
#: serverguide/C/file-server.xml:526(screen)
21696
"ServerAdmin bjoy@somebigco.com\n"
21699
#: serverguide/C/file-server.xml:532(para)
21701
"<emphasis role=\"bold\">Listen</emphasis>: By default on Ubuntu, the CUPS "
21702
"server installation listens only on the loopback interface at IP address "
21703
"<emphasis>127.0.0.1</emphasis>. In order to instruct the CUPS server to "
21704
"listen on an actual network adapter's IP address, you must specify either a "
21705
"hostname, the IP address, or optionally, an IP address/port pairing via the "
21706
"addition of a Listen directive. For example, if your CUPS server resides on "
21707
"a local network at the IP address <emphasis "
21708
"role=\"italics\">192.168.10.250</emphasis> and you'd like to make it "
21709
"accessible to the other systems on this subnetwork, you would edit the "
21710
"<filename>/etc/cups/cupsd.conf</filename> and add a Listen directive, as "
21714
#: serverguide/C/file-server.xml:546(screen)
21718
"Listen 127.0.0.1:631 # existing loopback Listen\n"
21719
"Listen /var/run/cups/cups.sock # existing socket Listen\n"
21720
"Listen 192.168.10.250:631 # Listen on the LAN interface, Port 631 "
21724
#: serverguide/C/file-server.xml:552(para)
21726
"In the example above, you may comment out or remove the reference to the "
21727
"Loopback address (127.0.0.1) if you do not wish <application>cupsd "
21728
"</application> to listen on that interface, but would rather have it only "
21729
"listen on the Ethernet interfaces of the Local Area Network (LAN). To enable "
21730
"listening for all network interfaces for which a certain hostname is bound, "
21731
"including the Loopback, you could create a Listen entry for the hostname "
21732
"<emphasis>socrates</emphasis> as such:"
21735
#: serverguide/C/file-server.xml:562(screen)
21739
"Listen socrates:631 # Listen on all interfaces for the hostname 'socrates'\n"
21742
#: serverguide/C/file-server.xml:566(para)
21744
"or by omitting the Listen directive and using <emphasis>Port</emphasis> "
21748
#: serverguide/C/file-server.xml:568(screen)
21752
"Port 631 # Listen on port 631 on all interfaces\n"
21755
#: serverguide/C/file-server.xml:575(para)
21757
"For more examples of configuration directives in the CUPS server "
21758
"configuration file, view the associated system manual page by entering the "
21759
"following command at a terminal prompt:"
21762
#: serverguide/C/file-server.xml:582(command)
21763
msgid "man cupsd.conf"
21766
#: serverguide/C/file-server.xml:586(para)
21768
"Whenever you make changes to the <filename>/etc/cups/cupsd.conf</filename> "
21769
"configuration file, you'll need to restart the CUPS server by typing the "
21770
"following command at a terminal prompt:"
21773
#: serverguide/C/file-server.xml:592(command)
21774
msgid "sudo /etc/init.d/cups restart"
21777
#: serverguide/C/file-server.xml:598(title)
21778
msgid "Web Interface"
21781
#: serverguide/C/file-server.xml:600(para)
21783
"CUPS can be configured and monitored using a web interface, which by default "
21784
"is available at <ulink "
21785
"url=\"http://localhost:631/admin\">http://localhost:631/admin</ulink>. The "
21786
"web interface can be used to perform all printer management tasks."
21789
#: serverguide/C/file-server.xml:604(para)
21791
"In order to perform administrative tasks via the web interface, you must "
21792
"either have the root account enabled on your server, or authenticate as a "
21793
"user in the <emphasis role=\"italic\">lpadmin</emphasis> group. For security "
21794
"reasons, CUPS won't authenticate a user that doesn't have a password."
21797
#: serverguide/C/file-server.xml:607(para)
21799
"To add a user to the <emphasis role=\"italic\">lpadmin</emphasis> group, run "
21800
"at the terminal prompt: <screen>\n"
21801
"<command>sudo usermod -aG lpadmin username</command>\n"
21805
#: serverguide/C/file-server.xml:613(para)
21807
"Further documentation is available in the <emphasis "
21808
"role=\"italic\">Documentation/Help</emphasis> tab of the web interface."
21811
#: serverguide/C/file-server.xml:621(ulink)
21812
msgid "CUPS Website"
21815
#: serverguide/C/file-server.xml:624(ulink)
21816
msgid "Ubuntu Wiki CUPS page"
21819
#: serverguide/C/dns.xml:13(title)
21820
msgid "Domain Name Service (DNS)"
21823
#: serverguide/C/dns.xml:14(para)
21825
"Domain Name Service (DNS) is an Internet service that maps IP addresses and "
21826
"fully qualified domain names (FQDN) to one another. In this way, DNS "
21827
"alleviates the need to remember IP addresses. Computers that run DNS are "
21828
"called <emphasis>name servers</emphasis>. Ubuntu ships with "
21829
"<application>BIND</application> (Berkley Internet Naming Daemon), the most "
21830
"common program used for maintaining a name server on Linux."
21833
#: serverguide/C/dns.xml:24(para)
21835
"At a terminal prompt, enter the following command to install "
21836
"<application>dns</application>:"
21839
#: serverguide/C/dns.xml:28(command)
21840
msgid "sudo apt-get install bind9"
21843
#: serverguide/C/dns.xml:30(para)
21845
"A very useful package for testing and troubleshooting DNS issues is the "
21846
"dnsutils package. To install <application>dnsutils</application> enter the "
21850
#: serverguide/C/dns.xml:35(command)
21851
msgid "sudo apt-get install dnsutils"
21854
#: serverguide/C/dns.xml:40(para)
21856
"There a many ways to configure <application>BIND9</application>. Some of the "
21857
"most common configurations are a caching nameserver, primary master, and a "
21858
"as a secondary master."
21861
#: serverguide/C/dns.xml:46(para)
21863
"When configured as a caching nameserver BIND9 will find the answer to name "
21864
"queries and remember the answer when the domain is queried again."
21867
#: serverguide/C/dns.xml:52(para)
21869
"As a primary master server BIND9 reads the data for a zone from a file on "
21870
"it's host and is authoritative for that zone."
21873
#: serverguide/C/dns.xml:57(para)
21875
"In a secondary master configuration BIND9 gets the zone data from another "
21876
"nameserver authoritative for the zone."
21879
#: serverguide/C/dns.xml:65(para)
21881
"The DNS configuration files are stored in the <filename>/etc/bind</filename> "
21882
"directory. The primary configuration file is "
21883
"<filename>/etc/bind/named.conf</filename>."
21886
#: serverguide/C/dns.xml:72(para)
21888
"The <emphasis>include</emphasis> line specifies the filename which contains "
21889
"the DNS options. The <emphasis>directory</emphasis> line in the "
21890
"<filename>/etc/bind/named.conf.options</filename> file tells DNS where to "
21891
"look for files. All files BIND uses will be relative to this directory."
21894
#: serverguide/C/dns.xml:80(para)
21896
"The file named <filename>/etc/bind/db.root</filename> describes the root "
21897
"nameservers in the world. The servers change over time, so the "
21898
"<filename>/etc/bind/db.root</filename> file must be maintained now and then. "
21899
"This is usually done as updates to the <application>bind9</application> "
21900
"package. The <emphasis>zone</emphasis> section defines a master server, and "
21901
"it is stored in a file mentioned in the <emphasis>file</emphasis> option."
21904
#: serverguide/C/dns.xml:90(para)
21906
"It is possible to configure the same server to be a caching name server, "
21907
"primary master, and secondary master. A server can be the Start of Authority "
21908
"(SOA) for one zone, while providing secondary service for another zone. All "
21909
"the while providing caching services for hosts on the local LAN."
21912
#: serverguide/C/dns.xml:98(title)
21913
msgid "Caching Nameserver"
21916
#: serverguide/C/dns.xml:99(para)
21918
"The default configuration is setup to act as a caching server. All that is "
21919
"required is simply adding the IP Addresses of your ISP's DNS servers. Simply "
21920
"uncomment and edit the following in "
21921
"<filename>/etc/bind/named.conf.options</filename>:"
21924
#: serverguide/C/dns.xml:103(programlisting)
21934
#: serverguide/C/dns.xml:110(para)
21936
"Replace <emphasis>1.2.3.4</emphasis> and <emphasis>5.6.7.8</emphasis> with "
21937
"the IP Adresses of actual nameservers."
21940
#: serverguide/C/dns.xml:114(para)
21942
"Now restart the DNS server, to enable the new configuration. From a terminal "
21946
#: serverguide/C/dns.xml:118(command) serverguide/C/dns.xml:194(command) serverguide/C/dns.xml:253(command) serverguide/C/dns.xml:312(command) serverguide/C/dns.xml:561(command)
21947
msgid "sudo /etc/init.d/bind9 restart"
21950
#: serverguide/C/dns.xml:120(para)
21952
"See <xref linkend=\"dns-testing-dig\"/> for information on testing a caching "
21956
#: serverguide/C/dns.xml:125(title)
21957
msgid "Primary Master"
21960
#: serverguide/C/dns.xml:126(para)
21962
"In this section <application>BIND9</application> will be configured as the "
21963
"Primary Master for the domain <emphasis>example.com</emphasis>. Simply "
21964
"replace <emphasis role=\"italic\">example.com</emphasis> with your FQDN "
21965
"(Fully Qualified Domain Name)."
21968
#: serverguide/C/dns.xml:132(title)
21969
msgid "Forward Zone File"
21972
#: serverguide/C/dns.xml:133(para)
21974
"To add a DNS zone to BIND9, turning BIND9 into a Primary Master server, the "
21975
"first step is to edit <filename>/etc/bind/named.conf.local</filename>:"
21978
#: serverguide/C/dns.xml:137(programlisting)
21982
"zone \"example.com\" {\n"
21984
" file \"/etc/bind/db.example.com\";\n"
21988
#: serverguide/C/dns.xml:143(para)
21990
"Now use an existing zone file as a template to create the "
21991
"<filename>/etc/bind/db.example.com</filename> file:"
21994
#: serverguide/C/dns.xml:147(command)
21995
msgid "sudo cp /etc/bind/db.local /etc/bind/db.example.com"
21998
#: serverguide/C/dns.xml:149(para)
22000
"Edit the new zone file <filename>/etc/bind/db.example.com</filename> change "
22001
"<emphasis>localhost.</emphasis> to the FQDN of your server, leaving the "
22002
"additional \".\" at the end. Change <emphasis>127.0.0.1</emphasis> to the "
22003
"nameserver's IP Address and <emphasis>root.localhost</emphasis> to a valid "
22004
"email address, but with a \".\" instead of the usual \"@\" symbol, again "
22005
"leaving the \".\" at the end."
22008
#: serverguide/C/dns.xml:155(para)
22010
"Also, create an <emphasis>A record</emphasis> for <emphasis "
22011
"role=\"italic\">ns.example.com</emphasis>. The name server in this example:"
22014
#: serverguide/C/dns.xml:159(programlisting)
22019
"; BIND data file for local loopback interface\n"
22022
"@ IN SOA ns.example.com. root.example.com. (\n"
22024
" 604800 ; Refresh\n"
22026
" 2419200 ; Expire\n"
22027
" 604800 ) ; Negative Cache TTL\n"
22029
"@ IN NS ns.example.com.\n"
22030
"@ IN A 127.0.0.1\n"
22032
"ns IN A 192.168.1.10\n"
22035
#: serverguide/C/dns.xml:176(para)
22037
"You must increment the <emphasis>Serial Number</emphasis> every time you "
22038
"make changes to the zone file. If you make multiple changes before "
22039
"restarting BIND9, simply increment the Serial once."
22042
#: serverguide/C/dns.xml:180(para)
22044
"Now, you can add DNS records to the bottom of the zone file. See <xref "
22045
"linkend=\"dns-record-types\"/> for details."
22048
#: serverguide/C/dns.xml:184(para)
22050
"Many admins like to use the last date edited as the serial of a zone, such "
22051
"as <emphasis>2007010100</emphasis> which is yyyymmddss (where "
22052
"<emphasis>ss</emphasis> is the Serial Number)"
22055
#: serverguide/C/dns.xml:189(para)
22057
"Once you have made a change to the zone file "
22058
"<application>BIND9</application> will need to be restarted for the changes "
22062
#: serverguide/C/dns.xml:198(title)
22063
msgid "Reverse Zone File"
22066
#: serverguide/C/dns.xml:199(para)
22068
"Now that the zone is setup and resolving names to IP Adresses a "
22069
"<emphasis>Reverse zone</emphasis> is also required. A Reverse zone allows "
22070
"DNS to resolve an address to a name."
22073
#: serverguide/C/dns.xml:203(para)
22074
msgid "Edit /etc/bind/named.conf.local and add the following:"
22077
#: serverguide/C/dns.xml:206(programlisting)
22081
"zone \"1.168.192.in-addr.arpa\" {\n"
22084
" file \"/etc/bind/db.192\";\n"
22088
#: serverguide/C/dns.xml:214(para)
22090
"Replace <emphasis>1.168.192</emphasis> with the first three octets of "
22091
"whatever network you are using. Also, name the zone file "
22092
"<filename>/etc/bind/db.192</filename> appropriately. It should match the "
22093
"first octet of your network."
22096
#: serverguide/C/dns.xml:219(para)
22097
msgid "Now create the <filename>/etc/bind/db.192</filename> file:"
22100
#: serverguide/C/dns.xml:223(command)
22101
msgid "sudo cp /etc/bind/db.127 /etc/bind/db.192"
22104
#: serverguide/C/dns.xml:225(para)
22106
"Next edit <filename>/etc/bind/db.192</filename> changing the basically the "
22107
"same options as <filename>/etc/bind/db.example.com</filename>:"
22110
#: serverguide/C/dns.xml:229(programlisting)
22115
"; BIND reverse data file for local loopback interface\n"
22118
"@ IN SOA ns.example.com. root.example.com. (\n"
22120
" 604800 ; Refresh\n"
22122
" 2419200 ; Expire\n"
22123
" 604800 ) ; Negative Cache TTL\n"
22126
"10 IN PTR ns.example.com.\n"
22129
#: serverguide/C/dns.xml:244(para)
22131
"The <emphasis>Serial Number</emphasis> in the Reverse zone needs to be "
22132
"incremented on each changes as well. For each <emphasis>A record</emphasis> "
22133
"you configure in <filename>/etc/bind/db.example.com</filename> you need to "
22134
"create a <emphasis>PTR record</emphasis> in "
22135
"<filename>/etc/bind/db.192</filename>."
22138
#: serverguide/C/dns.xml:249(para)
22140
"After creating the reverse zone file restart "
22141
"<application>BIND9</application>:"
22144
#: serverguide/C/dns.xml:258(title)
22145
msgid "Secondary Master"
22148
#: serverguide/C/dns.xml:259(para)
22150
"Once a <emphasis>Primary Master</emphasis> has been configured a "
22151
"<emphasis>Secondary Master</emphasis> is needed in order to maintain the "
22152
"availability of the domain should the Primary become unavailable."
22155
#: serverguide/C/dns.xml:263(para)
22157
"First, on the Primary Master server, the zone transfer needs to be allowed. "
22158
"Add the <emphasis>allow-transfer</emphasis> option to the example Forward "
22159
"and Reverse zone definitions in "
22160
"<filename>/etc/bind/named.conf.local</filename>:"
22163
#: serverguide/C/dns.xml:267(programlisting)
22167
"zone \"example.com\" {\n"
22169
"\tfile \"/etc/bind/db.example.com\";\n"
22170
" allow-transfer { 192.168.1.11; };\n"
22173
"zone \"1.168.192.in-addr.arpa\" {\n"
22176
" file \"/etc/bind/db.192\";\n"
22177
"\tallow-transfer { 192.168.1.11; };\n"
22181
#: serverguide/C/dns.xml:282(para)
22183
"Replace <emphasis>192.168.1.11</emphasis> with the IP Address of your "
22184
"Secondary nameserver."
22187
#: serverguide/C/dns.xml:286(para)
22189
"Next, on the Secondary Master, install the <application>bind9</application> "
22190
"package the same way as on the Primary. Then edit the "
22191
"<filename>/etc/bind/named.conf.local</filename> and add the following "
22192
"declarations for the Forward and Reverse zones:"
22195
#: serverguide/C/dns.xml:290(programlisting)
22199
"zone \"example.com\" {\n"
22201
" file \"/var/cache/bind/db.example.com\";\n"
22202
" masters { 192.168.1.10; };\n"
22205
"zone \"1.168.192.in-addr.arpa\" {\n"
22207
" file \"/var/cache/bind/db.192\";\n"
22208
" masters { 192.168.1.10; };\n"
22212
#: serverguide/C/dns.xml:304(para)
22214
"Replace <emphasis>192.168.1.10</emphasis> with the IP Address of your "
22215
"Primary nameserver."
22218
#: serverguide/C/dns.xml:308(para)
22219
msgid "Restart <application>BIND9</application> on the Secondary Master:"
22222
#: serverguide/C/dns.xml:314(para)
22224
"In <filename>/var/log/syslog</filename> you should see something similar to:"
22227
#: serverguide/C/dns.xml:317(programlisting)
22231
"slave zone \"example.com\" (IN) loaded (serial 6)\n"
22232
"slave zone \"100.18.172.in-addr.arpa\" (IN) loaded (serial 3)\n"
22235
#: serverguide/C/dns.xml:322(para)
22237
"Note: A zone is only transferred if the <emphasis>Serial Number</emphasis> "
22238
"on the Primary is larger than the one on the Secondary."
22241
#: serverguide/C/dns.xml:328(para)
22243
"The default directory for non-authoritative zone files is "
22244
"<filename>/var/cache/bind/</filename>. This directory is also configured in "
22245
"<application>AppArmor</application> to allow the "
22246
"<application>named</application> daemon to write to. For more information on "
22247
"AppArmor see <xref linkend=\"apparmor\"/>."
22250
#: serverguide/C/dns.xml:339(para)
22252
"This section covers ways to help determine the cause when problems happen "
22253
"with DNS and <application>BIND9</application>."
22256
#: serverguide/C/dns.xml:345(title)
22257
msgid "resolv.conf"
22260
#: serverguide/C/dns.xml:346(para)
22262
"The first step in testing <application>BIND9</application> is to add the "
22263
"nameserver's IP Address to a hosts resolver. The Primary nameserver should "
22264
"be configured as well as another host to double check things. Simply edit "
22265
"<filename>/etc/resolv.conf</filename> and add the following:"
22268
#: serverguide/C/dns.xml:351(programlisting)
22272
"nameserver\t192.168.1.10\n"
22273
"nameserver\t192.168.1.11\n"
22276
#: serverguide/C/dns.xml:356(para)
22278
"You should also add the IP Address of the Secondary nameserver in case the "
22279
"Primary becomes unavailable."
22282
#: serverguide/C/dns.xml:362(title)
22286
#: serverguide/C/dns.xml:363(para)
22288
"If you installed the <application>dnsutils</application> package you can "
22289
"test your setup using the DNS lookup utility <application>dig</application>:"
22292
#: serverguide/C/dns.xml:369(para)
22294
"After installing <application>BIND9</application> use "
22295
"<application>dig</application> against the loopback interface to make sure "
22296
"it is listening on port 53. From a terminal prompt:"
22299
#: serverguide/C/dns.xml:374(command)
22300
msgid "dig -x 127.0.0.1"
22303
#: serverguide/C/dns.xml:376(para)
22304
msgid "You should see lines similar to the following in the command output:"
22307
#: serverguide/C/dns.xml:379(programlisting)
22311
";; Query time: 1 msec\n"
22312
";; SERVER: 192.168.1.10#53(192.168.1.10)\n"
22315
#: serverguide/C/dns.xml:385(para)
22317
"If you have configured <application>BIND9</application> as a "
22318
"<emphasis>Caching</emphasis> nameserver \"dig\" an outside domain to check "
22322
#: serverguide/C/dns.xml:390(command)
22323
msgid "dig ubuntu.com"
22326
#: serverguide/C/dns.xml:392(para)
22327
msgid "Note the query time toward the end of the command output:"
22330
#: serverguide/C/dns.xml:395(programlisting)
22334
";; Query time: 49 msec\n"
22337
#: serverguide/C/dns.xml:398(para)
22338
msgid "After a second dig there should be improvement:"
22341
#: serverguide/C/dns.xml:401(programlisting)
22345
";; Query time: 1 msec\n"
22348
#: serverguide/C/dns.xml:408(title)
22352
#: serverguide/C/dns.xml:410(para)
22354
"Now to demonstrate how applications make use of DNS to resolve a host name "
22355
"use the <application>ping</application> utility to send an ICMP echo "
22356
"request. From a terminal prompt enter:"
22359
#: serverguide/C/dns.xml:416(command)
22360
msgid "ping example.com"
22363
#: serverguide/C/dns.xml:418(para)
22365
"This tests if the nameserver can resolve the name "
22366
"<emphasis>ns.example.com</emphasis> to an IP Address. The command output "
22370
#: serverguide/C/dns.xml:422(programlisting)
22374
"PING ns.example.com (192.168.1.10) 56(84) bytes of data.\n"
22375
"64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.800 ms\n"
22376
"64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.813 ms\n"
22379
#: serverguide/C/dns.xml:429(title)
22380
msgid "named-checkzone"
22383
#: serverguide/C/dns.xml:430(para)
22385
"A great way to test your zone files is by using the <application>named-"
22386
"checkzone</application> utility installed with the "
22387
"<application>bind9</application> package. This utility allows you to make "
22388
"sure the configuration is correct before restarting "
22389
"<application>BIND9</application> and making the changes live."
22392
#: serverguide/C/dns.xml:437(para)
22394
"To test our example Forward zone file enter the following from a command "
22398
#: serverguide/C/dns.xml:441(command)
22399
msgid "named-checkzone example.com /etc/bind/db.example.com"
22402
#: serverguide/C/dns.xml:443(para)
22404
"If everything is configured correctly you should see output similar to:"
22407
#: serverguide/C/dns.xml:446(programlisting)
22411
"zone example.com/IN: loaded serial 6\n"
22415
#: serverguide/C/dns.xml:452(para)
22416
msgid "Similarly, to test the Reverse zone file enter the following:"
22419
#: serverguide/C/dns.xml:456(command)
22420
msgid "named-checkzone example.com /etc/bind/db.192"
22423
#: serverguide/C/dns.xml:458(para)
22424
msgid "The output should be similar to:"
22427
#: serverguide/C/dns.xml:461(programlisting)
22431
"zone example.com/IN: loaded serial 3\n"
22435
#: serverguide/C/dns.xml:468(para)
22437
"The <emphasis>Serial Number</emphasis> of your zone file will probably be "
22441
#: serverguide/C/dns.xml:475(title)
22445
#: serverguide/C/dns.xml:476(para)
22447
"<application>BIND9</application> has a wide variety of logging configuration "
22448
"options available. There are two main options. The "
22449
"<emphasis>channel</emphasis> option configures where logs go, and the "
22450
"<emphasis>category</emphasis> option determines what information to log."
22453
#: serverguide/C/dns.xml:480(para)
22454
msgid "If no logging option is configured the default option is:"
22457
#: serverguide/C/dns.xml:483(programlisting)
22462
" category default { default_syslog; default_debug; };\n"
22463
" category unmatched { null; };\n"
22467
#: serverguide/C/dns.xml:489(para)
22469
"This section covers configuring <application>BIND9</application> to send "
22470
"<emphasis>debug</emphasis> messages related to DNS queries to a separate "
22474
#: serverguide/C/dns.xml:494(para)
22476
"First, we need to configure a channel to specify which file to send the "
22477
"messages to. Edit <filename>/etc/bind/named.conf.local</filename> and add "
22481
#: serverguide/C/dns.xml:498(programlisting)
22486
" channel query.log { \n"
22487
" file \"/var/log/query.log\";\n"
22488
" severity debug 3; \n"
22493
#: serverguide/C/dns.xml:508(para)
22494
msgid "Next, configure a category to send all DNS queries to the query file:"
22497
#: serverguide/C/dns.xml:511(programlisting)
22502
" channel query.log { \n"
22503
" file \"/var/log/query.log\"; \n"
22504
" severity debug 3; \n"
22506
" <emphasis>category queries { query.log; };</emphasis> \n"
22510
#: serverguide/C/dns.xml:523(para)
22512
"Note: the <emphasis>debug</emphasis> option can be set from 1 to 3. If a "
22513
"level isn't specified level 1 is the default."
22516
#: serverguide/C/dns.xml:529(para)
22518
"Since the <emphasis>named daemon</emphasis> runs as the "
22519
"<emphasis>bind</emphasis> user the <filename>/var/log/query.log</filename> "
22520
"file must be created and the ownership changed:"
22523
#: serverguide/C/dns.xml:534(command)
22524
msgid "sudo touch /var/log/query.log"
22527
#: serverguide/C/dns.xml:535(command)
22528
msgid "sudo chown bind /var/log/query.log"
22531
#: serverguide/C/dns.xml:539(para)
22533
"Before <application>named</application> daemon can write to the new log file "
22534
"the <application>AppArmor</application> profile must be updated. First, edit "
22535
"<filename>/etc/apparmor.d/usr.sbin.named</filename> and add:"
22538
#: serverguide/C/dns.xml:543(programlisting)
22542
"/var/log/query.log w,\n"
22545
#: serverguide/C/dns.xml:546(para)
22546
msgid "Next, reload the profile:"
22549
#: serverguide/C/dns.xml:550(command)
22550
msgid "cat /etc/apparmor.d/usr.sbin.named | sudo apparmor_parser -r"
22553
#: serverguide/C/dns.xml:552(para)
22555
"For more information on <application>AppArmor</application> see <xref "
22556
"linkend=\"apparmor\"/>"
22559
#: serverguide/C/dns.xml:557(para)
22561
"Now restart <application>BIND9</application> for the changes to take effect:"
22564
#: serverguide/C/dns.xml:565(para)
22566
"You should see the file <filename>/var/log/query.log</filename> fill with "
22567
"query information. This is a simple example of the "
22568
"<application>BIND9</application> logging options. For coverage of advanced "
22569
"options see <xref linkend=\"dns-more-info\"/>."
22572
#: serverguide/C/dns.xml:574(title)
22573
msgid "Common Record Types"
22576
#: serverguide/C/dns.xml:575(para)
22577
msgid "This section covers some of the most common DNS record types."
22580
#: serverguide/C/dns.xml:580(para)
22582
"<emphasis>A</emphasis> record: This record maps an IP Address to a hostname."
22585
#: serverguide/C/dns.xml:583(programlisting)
22589
"www IN A 192.168.1.12\n"
22592
#: serverguide/C/dns.xml:588(para)
22594
"<emphasis>CNAME</emphasis> record: Used to create an alias to an existing A "
22595
"record. You cannot create a CNAME record pointing to another CNAME record."
22598
#: serverguide/C/dns.xml:591(programlisting)
22602
"web IN CNAME www\n"
22605
#: serverguide/C/dns.xml:596(para)
22607
"<emphasis>MX</emphasis> record: Used to define where email should be sent "
22608
"to. Must point to an A record, not a CNAME."
22611
#: serverguide/C/dns.xml:599(programlisting)
22615
" IN MX 1 mail.example.com.\n"
22616
"mail IN A 192.168.1.13\n"
22619
#: serverguide/C/dns.xml:605(para)
22621
"<emphasis>NS</emphasis> record: Used to define which servers serve copies of "
22622
"a zone. It must point to an A record, not a CNAME. This is where Primary and "
22623
"Secondary servers are defined."
22626
#: serverguide/C/dns.xml:609(programlisting)
22630
" IN NS ns.example.com.\n"
22631
"\tIN NS ns2.example.com.\n"
22632
"ns IN A 192.168.1.10\n"
22633
"ns2\tIN A\t 192.168.1.11\n"
22636
#: serverguide/C/dns.xml:622(para)
22638
"The <ulink url=\"http://www.tldp.org/HOWTO/DNS-HOWTO.html\">DNS "
22639
"HOWTO</ulink> explains more advanced options for configuring BIND9."
22642
#: serverguide/C/dns.xml:627(para)
22644
"For in depth coverage of <emphasis>DNS</emphasis> and "
22645
"<application>BIND9</application> see <ulink "
22646
"url=\"http://www.bind9.net/\">Bind9.net</ulink>."
22649
#: serverguide/C/dns.xml:632(para)
22651
"<ulink url=\"http://www.oreilly.com/catalog/dns5/index.html\">DNS and "
22652
"BIND</ulink> is a popular book now in it's fifth edition."
22655
#: serverguide/C/dns.xml:637(para)
22657
"A great place to ask for <application>BIND9</application> assistance, and "
22658
"get involved with the Ubuntu Server community, is the <emphasis>#ubuntu-"
22659
"server</emphasis> IRC channel on <ulink "
22660
"url=\"http://freenode.net\">freenode</ulink>."
22663
#: serverguide/C/dns.xml:643(para)
22665
"Also, see the <ulink "
22666
"url=\"https://help.ubuntu.com/community/BIND9ServerHowto\">BIND9 Server "
22667
"HOWTO</ulink> in the Ubuntu Wiki."
22670
#: serverguide/C/databases.xml:13(title)
22674
#: serverguide/C/databases.xml:14(para)
22675
msgid "Ubuntu provides two popular database servers. They are:"
22678
#: serverguide/C/databases.xml:22(application) serverguide/C/databases.xml:157(title)
22682
#: serverguide/C/databases.xml:25(para)
22684
"They are available in the main repository. This section explains how to "
22685
"install and configure these database servers."
22688
#: serverguide/C/databases.xml:32(para)
22690
"MySQL is a fast, multi-threaded, multi-user, and robust SQL database server. "
22691
"It is intended for mission-critical, heavy-load production systems as well "
22692
"as for embedding into mass-deployed software."
22695
#: serverguide/C/databases.xml:41(para)
22696
msgid "To install MySQL, run the following command from a terminal prompt:"
22699
#: serverguide/C/databases.xml:46(command)
22700
msgid "sudo apt-get install mysql-server"
22703
#: serverguide/C/databases.xml:48(para)
22705
"During the installation process you will be prompted to enter a password for "
22706
"the <application>MySQL</application> root user."
22709
#: serverguide/C/databases.xml:53(para)
22711
"Once the installation is complete, the MySQL server should be started "
22712
"automatically. You can run the following command from a terminal prompt to "
22713
"check whether the MySQL server is running:"
22716
#: serverguide/C/databases.xml:61(command)
22717
msgid "sudo netstat -tap | grep mysql"
22720
#: serverguide/C/databases.xml:70(programlisting)
22724
"tcp 0 0 localhost:mysql *:* LISTEN "
22728
#: serverguide/C/databases.xml:74(para)
22730
"If the server is not running correctly, you can type the following command "
22734
#: serverguide/C/databases.xml:79(command) serverguide/C/databases.xml:104(command)
22735
msgid "sudo /etc/init.d/mysql restart"
22738
#: serverguide/C/databases.xml:85(para)
22740
"You can edit the <filename>/etc/mysql/my.cnf</filename> file to configure "
22741
"the basic settings -- log file, port number, etc. For example, to configure "
22742
"<application>MySQL</application> to listen for connections from network "
22743
"hosts, change the <emphasis>bind-address</emphasis> directive to the "
22744
"server's IP address:"
22747
#: serverguide/C/databases.xml:91(programlisting)
22751
"bind-address = 192.168.0.5\n"
22754
#: serverguide/C/databases.xml:95(para)
22755
msgid "Replace 192.168.0.5 with the appropriate address."
22758
#: serverguide/C/databases.xml:99(para)
22760
"After making a change to <filename>/etc/mysql/my.cnf</filename> the "
22761
"<application>mysql</application> daemon will need to be restarted:"
22764
#: serverguide/C/databases.xml:107(para)
22766
"If you would like to change the "
22767
"<application>MySQL</application><emphasis>root</emphasis> password, in a "
22771
#: serverguide/C/databases.xml:113(command)
22772
msgid "sudo dpkg-reconfigure mysql-server-5.1"
22775
#: serverguide/C/databases.xml:116(para)
22777
"The <application>mysql</application> daemon will be stopped, and you will be "
22778
"prompted to enter a new password."
22781
#: serverguide/C/databases.xml:125(para)
22783
"See the <ulink url=\"http://www.mysql.com/\">MySQL Home Page</ulink> for "
22784
"more information."
22787
#: serverguide/C/databases.xml:130(para)
22789
"The <emphasis>MySQL Handbook</emphasis> is also available in the "
22790
"<application>mysql-doc-5.0</application> package. To install the package "
22791
"enter the following in a terminal:"
22794
#: serverguide/C/databases.xml:135(command)
22795
msgid "sudo apt-get install mysql-doc-5.0"
22798
#: serverguide/C/databases.xml:137(para)
22800
"The documentation is in HTML format, to view them enter "
22801
"<command>file:///usr/share/doc/mysql-doc-5.0/refman-5.0-en.html-"
22802
"chapter/index.html</command> in your browser's address bar."
22805
#: serverguide/C/databases.xml:143(para) serverguide/C/databases.xml:290(para)
22807
"For general SQL information see <ulink "
22808
"url=\"http://www.informit.com/store/product.aspx?isbn=0768664128\">Using SQL "
22809
"Special Edition</ulink> by Rafe Colburn."
22812
#: serverguide/C/databases.xml:149(para)
22814
"The <ulink url=\"https://help.ubuntu.com/community/ApacheMySQLPHP\">Apache "
22815
"MySQL PHP Ubuntu Wiki</ulink> page also has useful information."
22818
#: serverguide/C/databases.xml:158(para)
22820
"PostgreSQL is an object-relational database system that has the features of "
22821
"traditional commercial database systems with enhancements to be found in "
22822
"next-generation DBMS systems."
22825
#: serverguide/C/databases.xml:165(para)
22827
"To install PostgreSQL, run the following command in the command prompt:"
22830
#: serverguide/C/databases.xml:172(command)
22831
msgid "sudo apt-get install postgresql"
22834
#: serverguide/C/databases.xml:176(para)
22836
"Once the installation is complete, you should configure the PostgreSQL "
22837
"server based on your needs, although the default configuration is viable."
22840
#: serverguide/C/databases.xml:184(para)
22842
"By default, connection via TCP/IP is disabled. PostgreSQL supports multiple "
22843
"client authentication methods. By default, IDENT authentication method is "
22844
"used for <application>postgres</application> and local users. Please refer "
22845
"<ulink url=\"http://www.postgresql.org/docs/8.4/static/admin.html\"> the "
22846
"PostgreSQL Administrator's Guide</ulink>."
22849
#: serverguide/C/databases.xml:191(para)
22851
"The following discussion assumes that you wish to enable TCP/IP connections "
22852
"and use the MD5 method for client authentication. PostgreSQL configuration "
22853
"files are stored in the "
22854
"<filename>/etc/postgresql/<version>/main</filename> directory. For "
22855
"example, if you install PostgreSQL 8.4, the configuration files are stored "
22856
"in the <filename>/etc/postgresql/8.4/main</filename> directory."
22859
#: serverguide/C/databases.xml:201(para)
22861
"To configure <emphasis>ident</emphasis> authentication, add entries to the "
22862
"<filename>/etc/postgresql/8.4/main/pg_ident.conf</filename> file."
22865
#: serverguide/C/databases.xml:208(para)
22867
"To enable TCP/IP connections, edit the file "
22868
"<filename>/etc/postgresql/8.4/main/postgresql.conf</filename>"
22871
#: serverguide/C/databases.xml:210(para)
22873
"Locate the line <emphasis>#listen_addresses = 'localhost'</emphasis> and "
22877
#: serverguide/C/databases.xml:213(programlisting)
22881
"listen_addresses = 'localhost'\n"
22884
#: serverguide/C/databases.xml:217(para)
22886
"To allow other computers to connect to your "
22887
"<application>PostgreSQL</application> server replace 'localhost' with the "
22888
"<emphasis>IP Address</emphasis> of your server."
22891
#: serverguide/C/databases.xml:222(para)
22893
"You may also edit all other parameters, if you know what you are doing! For "
22894
"details, refer to the configuration file or to the PostgreSQL documentation."
22897
#: serverguide/C/databases.xml:227(para)
22899
"Now that we can connect to our <application>PostgreSQL</application> server, "
22900
"the next step is to set a password for the <emphasis>postgres</emphasis> "
22901
"user. Run the following command at a terminal prompt to connect to the "
22902
"default PostgreSQL template database:"
22905
#: serverguide/C/databases.xml:234(command)
22906
msgid "sudo -u postgres psql template1"
22909
#: serverguide/C/databases.xml:236(para)
22911
"The above command connects to PostgreSQL database "
22912
"<emphasis>template1</emphasis> as user <emphasis>postgres</emphasis>. Once "
22913
"you connect to the PostgreSQL server, you will be at a SQL prompt. You can "
22914
"run the following SQL command at the <application>psql</application> prompt "
22915
"to configure the password for the user <emphasis "
22916
"role=\"italics\">postgres</emphasis>."
22919
#: serverguide/C/databases.xml:244(command)
22920
msgid "ALTER USER postgres with encrypted password 'your_password';"
22923
#: serverguide/C/databases.xml:246(para)
22925
"After configuring the password, edit the file "
22926
"<filename>/etc/postgresql/8.4/main/pg_hba.conf</filename> to use "
22927
"<emphasis>MD5</emphasis> authentication with the "
22928
"<emphasis>postgres</emphasis> user:"
22931
#: serverguide/C/databases.xml:252(programlisting)
22935
"local all postgres md5\n"
22938
#: serverguide/C/databases.xml:256(para)
22940
"Finally, you should restart the <application>PostgreSQL</application> "
22941
"service to initialize the new configuration. From a terminal prompt enter "
22942
"the following to restart <application>PostgreSQL</application>:"
22945
#: serverguide/C/databases.xml:262(command)
22946
msgid "sudo /etc/init.d/postgresql-8.4 restart"
22949
#: serverguide/C/databases.xml:265(para)
22951
"The above configuration is not complete by any means. Please refer <ulink "
22952
"url=\"http://www.postgresql.org/docs/8.4/static/admin.html\"> the PostgreSQL "
22953
"Administrator's Guide</ulink> to configure more parameters."
22956
#: serverguide/C/databases.xml:276(para)
22958
"As mentioned above the <ulink "
22959
"url=\"http://www.postgresql.org/docs/8.4/static/admin.html\">Administrator's "
22960
"Guide</ulink> is an excellent resource. The guide is also available in the "
22961
"<application>postgresql-doc-8.4</application> package. Execute the following "
22962
"in a terminal to install the package:"
22965
#: serverguide/C/databases.xml:282(command)
22966
msgid "sudo apt-get install postgresql-doc-8.4"
22969
#: serverguide/C/databases.xml:284(para)
22971
"To view the guide enter <command>file:///usr/share/doc/postgresql-doc-"
22972
"8.4/html/index.html</command> into the address bar of your browser."
22975
#: serverguide/C/databases.xml:296(para)
22977
"Also, see the <ulink "
22978
"url=\"https://help.ubuntu.com/community/PostgreSQL\">PostgreSQL Ubuntu "
22979
"Wiki</ulink> page for more information."
22982
#: serverguide/C/clustering.xml:13(title)
22986
#: serverguide/C/clustering.xml:16(title)
22990
#: serverguide/C/clustering.xml:18(para)
22992
"Distributed Replicated Block Device (DRBD) mirrors block devices between "
22993
"multiple hosts. The replication is transparent to other applications on the "
22994
"host systems. Any block device hard disks, partitions, RAID devices, logical "
22995
"volumes, etc can be mirrored."
22998
#: serverguide/C/clustering.xml:24(para)
23000
"To get started using <application>drbd</application>, first install the "
23001
"necessary packages. From a terminal enter:"
23004
#: serverguide/C/clustering.xml:29(command)
23005
msgid "sudo apt-get install drbd8-utils"
23008
#: serverguide/C/clustering.xml:33(para)
23010
"If you are using the <emphasis>virtual kernel</emphasis> as part of a "
23011
"virtual machine you will need to manually compile the "
23012
"<application>drbd</application> module. It may be easier to install the "
23013
"<application>linux-server</application> package inside the virtual machine."
23016
#: serverguide/C/clustering.xml:40(para)
23018
"This section covers setting up a <application>drbd</application> to "
23019
"replicate a separate <filename>/srv</filename> partition, with an "
23020
"<application>ext3</application> filesystem between two hosts. The partition "
23021
"size is not particularly relevant, but both partitions need to be the same "
23025
#: serverguide/C/clustering.xml:49(para)
23027
"The two hosts in this example will be called <emphasis>drbd01</emphasis> and "
23028
"<emphasis>drbd02</emphasis>. They will need to have name resolution "
23029
"configured either through DNS or the <filename>/etc/hosts</filename> file. "
23030
"See <xref linkend=\"dns\"/> for details."
23033
#: serverguide/C/clustering.xml:57(para)
23035
"To configure <application>drbd</application>, on the first host edit "
23036
"<filename>/etc/drbd.conf</filename>:"
23039
#: serverguide/C/clustering.xml:61(programlisting)
23043
"global { usage-count no; }\n"
23044
"common { syncer { rate 100M; } }\n"
23048
" wfc-timeout 15;\n"
23049
" degr-wfc-timeout 60;\n"
23052
" cram-hmac-alg sha1;\n"
23053
" shared-secret \"secret\";\n"
23056
" device /dev/drbd0;\n"
23057
" disk /dev/sdb1;\n"
23058
" address 192.168.0.1:7788;\n"
23059
" meta-disk internal;\n"
23062
" device /dev/drbd0;\n"
23063
" disk /dev/sdb1;\n"
23064
" address 192.168.0.2:7788;\n"
23065
" meta-disk internal;\n"
23070
#: serverguide/C/clustering.xml:90(para)
23072
"There are many other options in <filename>/etc/drbd.conf</filename>, but for "
23073
"this example their default values are fine."
23076
#: serverguide/C/clustering.xml:98(para)
23077
msgid "Now copy <filename>/etc/drbd.conf</filename> to the second host:"
23080
#: serverguide/C/clustering.xml:103(command)
23081
msgid "scp /etc/drbd.conf drbd02:~"
23084
#: serverguide/C/clustering.xml:109(para)
23086
"And, on <emphasis>drbd02</emphasis> move the file to "
23087
"<filename>/etc</filename>:"
23090
#: serverguide/C/clustering.xml:114(command)
23091
msgid "sudo mv drbd.conf /etc/"
23094
#: serverguide/C/clustering.xml:120(para)
23096
"Next, on both hosts, start the <application>drbd</application> daemon:"
23099
#: serverguide/C/clustering.xml:125(command)
23100
msgid "sudo /etc/init.d/drbd start"
23103
#: serverguide/C/clustering.xml:131(para)
23105
"Now using the <application>drbdadm</application> utility initialize the meta "
23106
"data storage. On each server execute:"
23109
#: serverguide/C/clustering.xml:137(command)
23110
msgid "sudo drbdadm create-md r0"
23113
#: serverguide/C/clustering.xml:143(para)
23115
"On the <emphasis>drbd01</emphasis>, or whichever host you wish to be the "
23116
"primary, enter the following:"
23119
#: serverguide/C/clustering.xml:148(command)
23120
msgid "sudo drbdadm -- --overwrite-data-of-peer primary all"
23123
#: serverguide/C/clustering.xml:154(para)
23125
"After executing the above command, the data will start syncing with the "
23126
"secondary host. To watch the progresss, on <emphasis>drbd02</emphasis> enter "
23130
#: serverguide/C/clustering.xml:160(command)
23131
msgid "watch -n1 cat /proc/drbd"
23134
#: serverguide/C/clustering.xml:163(para)
23135
msgid "To stop watching the output press <emphasis>Ctrl+c</emphasis>."
23138
#: serverguide/C/clustering.xml:170(para)
23140
"Finally, add a filesystem to <filename>/dev/drbd0</filename> and mount it:"
23143
#: serverguide/C/clustering.xml:175(command)
23144
msgid "sudo mkfs.ext3 /dev/drbd0"
23147
#: serverguide/C/clustering.xml:176(command) serverguide/C/clustering.xml:224(command)
23148
msgid "sudo mount /dev/drbd0 /srv"
23151
#: serverguide/C/clustering.xml:186(para)
23153
"To test that the data is actually syncing between the hosts copy some files "
23154
"on the <emphasis>drbd01</emphasis>, the primary, to "
23155
"<filename>/srv</filename>:"
23158
#: serverguide/C/clustering.xml:195(para)
23159
msgid "Next, unmount <filename>/srv</filename>:"
23162
#: serverguide/C/clustering.xml:203(para)
23164
"<emphasis>Demote</emphasis> the <emphasis>primary</emphasis> server to the "
23165
"<emphasis>secondary</emphasis> role:"
23168
#: serverguide/C/clustering.xml:208(command)
23169
msgid "sudo drbdadm secondary r0"
23172
#: serverguide/C/clustering.xml:211(para)
23174
"Now on the <emphasis>secondary</emphasis> server "
23175
"<emphasis>promote</emphasis> it to the <emphasis>primary</emphasis> role:"
23178
#: serverguide/C/clustering.xml:216(command)
23179
msgid "sudo drbdadm primary r0"
23182
#: serverguide/C/clustering.xml:219(para)
23183
msgid "Lastly, mount the partition:"
23186
#: serverguide/C/clustering.xml:227(para)
23188
"Using <emphasis>ls</emphasis> you should see "
23189
"<filename>/srv/default</filename> copied from the former "
23190
"<emphasis>primary</emphasis> host <emphasis>drbd01</emphasis>."
23193
#: serverguide/C/clustering.xml:238(para)
23195
"For more information on <application>DRBD</application> see the <ulink "
23196
"url=\"http://www.drbd.org/\">DRBD web site</ulink>."
23199
#: serverguide/C/clustering.xml:243(para)
23202
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man5/drbd.conf.5.html\">dr"
23203
"bd.conf man page</ulink> contains details on the options not covered in this "
23207
#: serverguide/C/clustering.xml:249(para)
23209
"Also, see the <ulink "
23210
"url=\"http://manpages.ubuntu.com/manpages/lucid/en/man8/drbdadm.8.html\">drbd"
23211
"adm man page</ulink>."
23214
#: serverguide/C/clustering.xml:254(para)
23216
"The <ulink url=\"https://help.ubuntu.com/community/DRBD\">DRBD Ubuntu "
23217
"Wiki</ulink> page also has more information."
23220
#: serverguide/C/chat.xml:13(title)
23221
msgid "Chat Applications"
23222
msgstr "Aplicacions de Chat"
23224
#: serverguide/C/chat.xml:19(para)
23226
"In this section, we will discuss how to install and configure a IRC server, "
23227
"<application>ircd-irc2</application>. We will also discuss how to install "
23228
"and configure Jabber, an instance messaging server."
23231
#: serverguide/C/chat.xml:28(title)
23233
msgstr "Servidor IRC"
23235
#: serverguide/C/chat.xml:30(para)
23237
"The Ubuntu repository has many Internet Relay Chat servers. This section "
23238
"explains how to install and configure the original IRC server "
23239
"<application>ircd-irc2</application>."
23242
#: serverguide/C/chat.xml:39(para)
23244
"To install <application>ircd-irc2</application>, run the following command "
23245
"in the command prompt:"
23248
#: serverguide/C/chat.xml:45(command)
23249
msgid "sudo apt-get install ircd-irc2"
23250
msgstr "sudo apt-get install ircd-irc2"
23252
#: serverguide/C/chat.xml:48(para)
23254
"The configuration files are stored in <filename>/etc/ircd</filename> "
23255
"directory. The documents are available in <filename>/usr/share/doc/ircd-"
23256
"irc2</filename> directory."
23259
#: serverguide/C/chat.xml:59(para)
23261
"The IRC settings can be done in the configuration file "
23262
"<filename>/etc/ircd/ircd.conf</filename>. You can set the IRC host name in "
23263
"this file by editing the following line:"
23266
#: serverguide/C/chat.xml:64(programlisting)
23270
"M:irc.localhost::Debian ircd default configuration::000A\n"
23273
"M:irc.localhost::Debian ircd default configuration::000A\n"
23275
#: serverguide/C/chat.xml:68(para)
23277
"Please make sure you add DNS aliases for the IRC host name. For instance, if "
23278
"you set irc.livecipher.com as IRC host name, please make sure "
23279
"irc.livecipher.com is resolvable in your Domain Name Server. The IRC host "
23280
"name should not be same as the host name."
23283
#: serverguide/C/chat.xml:75(para)
23285
"The IRC admin details can be configured by editting the following line:"
23288
#: serverguide/C/chat.xml:80(programlisting)
23292
"A:Organization, IRC dept.:Daemon <ircd@example.irc.org>:Client "
23293
"Server::IRCnet:\n"
23296
"A:Organization, IRC dept.:Daemon <ircd@example.irc.org>:Client "
23297
"Server::IRCnet:\n"
23299
#: serverguide/C/chat.xml:84(para)
23301
"You should add specific lines to configure the list of IRC ports to listen "
23302
"on, to configure Operator credentials, to configure client authentication, "
23303
"etc. For details, please refer to the example configuration file "
23304
"<filename>/usr/share/doc/ircd-irc2/ircd.conf.example.gz</filename>."
23307
#: serverguide/C/chat.xml:92(para)
23309
"The IRC banner to be displayed in the IRC client, when the user connects to "
23310
"the server can be set in <filename>/etc/ircd/ircd.motd</filename> file."
23313
#: serverguide/C/chat.xml:97(para)
23315
"After making necessary changes to the configuration file, you can restart "
23316
"the IRC server using following command:"
23319
#: serverguide/C/chat.xml:101(programlisting)
23323
"sudo /etc/init.d/ircd-irc2 restart\n"
23326
"sudo /etc/init.d/ircd-irc2 restart\n"
23328
#: serverguide/C/chat.xml:109(para)
23330
"You may also be interested to take a look at other IRC servers available in "
23331
"Ubuntu Repository. It includes, <application>ircd-ircu</application> and "
23332
"<application>ircd-hybrid</application>."
23335
#: serverguide/C/chat.xml:117(para)
23337
"Refer to <ulink url=\"http://www.irc.org/tech_docs/ircnet/faq.html\">IRCD "
23338
"FAQ</ulink> for more details about the IRC Server."
23341
#: serverguide/C/chat.xml:124(para)
23343
"Also, the <ulink url=\"https://help.ubuntu.com/community/ircd\">Ubuntu Wiki "
23344
"IRCD</ulink> page has more information."
23347
#: serverguide/C/chat.xml:132(title)
23348
msgid "Jabber Instant Messaging Server"
23351
#: serverguide/C/chat.xml:134(para)
23353
"<emphasis>Jabber</emphasis> a popular instant message protocol is based on "
23354
"XMPP, an open standard for instant messaging, and used by many popular "
23355
"applications. This section covers setting up a <emphasis>Jabberd "
23356
"2</emphasis> server on a local LAN. This configuration can also be adapted "
23357
"to providing messaging services to users over the Internet."
23360
#: serverguide/C/chat.xml:143(para)
23361
msgid "To install <application>jabberd2</application>, in a terminal enter:"
23364
#: serverguide/C/chat.xml:148(command)
23365
msgid "sudo apt-get install jabberd2"
23366
msgstr "sudo apt-get install jabberd2"
23368
#: serverguide/C/chat.xml:155(para)
23370
"A couple of XML configuration files will be used to configure "
23371
"<application>jabberd2</application> for <emphasis>Berkely DB</emphasis> user "
23372
"authentication. This is a very simple form of authentication. However, "
23373
"<application>jabberd2</application> can be configured to use LDAP, MySQL, "
23374
"Postgresql, etc for for user authentication."
23377
#: serverguide/C/chat.xml:162(para)
23378
msgid "First, edit <filename>/etc/jabberd2/sm.xml</filename> changing:"
23381
#: serverguide/C/chat.xml:166(programlisting)
23385
" <id>jabber.example.com</id>\n"
23388
" <id>jabber.example.com</id>\n"
23390
#: serverguide/C/chat.xml:171(para)
23392
"Replace <emphasis>jabber.example.com</emphasis> with the hostname, or other "
23393
"id, of your server."
23396
#: serverguide/C/chat.xml:176(para)
23397
msgid "Now in the <storage> section change the <driver> to:"
23400
#: serverguide/C/chat.xml:180(programlisting)
23404
" <driver>db</driver>\n"
23407
" <driver>db</driver>\n"
23409
#: serverguide/C/chat.xml:184(para)
23411
"Next, edit <filename>/etc/jabberd2/c2s.xml</filename> in the "
23412
"<emphasis><local></emphasis> section change:"
23415
#: serverguide/C/chat.xml:188(programlisting)
23419
" <id>jabber.example.com</id>\n"
23422
" <id>jabber.example.com</id>\n"
23424
#: serverguide/C/chat.xml:192(para)
23426
"And in the <authreg> section adjust the <module> section to:"
23429
#: serverguide/C/chat.xml:196(programlisting)
23433
" <module>db</module>\n"
23436
" <module>db</module>\n"
23438
#: serverguide/C/chat.xml:200(para)
23440
"Finally, restart <application>jabberd2</application> to enable the new "
23444
#: serverguide/C/chat.xml:205(command)
23445
msgid "sudo /etc/init.d/jabberd2 restart"
23446
msgstr "sudo /etc/init.d/jabberd2 restart"
23448
#: serverguide/C/chat.xml:208(para)
23450
"You should now be able to connect to the server using a Jabber client like "
23451
"<application>Pidgin</application> for example."
23454
#: serverguide/C/chat.xml:213(para)
23456
"The advantage of using Berkeley DB for user data is that after being "
23457
"configured no additional maintenance is required. If you need more control "
23458
"over user accounts and credentials another authentication method is "
23462
#: serverguide/C/chat.xml:225(para)
23464
"The <ulink url=\"http://codex.xiaoka.com/wiki/jabberd2:start\">Jabberd2 Web "
23465
"Site</ulink> contains more details on configuring "
23466
"<application>Jabberd2</application>."
23469
#: serverguide/C/chat.xml:231(para)
23471
"For more authentication options see the <ulink "
23472
"url=\"http://jabberd2.xiaoka.com/wiki/InstallGuide\">Jabberd2 Install "
23476
#: serverguide/C/chat.xml:236(para)
23478
"Also, the <ulink "
23479
"url=\"https://help.ubuntu.com/community/SettingUpJabberServer\">Setting Up "
23480
"Jabber Server Ubuntu Wiki</ulink> page has more information."
23483
#: serverguide/C/backups.xml:13(title)
23485
msgstr "Salvaments"
23487
#: serverguide/C/backups.xml:14(para)
23489
"There are many ways to backup an Ubuntu installation. The most important "
23490
"thing about backups is to develop a <emphasis>backup plan</emphasis> "
23491
"consisting of what to backup, where to back it up to, and how to restore it."
23494
#: serverguide/C/backups.xml:18(para)
23496
"The following sections discuss various ways of accomplishing these tasks."
23499
#: serverguide/C/backups.xml:22(title)
23500
msgid "Shell Scripts"
23501
msgstr "Escriptes Shell"
23503
#: serverguide/C/backups.xml:23(para)
23505
"One of the simplest ways to backup a system is using a <emphasis>shell "
23506
"script</emphasis>. For example, a script can be used to configure which "
23507
"directories to backup, and use those directories as arguments to the "
23508
"<application>tar</application> utility creating an archive file. The archive "
23509
"file can then be moved or copied to another location. The archive can also "
23510
"be created on a remote file system such as an <emphasis>NFS</emphasis> mount."
23513
#: serverguide/C/backups.xml:29(para)
23515
"The <application>tar</application> utility creates one archive file out of "
23516
"many files or directories. <application>tar</application> can also filter "
23517
"the files through compression utilities reducing the size of the archive "
23521
#: serverguide/C/backups.xml:35(title)
23522
msgid "Simple Shell Script"
23523
msgstr "Escript shell simple"
23525
#: serverguide/C/backups.xml:36(para)
23527
"The following shell script uses <application>tar</application> to create an "
23528
"archive file on a remotely mounted NFS file system. The archive filename is "
23529
"determined using additional command line utilities."
23532
#: serverguide/C/backups.xml:40(programlisting)
23537
"####################################\n"
23539
"# Backup to NFS mount script.\n"
23541
"####################################\n"
23543
"# What to backup. \n"
23544
"backup_files=\"/home /var/spool/mail /etc /root /boot /opt\"\n"
23546
"# Where to backup to.\n"
23547
"dest=\"/mnt/backup\"\n"
23549
"# Create archive filename.\n"
23550
"day=$(date +%A)\n"
23551
"hostname=$(hostname -s)\n"
23552
"archive_file=\"$hostname-$day.tgz\"\n"
23554
"# Print start status message.\n"
23555
"echo \"Backing up $backup_files to $dest/$archive_file\"\n"
23559
"# Backup the files using tar.\n"
23560
"tar czf $dest/$archive_file $backup_files\n"
23562
"# Print end status message.\n"
23564
"echo \"Backup finished\"\n"
23567
"# Long listing of files in $dest to check file sizes.\n"
23571
#: serverguide/C/backups.xml:77(para)
23573
"<emphasis>$backup_files:</emphasis> a variable listing which directories you "
23574
"would like to backup. The list should be customized to fit your needs."
23577
#: serverguide/C/backups.xml:83(para)
23579
"<emphasis>$day:</emphasis> a variable holding the day of the week (Monday, "
23580
"Tuesday, Wednesday, etc). This is used to create an archive file for each "
23581
"day of the week, giving a backup history of seven days. There are other ways "
23582
"to accomplish this including other ways using the "
23583
"<application>date</application> utility."
23586
#: serverguide/C/backups.xml:90(para)
23588
"<emphasis>$hostname:</emphasis> variable containing the "
23589
"<emphasis>short</emphasis> hostname of the system. Using the hostname in the "
23590
"archive filename gives you the option of placing daily archive files from "
23591
"multiple systems in the same directory."
23594
#: serverguide/C/backups.xml:97(para)
23595
msgid "<emphasis>$archive_file:</emphasis> the full archive filename."
23596
msgstr "<emphasis>$archive_file :</emphasis> lo nom complet de l'archiu."
23598
#: serverguide/C/backups.xml:102(para)
23600
"<emphasis>$dest:</emphasis> destination of the archive file. The directory "
23601
"needs to be created and in this case <emphasis>mounted</emphasis> before "
23602
"executing the backup script. See <xref linkend=\"network-file-system\"/> for "
23603
"details using <emphasis>NFS</emphasis>."
23606
#: serverguide/C/backups.xml:109(para)
23608
"<emphasis>status messages:</emphasis> optional messages printed to the "
23609
"console using the <application>echo</application> utility."
23612
#: serverguide/C/backups.xml:115(para)
23614
"<emphasis>tar czf $dest/$archive_file $backup_files:</emphasis> the "
23615
"<application>tar</application> command used to create the archive file."
23618
#: serverguide/C/backups.xml:121(para)
23619
msgid "<emphasis>c:</emphasis> creates an archive."
23622
#: serverguide/C/backups.xml:126(para)
23624
"<emphasis>z:</emphasis> filter the archive through the "
23625
"<application>gzip</application> utility compressing the archive."
23628
#: serverguide/C/backups.xml:131(para)
23630
"<emphasis>f:</emphasis> use archive file. Otherwise the "
23631
"<application>tar</application> output will be sent to STDOUT."
23634
#: serverguide/C/backups.xml:138(para)
23636
"<emphasis>ls -lh $dest:</emphasis> optional statement prints a <emphasis>-"
23637
"l</emphasis> long listing in <emphasis>-h</emphasis> human readable format "
23638
"of the destination directory. This is useful for a quick file size check of "
23639
"the archive file. This check should not replace testing the archive file."
23642
#: serverguide/C/backups.xml:145(para)
23644
"This is a simple example of a backup shell script. There are large amount of "
23645
"options that can be included in a backup script. See <xref linkend=\"backup-"
23646
"shellscript-references\"/> for links to resources providing more in depth "
23647
"shell scripting information."
23650
#: serverguide/C/backups.xml:152(title)
23651
msgid "Executing the Script"
23652
msgstr "Execucion de l'escript"
23654
#: serverguide/C/backups.xml:154(title)
23655
msgid "Executing from a Terminal"
23656
msgstr "Execuicon a partir d'un terminal"
23658
#: serverguide/C/backups.xml:155(para)
23660
"The simplest way of executing the above backup script is to copy and paste "
23661
"the contents into a file. <filename>backup.sh</filename> for example. Then "
23662
"from a terminal prompt:"
23665
#: serverguide/C/backups.xml:160(command)
23666
msgid "sudo bash backup.sh"
23667
msgstr "sudo bash backup.sh"
23669
#: serverguide/C/backups.xml:162(para)
23671
"This is a great way to test the script to make sure everything works as "
23675
#: serverguide/C/backups.xml:167(title)
23676
msgid "Executing with cron"
23677
msgstr "Execucion amb cron"
23679
#: serverguide/C/backups.xml:168(para)
23681
"The <application>cron</application> utility can be used to automate the "
23682
"script execution. The <application>cron</application> daemon allows the "
23683
"execution of scripts, or commands, at a specified time and date."
23686
#: serverguide/C/backups.xml:172(para)
23688
"<application>cron</application> is configured through entries in a "
23689
"<filename>crontab</filename> file. <filename>crontab</filename> files are "
23690
"separated into fields:"
23693
#: serverguide/C/backups.xml:176(programlisting)
23697
"# m h dom mon dow command\n"
23700
#: serverguide/C/backups.xml:181(para)
23702
"<emphasis>m:</emphasis> minute the command executes on between 0 and 59."
23705
#: serverguide/C/backups.xml:186(para)
23707
"<emphasis>h:</emphasis> hour the command executes on between 0 and 23."
23710
#: serverguide/C/backups.xml:191(para)
23711
msgid "<emphasis>dom:</emphasis> day of month the command executes on."
23714
#: serverguide/C/backups.xml:196(para)
23716
"<emphasis>mon:</emphasis> the month the command executes on between 1 and 12."
23719
#: serverguide/C/backups.xml:201(para)
23721
"<emphasis>dow:</emphasis> the day of the week the command executes on "
23722
"between 0 and 7. Sunday may be specified by using 0 or 7, both values are "
23726
#: serverguide/C/backups.xml:206(para)
23727
msgid "<emphasis>command:</emphasis> the command to execute."
23730
#: serverguide/C/backups.xml:211(para)
23732
"To add or change entries in a <filename>crontab</filename> file the "
23733
"<application>crontab -e</application> command should be used. Also, the "
23734
"contents of a <filename>crontab</filename> file can be viewed using the "
23735
"<application>crontab -l</application> command."
23738
#: serverguide/C/backups.xml:215(para)
23740
"To execute the <application>backup.sh</application> script listed above "
23741
"using <application>cron</application>. Enter the following from a terminal "
23745
#: serverguide/C/backups.xml:220(command)
23746
msgid "sudo crontab -e"
23747
msgstr "sudo crontab -e"
23749
#: serverguide/C/backups.xml:223(para)
23751
"Using <application>sudo</application> with the <application>crontab -"
23752
"e</application> command edits the <emphasis>root</emphasis> user's crontab. "
23753
"This is necessary if you are backing up directories only the root user has "
23757
#: serverguide/C/backups.xml:228(para)
23758
msgid "Add the following entry to the <filename>crontab</filename> file:"
23761
#: serverguide/C/backups.xml:231(programlisting)
23765
"# m h dom mon dow command\n"
23766
"0 0 * * * bash /usr/local/bin/backup.sh\n"
23769
#: serverguide/C/backups.xml:235(para)
23771
"The <application>backup.sh</application> script will now be executed every "
23775
#: serverguide/C/backups.xml:239(para)
23777
"The <application>backup.sh</application> script will need to be copied to "
23778
"the <filename>/usr/local/bin/</filename> directory in order for this entry "
23779
"to execute properly. The script can reside anywhere on the file system "
23780
"simply change the script path appropriately."
23783
#: serverguide/C/backups.xml:244(para)
23785
"For more in depth <application>crontab</application> options see <xref "
23786
"linkend=\"backup-shellscript-references\"/>."
23789
#: serverguide/C/backups.xml:250(title)
23790
msgid "Restoring from the Archive"
23793
#: serverguide/C/backups.xml:251(para)
23795
"Once an archive has been created it is important to test the archive. The "
23796
"archive can be tested by listing the files it contains, but the best test is "
23797
"to <emphasis>restore</emphasis> a file from the archive."
23800
#: serverguide/C/backups.xml:257(para)
23801
msgid "To see a listing of the archive contents. From a terminal prompt:"
23804
#: serverguide/C/backups.xml:261(command)
23805
msgid "tar -tzvf /mnt/backup/host-Monday.tgz"
23806
msgstr "tar -tzvf /mnt/backup/host-Monday.tgz"
23808
#: serverguide/C/backups.xml:265(para)
23809
msgid "To restore a file from the archive to a different directory enter:"
23812
#: serverguide/C/backups.xml:269(command)
23813
msgid "tar -xzvf /mnt/backup/host-Monday.tgz -C /tmp etc/hosts"
23814
msgstr "tar -xzvf /mnt/backup/host-Monday.tgz -C /tmp etc/hosts"
23816
#: serverguide/C/backups.xml:271(para)
23818
"The <emphasis>-C</emphasis> option to <application>tar</application> "
23819
"redirects the extracted files to the specified directory. The above example "
23820
"will extract the <filename>/etc/hosts</filename> file to "
23821
"<filename>/tmp/etc/hosts</filename>. <application>tar</application> "
23822
"recreates the directory structure that it contains."
23825
#: serverguide/C/backups.xml:276(para)
23827
"Also, notice the leading <emphasis>\"/\"</emphasis> is left off the path of "
23828
"the file to restore."
23831
#: serverguide/C/backups.xml:281(para)
23832
msgid "To restore all files in the archive enter the following:"
23835
#: serverguide/C/backups.xml:285(command)
23839
#: serverguide/C/backups.xml:286(command)
23840
msgid "sudo tar -xzvf /mnt/backup/host-Monday.tgz"
23841
msgstr "sudo tar -xzvf /mnt/backup/host-Monday.tgz"
23843
#: serverguide/C/backups.xml:291(para)
23844
msgid "This will overwrite the files currently on the file system."
23847
#: serverguide/C/backups.xml:300(para)
23849
"For more information on shell scripting see the <ulink "
23850
"url=\"http://tldp.org/LDP/abs/html/\">Advanced Bash-Scripting Guide</ulink>"
23853
#: serverguide/C/backups.xml:305(para)
23855
"The book <ulink url=\"http://safari.samspublishing.com/0672323583\">Teach "
23856
"Yourself Shell Programming in 24 Hours</ulink> is available online and a "
23857
"great resource for shell scripting."
23860
#: serverguide/C/backups.xml:311(para)
23862
"The <ulink url=\"https://help.ubuntu.com/community/CronHowto\">CronHowto "
23863
"Wiki Page</ulink> contains details on advanced "
23864
"<application>cron</application> options."
23867
#: serverguide/C/backups.xml:318(para)
23869
"See the <ulink url=\"http://www.gnu.org/software/tar/manual/index.html\">GNU "
23870
"tar Manual</ulink> for more <application>tar</application> options."
23873
#: serverguide/C/backups.xml:324(para)
23875
"The Wikipedia <ulink "
23876
"url=\"http://en.wikipedia.org/wiki/Backup_rotation_scheme\">Backup Rotation "
23877
"Scheme</ulink> article contains information on other backup rotation schemes."
23880
#: serverguide/C/backups.xml:330(para)
23882
"The shell script uses <application>tar</application> to create the archive, "
23883
"but there many other command line utilities that can be used. For example:"
23886
#: serverguide/C/backups.xml:336(para)
23888
"<ulink url=\"http://www.gnu.org/software/cpio/\">cpio</ulink>: used to copy "
23889
"files to and from archives."
23892
#: serverguide/C/backups.xml:341(para)
23894
"<ulink url=\"http://www.gnu.org/software/coreutils/\">dd</ulink>: part of "
23895
"the <application>coreutils</application> package. A low level utility that "
23896
"can copy data from one format to another"
23899
#: serverguide/C/backups.xml:347(para)
23901
"<ulink url=\"http://www.rsnapshot.org/\">rsnapshot</ulink>: a file system "
23902
"snap shot utility used to create copies of an entire file system."
23905
#: serverguide/C/backups.xml:358(title)
23906
msgid "Archive Rotation"
23909
#: serverguide/C/backups.xml:359(para)
23911
"The shell script in section <xref linkend=\"backup-shellscripts\"/> only "
23912
"allows for seven different archives. For a server whose data doesn't change "
23913
"often this may be enough. If the server has a large amount of data a more "
23914
"robust rotation scheme should be used."
23917
#: serverguide/C/backups.xml:365(title)
23918
msgid "Rotating NFS Archives"
23921
#: serverguide/C/backups.xml:366(para)
23923
"In this section the shell script will be slightly modified to implement a "
23924
"grandfather-father-son rotation scheme (monthly-weekly-daily):"
23927
#: serverguide/C/backups.xml:372(para)
23929
"The rotation will do a <emphasis>daily</emphasis> backup Sunday through "
23933
#: serverguide/C/backups.xml:377(para)
23935
"On Saturday a <emphasis>weekly</emphasis> backup is done giving you four "
23936
"weekly backups a month."
23939
#: serverguide/C/backups.xml:382(para)
23941
"The <emphasis>monthly</emphasis> backup is done on the first of the month "
23942
"rotating two monthly backups based on if the month is odd or even."
23945
#: serverguide/C/backups.xml:388(para)
23946
msgid "Here is the new script:"
23949
#: serverguide/C/backups.xml:391(programlisting)
23954
"####################################\n"
23956
"# Backup to NFS mount script with\n"
23957
"# grandfather-father-son rotation.\n"
23959
"####################################\n"
23961
"# What to backup. \n"
23962
"backup_files=\"/home /var/spool/mail /etc /root /boot /opt\"\n"
23964
"# Where to backup to.\n"
23965
"dest=\"/mnt/backup\"\n"
23967
"# Setup variables for the archive filename.\n"
23968
"day=$(date +%A)\n"
23969
"hostname=$(hostname -s)\n"
23971
"# Find which week of the month 1-4 it is.\n"
23972
"day_num=$(date +%d)\n"
23973
"if (( $day_num <= 7 )); then\n"
23974
" week_file=\"$hostname-week1.tgz\"\n"
23975
"elif (( $day_num > 7 && $day_num <= 14 )); then\n"
23976
" week_file=\"$hostname-week2.tgz\"\n"
23977
"elif (( $day_num > 14 && $day_num <= 21 )); then\n"
23978
" week_file=\"$hostname-week3.tgz\"\n"
23979
"elif (( $day_num > 21 && $day_num < 32 )); then\n"
23980
" week_file=\"$hostname-week4.tgz\"\n"
23983
"# Find if the Month is odd or even.\n"
23984
"month_num=$(date +%m)\n"
23985
"month=$(expr $month_num % 2)\n"
23986
"if [ $month -eq 0 ]; then\n"
23987
" month_file=\"$hostname-month2.tgz\"\n"
23989
" month_file=\"$hostname-month1.tgz\"\n"
23992
"# Create archive filename.\n"
23993
"if [ $day_num == 1 ]; then\n"
23994
"\tarchive_file=$month_file\n"
23995
"elif [ $day != \"Saturday\" ]; then\n"
23996
" archive_file=\"$hostname-$day.tgz\"\n"
23998
"\tarchive_file=$week_file\n"
24001
"# Print start status message.\n"
24002
"echo \"Backing up $backup_files to $dest/$archive_file\"\n"
24006
"# Backup the files using tar.\n"
24007
"tar czf $dest/$archive_file $backup_files\n"
24009
"# Print end status message.\n"
24011
"echo \"Backup finished\"\n"
24014
"# Long listing of files in $dest to check file sizes.\n"
24018
#: serverguide/C/backups.xml:456(para)
24020
"The script can be executed using the same methods as in <xref "
24021
"linkend=\"backup-executing-shellscript\"/>."
24024
#: serverguide/C/backups.xml:459(para)
24026
"It is good practice to take backup media off site in case of a disaster. In "
24027
"the shell script example the backup media is another server providing an NFS "
24028
"share. In all likelihood taking the NFS server to another location would not "
24029
"be practical. Depending upon connection speeds it may be an option to copy "
24030
"the archive file over a WAN link to a server in another location."
24033
#: serverguide/C/backups.xml:465(para)
24035
"Another option is to copy the archive file to an external hard drive which "
24036
"can then be taken off site. Since the price of external hard drives continue "
24037
"to decrease it may be cost affective to use two drives for each archive "
24038
"level. This would allow you to have one external drive attached to the "
24039
"backup server and one in another location."
24042
#: serverguide/C/backups.xml:472(title)
24043
msgid "Tape Drives"
24046
#: serverguide/C/backups.xml:473(para)
24048
"A tape drive attached to the server can be used instead of a NFS share. "
24049
"Using a tape drive simplifies archive rotation, and taking the media off "
24053
#: serverguide/C/backups.xml:477(para)
24055
"When using a tape drive the filename portions of the script aren't needed "
24056
"because the date is sent directly to the tape device. Some commands to "
24057
"manipulate the tape are needed. This is accomplished using "
24058
"<application>mt</application>, a magnetic tape control utility part of the "
24059
"<application>cpio</application> package."
24062
#: serverguide/C/backups.xml:482(para)
24063
msgid "Here is the shell script modified to use a tape drive:"
24066
#: serverguide/C/backups.xml:485(programlisting)
24071
"####################################\n"
24073
"# Backup to tape drive script.\n"
24075
"####################################\n"
24077
"# What to backup. \n"
24078
"backup_files=\"/home /var/spool/mail /etc /root /boot /opt\"\n"
24080
"# Where to backup to.\n"
24081
"dest=\"/dev/st0\"\n"
24083
"# Print start status message.\n"
24084
"echo \"Backing up $backup_files to $dest\"\n"
24088
"# Make sure the tape is rewound.\n"
24089
"mt -f $dest rewind\n"
24091
"# Backup the files using tar.\n"
24092
"tar czf $dest $backup_files\n"
24094
"# Rewind and eject the tape.\n"
24095
"mt -f $dest rewoffl\n"
24097
"# Print end status message.\n"
24099
"echo \"Backup finished\"\n"
24103
#: serverguide/C/backups.xml:519(para)
24105
"The default device name for a SCSI tape drive is "
24106
"<filename>/dev/st0</filename>. Use the appropriate device path for your "
24110
#: serverguide/C/backups.xml:524(para)
24112
"Restoring from a tape drive is basically the same as restoring from a file. "
24113
"Simply rewind the tape and use the device path instead of a file path. For "
24114
"example to restore the <filename>/etc/hosts</filename> file to "
24115
"<filename>/tmp/etc/hosts</filename>:"
24118
#: serverguide/C/backups.xml:529(command)
24119
msgid "mt -f /dev/st0 rewind"
24122
#: serverguide/C/backups.xml:530(command)
24123
msgid "tar -xzf /dev/st0 -C /tmp etc/hosts"
24126
#: serverguide/C/backups.xml:535(title)
24130
#: serverguide/C/backups.xml:536(para)
24132
"<application>Bacula</application> is a backup program enabling you to "
24133
"backup, restore, and verify data across your network. There are Bacula "
24134
"clients for Linux, Windows, and Mac OSX. Making it a cross platform network "
24138
#: serverguide/C/backups.xml:542(para)
24140
"<application>Bacula</application> is made up of several components and "
24141
"services used to manage which files to backup and where to back them up to:"
24144
#: serverguide/C/backups.xml:548(para)
24146
"<application>Bacula Director:</application> a service that controls all "
24147
"backup, restore, verify, and archive operations."
24150
#: serverguide/C/backups.xml:553(para)
24152
"<application>Bacula Console:</application> an application allowing "
24153
"communication with the Director. There are three versions of the Console:"
24156
#: serverguide/C/backups.xml:558(para)
24157
msgid "Text based command line version."
24160
#: serverguide/C/backups.xml:559(para)
24161
msgid "Gnome based GTK+ Graphical User Interface (GUI) interface."
24162
msgstr "Version grafica GTK+ (Gnome)."
24164
#: serverguide/C/backups.xml:560(para)
24165
msgid "wxWidgets GUI interface."
24166
msgstr "Version grafica wxWidgets."
24168
#: serverguide/C/backups.xml:564(para)
24170
"<application>Bacula File:</application> also known as the "
24171
"<application>Bacula Client</application> program. This application is "
24172
"installed on machines to be backed up, and is responsible for the data "
24173
"requested by the Director."
24176
#: serverguide/C/backups.xml:570(para)
24178
"<application>Bacula Storage:</application> the programs that perform the "
24179
"storage and recovery of data to the physical media."
24182
#: serverguide/C/backups.xml:575(para)
24184
"<application>Bacula Catalog:</application> is responsible for maintaining "
24185
"the file indexes and volume databases for all files backed up, enabling "
24186
"quick location and restoration of archived files. The Catalog supports three "
24187
"different databases MySQL, PostgreSQL, and SQLite."
24190
#: serverguide/C/backups.xml:581(para)
24192
"<application>Bacula Monitor:</application> allows the monitoring of the "
24193
"Director, File daemons, and Storage daemons. Currently the Monitor is only "
24194
"available as a GTK+ GUI application."
24197
#: serverguide/C/backups.xml:587(para)
24199
"These services and applications can be run on multiple servers and clients, "
24200
"or they can be installed on one machine if backing up a single disk or "
24204
#: serverguide/C/backups.xml:594(para)
24206
"There are multiple packages containing the different "
24207
"<application>Bacula</application> components. To install Bacula, from a "
24208
"terminal prompt enter:"
24211
#: serverguide/C/backups.xml:599(command)
24212
msgid "sudo apt-get install bacula"
24213
msgstr "sudo apt-get install bacula"
24215
#: serverguide/C/backups.xml:601(para)
24217
"By default installing the <application>bacula</application> package will use "
24218
"a <application>MySQL</application> database for the Catalog. If you want to "
24219
"use SQLite or PostgreSQL, for the Catalog, install <application>bacula-"
24220
"director-sqlite3</application> or <application>bacula-director-"
24221
"pgsql</application> respectively."
24224
#: serverguide/C/backups.xml:607(para)
24226
"During the install process you will be asked to supply credentials for the "
24227
"database <emphasis>administrator</emphasis> and the "
24228
"<emphasis>bacula</emphasis> database <emphasis>owner</emphasis>. The "
24229
"database administrator will need to have the appropriate rights to create a "
24230
"database, see <xref linkend=\"mysql\"/> for more information."
24233
#: serverguide/C/backups.xml:617(para)
24235
"<application>Bacula</application> configuration files are formatted based on "
24236
"<emphasis>resources</emphasis> comprising of <emphasis>directives</emphasis> "
24237
"surrounded by <quote>{}</quote> braces. Each Bacula component has an "
24238
"individual file in the <filename role=\"directory\">/etc/bacula</filename> "
24242
#: serverguide/C/backups.xml:622(para)
24244
"The various <application>Bacula</application> components must authorize "
24245
"themselves to each other. This is accomplished using the "
24246
"<emphasis>password</emphasis> directive. For example, the "
24247
"<emphasis>Storage</emphasis> resource password in the "
24248
"<filename>/etc/bacula/bacula-dir.conf</filename> file must match the "
24249
"<emphasis>Director</emphasis> resource password in "
24250
"<filename>/etc/bacula/bacula-sd.conf</filename>."
24253
#: serverguide/C/backups.xml:628(para)
24255
"By default the backup job named <emphasis>Client1</emphasis> is configured "
24256
"to archive the <application>Bacula</application> Catalog. If you plan on "
24257
"using the server to backup more than one client you should change the name "
24258
"of this job to something more descriptive. To change the name edit "
24259
"<filename>/etc/bacula/bacula-dir.conf</filename>:"
24262
#: serverguide/C/backups.xml:633(programlisting)
24267
"# Define the main nightly save backup job\n"
24268
"# By default, this job will back up to disk in \n"
24270
" Name = \"BackupServer\"\n"
24271
" JobDefs = \"DefaultJob\"\n"
24272
" Write Bootstrap = \"/var/lib/bacula/Client1.bsr\"\n"
24276
#: serverguide/C/backups.xml:644(para)
24278
"The example above changes the job name to <emphasis>BackupServer</emphasis> "
24279
"matching the machine's host name. Replace <quote>BackupServer</quote> with "
24280
"your appropriate hostname, or other descriptive name."
24283
#: serverguide/C/backups.xml:649(para)
24285
"The <emphasis>Console</emphasis> can be used to query the "
24286
"<emphasis>Director</emphasis> about jobs, but to use the Console with a "
24287
"<emphasis>non-root</emphasis> user, the user needs to be in the "
24288
"<emphasis>bacula</emphasis> group. To add a user to the bacula group enter "
24289
"the following from a terminal:"
24292
#: serverguide/C/backups.xml:655(command)
24293
msgid "sudo adduser $username bacula"
24294
msgstr "sudo adduser $username bacula"
24296
#: serverguide/C/backups.xml:658(para)
24298
"Replace <emphasis>$username</emphasis> with the actual username. Also, if "
24299
"you are adding the current user to the group you should log out and back in "
24300
"for the new permissions to take effect."
24303
#: serverguide/C/backups.xml:665(title)
24304
msgid "Localhost Backup"
24307
#: serverguide/C/backups.xml:666(para)
24309
"This section describes how to backup specified directories on a single host "
24310
"to a local tape drive."
24313
#: serverguide/C/backups.xml:671(para)
24315
"First, the <emphasis>Storage</emphasis> device needs to be configured. Edit "
24316
"<filename>/etc/bacula/bacula-sd.conf</filename> add:"
24319
#: serverguide/C/backups.xml:674(programlisting)
24324
" Name = \"Tape Drive\"\n"
24325
" Device Type = tape\n"
24326
" Media Type = DDS-4\n"
24327
" Archive Device = /dev/st0\n"
24328
" Hardware end of medium = No;\n"
24329
" AutomaticMount = yes; # when device opened, read it\n"
24330
" AlwaysOpen = Yes;\n"
24331
" RemovableMedia = yes;\n"
24332
" RandomAccess = no;\n"
24333
" Alert Command = \"sh -c 'tapeinfo -f %c | grep TapeAlert'\"\n"
24338
" Name = \"Tape Drive\"\n"
24339
" Device Type = tape\n"
24340
" Media Type = DDS-4\n"
24341
" Archive Device = /dev/st0\n"
24342
" Hardware end of medium = No;\n"
24343
" AutomaticMount = yes; # when device opened, read it\n"
24344
" AlwaysOpen = Yes;\n"
24345
" RemovableMedia = yes;\n"
24346
" RandomAccess = no;\n"
24347
" Alert Command = \"sh -c 'tapeinfo -f %c | grep TapeAlert'\"\n"
24350
#: serverguide/C/backups.xml:688(para)
24352
"The example is for a <emphasis>DDS-4</emphasis> tape drive. Adjust the Media "
24353
"Type and Archive Device to match your hardware."
24356
#: serverguide/C/backups.xml:691(para)
24357
msgid "You could also uncomment one of the other examples in the file."
24360
#: serverguide/C/backups.xml:696(para)
24362
"After editing <filename>/etc/bacula/bacula-sd.conf</filename> the "
24363
"<application>Storage</application> daemon will need to be restarted:"
24366
#: serverguide/C/backups.xml:701(command)
24367
msgid "sudo /etc/init.d/bacula-sd restart"
24368
msgstr "sudo /etc/init.d/bacula-sd restart"
24370
#: serverguide/C/backups.xml:705(para)
24372
"Now add a <emphasis>Storage</emphasis> resource in "
24373
"<filename>/etc/bacula/bacula-dir.conf</filename> to use the new Device:"
24376
#: serverguide/C/backups.xml:708(programlisting)
24380
"# Definition of \"Tape Drive\" storage device\n"
24382
" Name = TapeDrive\n"
24383
" # Do not use \"localhost\" here \n"
24384
" Address = backupserver # N.B. Use a fully qualified name "
24387
" Password = \"Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyj\"\n"
24388
" Device = \"Tape Drive\"\n"
24389
" Media Type = tape\n"
24393
#: serverguide/C/backups.xml:720(para)
24395
"The <emphasis>Address</emphasis> directive needs to be the Fully Qualified "
24396
"Domain Name (FQDN) of the server. Change <emphasis>backupserver</emphasis> "
24397
"to the actual host name."
24400
#: serverguide/C/backups.xml:724(para)
24402
"Also, make sure the <emphasis>Password</emphasis> directive matches the "
24403
"password string in <filename>/etc/bacula/bacula-sd.conf</filename>."
24406
#: serverguide/C/backups.xml:730(para)
24408
"Create a new <emphasis>FileSet</emphasis>, which will determine what "
24409
"directories to backup, by adding:"
24412
#: serverguide/C/backups.xml:733(programlisting)
24416
"# LocalhostBacup FileSet.\n"
24418
" Name = \"LocalhostFiles\"\n"
24421
" signature = MD5\n"
24422
" compression=GZIP\n"
24430
"# FileSet de sauvegarde de l'hôte local.\n"
24432
" Name = \"LocalhostFiles\"\n"
24435
" signature = MD5\n"
24436
" compression=GZIP\n"
24443
#: serverguide/C/backups.xml:747(para)
24445
"This <emphasis>FileSet</emphasis> will backup the <filename "
24446
"role=\"directory\">/etc</filename> and <filename "
24447
"role=\"directory\">/home</filename> directories. The "
24448
"<emphasis>Options</emphasis> resource directives configure the FileSet to "
24449
"create a MD5 signature for each file backed up, and to compress the files "
24453
#: serverguide/C/backups.xml:754(para)
24454
msgid "Next, create a new <emphasis>Schedule</emphasis> for the backup job:"
24457
#: serverguide/C/backups.xml:757(programlisting)
24461
"# LocalhostBackup Schedule -- Daily.\n"
24463
" Name = \"LocalhostDaily\"\n"
24464
" Run = Full daily at 00:01\n"
24468
"# Planification de la sauvegarde de l'hôte local -- quotidienne.\n"
24470
" Name = \"LocalhostDaily\"\n"
24471
" Run = Full daily at 00:01\n"
24474
#: serverguide/C/backups.xml:764(para)
24476
"The job will run every day at 00:01 or 12:01 am. There are many other "
24477
"scheduling options available."
24480
#: serverguide/C/backups.xml:769(para)
24481
msgid "Finally create the <emphasis>Job</emphasis>:"
24482
msgstr "Per acabar, creatz lo <emphasis>prètzfach</emphasis> :"
24484
#: serverguide/C/backups.xml:772(programlisting)
24488
"# Localhost backup.\n"
24490
" Name = \"LocalhostBackup\"\n"
24491
" JobDefs = \"DefaultJob\"\n"
24494
" FileSet = \"LocalhostFiles\"\n"
24495
" Schedule = \"LocalhostDaily\"\n"
24496
" Storage = TapeDrive\n"
24497
" Write Bootstrap = \"/var/lib/bacula/LocalhostBackup.bsr\"\n"
24501
"# salvament de l'òste local.\n"
24503
" Name = \"LocalhostBackup\"\n"
24504
" JobDefs = \"DefaultJob\"\n"
24507
" FileSet = \"LocalhostFiles\"\n"
24508
" Schedule = \"LocalhostDaily\"\n"
24509
" Storage = TapeDrive\n"
24510
" Write Bootstrap = \"/var/lib/bacula/LocalhostBackup.bsr\"\n"
24513
#: serverguide/C/backups.xml:785(para)
24515
"The job will do a <emphasis>Full</emphasis> backup every day to the tape "
24519
#: serverguide/C/backups.xml:790(para)
24521
"Each tape used will need to have a <emphasis>Label</emphasis>. If the "
24522
"current tape does not have a label <application>Bacula</application> will "
24523
"send an email letting you know. To label a tape using the "
24524
"<application>Console</application> enter the following from a terminal:"
24527
#: serverguide/C/backups.xml:796(command)
24531
#: serverguide/C/backups.xml:800(para)
24532
msgid "At the Bacula Console prompt enter:"
24535
#: serverguide/C/backups.xml:804(command)
24539
#: serverguide/C/backups.xml:808(para)
24541
"You will then be prompted for the <emphasis>Storage</emphasis> resource:"
24544
#: serverguide/C/backups.xml:818(userinput)
24549
#: serverguide/C/backups.xml:812(computeroutput)
24553
"Automatically selected Catalog: MyCatalog\n"
24554
"Using Catalog \"MyCatalog\"\n"
24555
"The defined Storage resources are:\n"
24558
"Select Storage resource (1-2):<placeholder-1/>\n"
24561
"Automatically selected Catalog: MyCatalog\n"
24562
"Using Catalog \"MyCatalog\"\n"
24563
"The defined Storage resources are:\n"
24566
"Select Storage resource (1-2):<placeholder-1/>\n"
24568
#: serverguide/C/backups.xml:823(para)
24569
msgid "Enter the new <emphasis>Volume</emphasis> name:"
24572
#: serverguide/C/backups.xml:828(userinput)
24577
#: serverguide/C/backups.xml:827(computeroutput)
24581
"Enter new Volume name: <placeholder-1/>\n"
24587
"Enter new Volume name: <placeholder-1/>\n"
24592
#: serverguide/C/backups.xml:833(para)
24593
msgid "Replace <emphasis>Sunday</emphasis> with the desired label."
24594
msgstr "Remplaçatz <emphasis>dimenge</emphasis> per l'etiqueta desirada."
24596
#: serverguide/C/backups.xml:838(para)
24597
msgid "Now, select the <emphasis>Pool</emphasis>:"
24598
msgstr "Seleccionatz ara lo <emphasis>pool</emphasis>:"
24600
#: serverguide/C/backups.xml:843(userinput)
24605
#: serverguide/C/backups.xml:842(computeroutput)
24609
"Select the Pool (1-2): <placeholder-1/>\n"
24610
"Connecting to Storage daemon TapeDrive at backupserver:9103 ...\n"
24611
"Sending label command for Volume \"Sunday\" Slot 0 ...\n"
24614
"Select the Pool (1-2): <placeholder-1/>\n"
24615
"Connecting to Storage daemon TapeDrive at backupserver:9103 ...\n"
24616
"Sending label command for Volume \"Sunday\" Slot 0 ...\n"
24618
#: serverguide/C/backups.xml:850(para)
24620
"Congratulations, you have now configured <emphasis>Bacula</emphasis> to "
24621
"backup the localhost to an attached tape drive."
24623
"Felicitacions, venètz de configurar <emphasis>Bacula</emphasis> per salvar "
24624
"l'òste local cap a un lector de benda connectat."
24626
#: serverguide/C/backups.xml:858(para)
24628
"For more <emphasis>Bacula</emphasis> configuration options refer to the "
24629
"<ulink url=\"http://www.bacula.org/en/rel-manual/index.html\">Bacula User's "
24632
"Per mai d'opcions de configuracion de <emphasis>Bacula</emphasis>, "
24633
"referissètz-vos al <ulink url=\"http://www.bacula.org/en/rel-"
24634
"manual/index.html\">Manual de l'utilizaire Bacula</ulink> (en anglés)"
24636
#: serverguide/C/backups.xml:864(para)
24638
"The <ulink url=\"http://www.bacula.org/\">Bacula Home Page</ulink> contains "
24639
"the latest Bacula news and developments."
24641
"La <ulink url=\"http://www.bacula.org/\">pagina d'acuèlh de Bacula</ulink> "
24642
"conten las darrièras informacions e versions de desvolopament."
24644
#: serverguide/C/backups.xml:869(para)
24646
"Also, see the <ulink url=\"https://help.ubuntu.com/community/Bacula\">Bacula "
24647
"Ubuntu Wiki</ulink> page."
24650
#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2
24651
#: serverguide/C/backups.xml:0(None)
24652
msgid "translator-credits"
24654
"Launchpad Contributions:\n"
24655
" Cédric VALMARY (Per Tot en òc) https://launchpad.net/~cvalmary\n"
24656
" Yannig MARCHEGAY (Kokoyaya) https://launchpad.net/~yannick-marchegay"
24658
#~ msgid "Ethernet"
24659
#~ msgstr "Ethernet"