Ubuntu 15.04 Server with systemd: Administration and Reference
to
Larisa and Aleina
Ubuntu 15.04 Server with systemd: Administration and Reference
Richard Petersen
Surfing Turtle Press
Alameda, CA
www.surfingturtlepress.com
Please send inquires to:
ISBN-13 978-1-936280-97-1
ISBN 1-936280-97-3
Copyright Richard Petersen, 2015
All rights reserved
Copyright 2015 by Richard Petersen. All rights reserved. Printed in the United States of America.
Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication.,
Information has been obtained by Surfing Turtle Press from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, Surfing Turtle Press, the author Richard Petersen, or others, Surfing Turtle Press does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from use of such information.
Limit of Liability and Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. The information and code in this book is provided on "as is" basis. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained here in may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. Surfing Turtle Press and anyone else who has been involved in the creation or production of the included code cannot and do not warrant the performance or results that may be obtained by using the code.
Trademark Acknowledgements
UNIX is a trademark of The Open Group
Microsoft and MS-DOS are registered trademarks of Microsoft Corporation
IBM and PC are registered trademarks of the International Business Machines Corporation
UNIX is a trademark of The Open Group
Ubuntu is a trademark of Ubuntu Linux.
and are trademarks of Ubuntu
The Ubuntu Font Family provides libre/open fonts (TTF) for Ubuntu, http://font.ubuntu.com/
See www.ubuntu.com for more information
is a trademark of Surfing Turtle Press
Preface
This book is designed as an Ubuntu 15.04 Server administration and reference source, covering the Ubuntu servers and their support applications. Server tools are covered as well as the underlying configuration files and system implementations. The emphasis is on what administrators will need to know to perform key server support and management tasks. Coverage of the systemd service management system is integrated into the book, replacing the deprecated Upstart system. Topics covered include software management, systemd service management, AppArmor security, OpenSSH, and the Network Time Protocol. Key servers are examined, including Web, FTP, CUPS printing, NFS, and Samba Windows shares. Network support servers and applications covered include the Squid proxy server, the Domain Name System (BIND) server, DHCP, distributed network file systems, IPtables firewalls, and cloud computing.
The book is organized into five parts: getting started, services, shared resources, network support, and shells.
Part 1 focuses on basic tasks such as installing the Ubuntu Server CD, managing software from the Ubuntu repository, and basic usage for the desktop and the command line interfaces.
Part 2 examines Internet servers as well as how services are managed by systemd using unit files. Configuration and implementation of the Postfix mail server, the vsftpd FTP server, the Apache Web server, as well as news and database servers are covered in detail.
Part 3 deals with servers that provide shared resources on a local network or the Internet. Services examined include the CUPS printing server, NFS Linux network file server, and Samba Windows file and printing server, the GFS distributed file system, and cloud computing services supported by Ubuntu.
Part 4 covers servers that provide network support, like the Squid proxy server, the Bind Domain Name System (DNS) server, DHCP servers, and the IPtables and FirewallD firewalls. Key networking operations are also examined like IPv6 auto-configuration, TPC/IP networking, and network monitoring tools.
Part 5 provides a review of shell commands, including those used for managing files, as well as shell scripts, variables, and configuration files. The Ubuntu Server CD only installs a command line interface, with no desktop. To manage your system and its files you will need to know the shell commands.
Overview
Contents
Part 1: Getting Started
1. Introduction to Ubuntu Linux
Ubuntu Linux is currently one of the most popular end-user Linux distributions ( www.ubuntu.com ). Ubuntu Linux is managed by the Ubuntu foundation, which is sponsored by Canonical, Ltd ( www.canonical.com ), a commercial organization that supports and promotes open source projects. Ubuntu is based on Debian Linux, one of the oldest Linux distributions, which is dedicated to incorporating cutting-edge developments and features ( www.debian.org ). Mark Shuttleworth, a South African and Debian Linux developer, initiated the Ubuntu project. Debian Linux is primarily a Linux development project, trying out new features. Ubuntu provides a Debian-based Linux distribution that is stable, reliable, and easy to use.
Ubuntu is designed as a Linux operating system that can be used easily by everyone. The name Ubuntu means "humanity to others." As the Ubuntu project describes it: "Ubuntu is an African word meaning 'Humanity to others", or "I am what I am because of who we all are." The Ubuntu distribution brings the spirit of Ubuntu to the software world."
The official Ubuntu philosophy lists the following principles.
- Every computer user should have the freedom to download, run, copy, distribute study, share, change, and improve their software for any purpose, without paying licensing fees.
- Every computer user should be able to use their software in the language of their choice.
- Every computer user should be given every opportunity to use software, even if they work under a disability.
The emphasis on language reflects Ubuntu's international scope. It is meant to be a global distribution that does not focus on any single market. Language support has been integrated into Linux in general by its internationalization projects, denoted by the term i18n. You can find information about il8n at http://www.openi18n.org .
Making software available to all users involves both full accessibility supports for users with disabilities, as well as seamless integration of software access using online repositories, making massive amounts of software available to all users at the touch of a button. Ubuntu also makes full use of Linux's automatic device detection ability, greatly simplifying installation as well as access to removable devices and attached storage.
Next page