Ubuntu Server Guide

Ubuntu Server Guide

Ubuntu Server Guide

Copyright ? 2016 Contributors to the document Abstract

Welcome to the Ubuntu Server Guide! It contains information on how to install and configure various server applications on your Ubuntu system to fit your needs. It is a step-by-step, task-oriented guide for configuring and customizing your system.

Credits and License

This document is maintained by the Ubuntu documentation team (). A list of contributors is below. This document is made available under the Creative Commons ShareAlike 3.0 License (CC-BY-SA). You are free to modify, extend, and improve the Ubuntu documentation source code under the terms of this license. All derivative works must be released under this license. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE AS DESCRIBED IN THE DISCLAIMER. A copy of the license is available here: Creative Commons ShareAlike License1. Contributors to this document are: ? Members of the Ubuntu Documentation Project2 ? Members of the Ubuntu Server Team3 ? Contributors to the Community Help Wiki4 ? Other contributors can be found in the revision history of the serverguide5 and ubuntu-docs6 bzr branches available on Launchpad.

1 2 3 4 5 6

Table of Contents

1. Introduction ........................................................................................................................................ 1 1. Support ...................................................................................................................................... 2

2. Installation .......................................................................................................................................... 3 1. Preparing to Install ..................................................................................................................... 4 2. Installation .................................................................................................................................. 6 3. Upgrading .................................................................................................................................. 9 4. Advanced Installation ................................................................................................................ 10 5. Kernel Crash Dump .................................................................................................................. 19

3. Package Management ........................................................................................................................ 25 1. Introduction .............................................................................................................................. 26 2. dpkg ......................................................................................................................................... 27 3. Apt ........................................................................................................................................... 28 4. Aptitude ................................................................................................................................... 30 5. Automatic Updates ................................................................................................................... 32 6. Configuration ............................................................................................................................ 34 7. References ................................................................................................................................ 36

4. Networking ....................................................................................................................................... 37 1. Network Configuration .............................................................................................................. 38 2. TCP/IP ..................................................................................................................................... 47 3. Dynamic Host Configuration Protocol (DHCP) .......................................................................... 51 4. Time Synchronisation ............................................................................................................... 54 5. Data Plane Development Kit ..................................................................................................... 57

5. DM-Multipath ................................................................................................................................... 72 1. Device Mapper Multipathing ..................................................................................................... 73 2. Multipath Devices ..................................................................................................................... 76 3. Setting up DM-Multipath Overview ........................................................................................... 79 4. The DM-Multipath Configuration File ....................................................................................... 83 5. DM-Multipath Administration and Troubleshooting .................................................................... 95

6. Remote Administration .................................................................................................................... 100 1. OpenSSH Server ..................................................................................................................... 101 2. Puppet .................................................................................................................................... 104 3. Zentyal ................................................................................................................................... 107

7. Network Authentication ................................................................................................................... 111 1. OpenLDAP Server .................................................................................................................. 112 2. Samba and LDAP ................................................................................................................... 137 3. Kerberos ................................................................................................................................. 143 4. Kerberos and LDAP ................................................................................................................ 151 5. SSSD and Active Directory ..................................................................................................... 158

8. Domain Name Service (DNS) ......................................................................................................... 163 1. Installation .............................................................................................................................. 164

iii

Ubuntu Server Guide

2. Configuration .......................................................................................................................... 165 3. Troubleshooting ...................................................................................................................... 171 4. References .............................................................................................................................. 175 9. Security .......................................................................................................................................... 176 1. User Management ................................................................................................................... 177 2. Console Security ..................................................................................................................... 183 3. Firewall .................................................................................................................................. 184 4. AppArmor .............................................................................................................................. 191 5. Certificates ............................................................................................................................. 195 6. eCryptfs .................................................................................................................................. 200 10. Monitoring .................................................................................................................................... 202 1. Overview ................................................................................................................................ 203 2. Nagios .................................................................................................................................... 204 3. Munin ..................................................................................................................................... 208 11. Web Servers ................................................................................................................................. 210 1. HTTPD - Apache2 Web Server ............................................................................................... 211 2. PHP - Scripting Language ....................................................................................................... 218 3. Squid - Proxy Server .............................................................................................................. 220 4. Ruby on Rails ......................................................................................................................... 223 5. Apache Tomcat ....................................................................................................................... 225 12. Databases ...................................................................................................................................... 229 1. MySQL .................................................................................................................................. 230 2. PostgreSQL ............................................................................................................................ 235 13. LAMP Applications ...................................................................................................................... 238 1. Overview ................................................................................................................................ 239 2. Moin Moin ............................................................................................................................. 240 3. phpMyAdmin .......................................................................................................................... 242 4. WordPress .............................................................................................................................. 244 14. File Servers ................................................................................................................................... 246 1. FTP Server ............................................................................................................................. 247 2. Network File System (NFS) .................................................................................................... 251 3. iSCSI Initiator ........................................................................................................................ 253 4. CUPS - Print Server ............................................................................................................... 256 15. Email Services .............................................................................................................................. 259 1. Postfix .................................................................................................................................... 260 2. Exim4 ..................................................................................................................................... 268 3. Dovecot Server ....................................................................................................................... 271 4. Mailman ................................................................................................................................. 273 5. Mail Filtering .......................................................................................................................... 279 16. Chat Applications .......................................................................................................................... 286 1. Overview ................................................................................................................................ 287 2. IRC Server ............................................................................................................................. 288

iv

Ubuntu Server Guide

3. Jabber Instant Messaging Server .............................................................................................. 290 17. Version Control System ................................................................................................................ 292

1. Bazaar .................................................................................................................................... 293 2. Git .......................................................................................................................................... 294 3. Subversion .............................................................................................................................. 297 4. References .............................................................................................................................. 302 18. Samba ........................................................................................................................................... 303 1. Introduction ............................................................................................................................ 304 2. File Server .............................................................................................................................. 305 3. Print Server ............................................................................................................................ 308 4. Securing File and Print Server ................................................................................................. 310 5. As a Domain Controller .......................................................................................................... 315 6. Active Directory Integration .................................................................................................... 319 19. Backups ........................................................................................................................................ 321 1. Shell Scripts ........................................................................................................................... 322 2. Archive Rotation ..................................................................................................................... 326 3. Bacula .................................................................................................................................... 329 20. Virtualization ................................................................................................................................ 334 1. libvirt ..................................................................................................................................... 335 2. Qemu ..................................................................................................................................... 342 3. Cloud images and uvtool ......................................................................................................... 344 4. Ubuntu Cloud ......................................................................................................................... 348 5. LXD ....................................................................................................................................... 349 6. LXC ....................................................................................................................................... 360 21. Control Groups ............................................................................................................................. 375 1. Overview ................................................................................................................................ 376 2. Filesystem .............................................................................................................................. 377 3. Delegation .............................................................................................................................. 378 4. Manager ................................................................................................................................. 379 5. Resources ............................................................................................................................... 380 22. Clustering ..................................................................................................................................... 381 1. DRBD .................................................................................................................................... 382 23. VPN ............................................................................................................................................. 385 1. OpenVPN ............................................................................................................................... 386 24. Other Useful Applications ............................................................................................................. 400 1. pam_motd ............................................................................................................................... 401 2. etckeeper ................................................................................................................................ 403 3. Byobu ..................................................................................................................................... 405 A. Appendix ....................................................................................................................................... 407 1. Reporting Bugs in Ubuntu Server Edition ................................................................................ 408

v

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download