The Official Ubuntu Server Book / Edition 2
  • The Official Ubuntu Server Book / Edition 2
  • The Official Ubuntu Server Book / Edition 2

The Official Ubuntu Server Book / Edition 2

5.0 1
by Kyle Rankin, Benjamin Hill
     
 

Ubuntu Server is a complete, free server operating system that just works, with the extra Ubuntu polish, innovation, and simplicity that administrators love.

Now, there’s a definitive, authoritative guide to getting up-and-running quickly with the newest, most powerful versions of Ubuntu Server. Written by leading members of the Ubuntu community,

See more details below

Overview

Ubuntu Server is a complete, free server operating system that just works, with the extra Ubuntu polish, innovation, and simplicity that administrators love.

Now, there’s a definitive, authoritative guide to getting up-and-running quickly with the newest, most powerful versions of Ubuntu Server. Written by leading members of the Ubuntu community, The Official Ubuntu Server Book, Second Edition, covers all you need to know to make the most of Ubuntu Server, whether you’re a beginner or a battle-hardened senior system administrator.

The authors cover Ubuntu Server from start to finish: installation, basic administration and monitoring, security, backup, troubleshooting, system rescue, and much more. They walk through deploying each of the most common server applications, from file and print services to state-of-the-art, cost-saving virtualization and cloud computing.

In addition, you’ll learn how to

  • Make the most of Ubuntu Server’s latest, most powerful technologies
  • Discover easy, fast ways to perform key administration tasks
  • Automate Ubuntu installs, no matter how many servers you’re installing
  • Quickly set up low-cost Web servers and e-mail
  • Protect your server with Ubuntu’s built-in and optional security tools
  • Minimize downtime with fault tolerance and clustering
  • Master proven, step-by-step server and network troubleshooting techniques
  • Walk through rescuing an Ubuntu server that won’t boot
  • Create your own private cloud computing infrastructure

The included disks contain the versions of Ubuntu Server you’ll need for different CPU architectures: Ubuntu Server 10.04 LTS 64-bit CD, and Ubuntu 10.04 LTS 32-bit DVD, both of which are supported by Canonical for five years.

Read More

Product Details

ISBN-13:
9780137081332
Publisher:
Prentice Hall
Publication date:
08/22/2010
Pages:
533
Sales rank:
1,194,801
Product dimensions:
7.00(w) x 9.10(h) x 1.40(d)

Related Subjects

Table of Contents

Preface

Acknowledgments

About the Authors

Introduction

Welcome to Ubuntu Server

Free Software, Open Source, and Linux

Free Software and GNU

Linux

Open Source

A Brief History of the Ubuntu Project

Mark Shuttleworth

The Warthogs

What Does Ubuntu Mean?

Creating Canonical

The Ubuntu Community

Ubuntu Promises and Goals

Philosophical Goals

Conduct Goals and Code of Conduct

Technical Goals

Canonical and the Ubuntu Foundation

Canonical, Ltd.

Canonical's Service and Support

The Ubuntu Foundation 1

History of Ubuntu Server

Simple, Secure, Supported

Chapter 1 Installation 1

Get Ubuntu 2

Boot Screen 3

Disk Partitioning 5

What Is a Partition? 5

Guided---Use Entire Disk 8

Guided with LVM 8

Manual 8

Server Roles 13

Installer Console 15

Reboot the System 16

Chapter 2 Essential System Administration 17

Basic Command-Line Administration 18

Move Around the System 18

File Ownership 21

Check Running Processes 21

Edit Files 23

Become Root 24

Ubuntu Boot Process 24

GRUB 25

The Kernel Boot Process 26

/sbin/init 27

Services 34

File System Hierarchy 39

Networking 45

Network Configuration Files 46

Core Networking Programs 48

Chapter 3 Package Management 51

Introduction to Package Management 52

Background on Packages 53

What Are Packages? 53

Basic Functions of Package Management 55

Advanced Functions of Package Management Systems 58

Debian Packages 60

Source Packages 60

Binary Packages 63

Package Management in Ubuntu 63

Staying Up-to-Date 64

Searching and Browsing 65

Installation and Removal 67

Manipulating Installed Packages 69

Manipulating Repositories 71

Ubuntu Default Repositories 73

Using Other Repositories 74

Upgrading a Whole System 75

Mirroring a System 76

Making Your Own Packages 77

Rebuilding Packages 77

New Upstream Versions 79

Building Packages from Scratch 80

Hosting Your Own Packages 81

Chapter 4 Automated Ubuntu Installs 83

Preseeding 84

Basic Preseed Configuration for CD-ROM 85

Networking Options 89

Partitioning 91

Packages and Mirrors 96

User Settings 98

GRUB 99

Miscellaneous 100

Dynamic Preseeding 100

Kickstart 104

Basic Kickstart Configuration for CD-ROM 104

Changes and Limitations in Ubuntu Kickstart 108

Run Custom Commands during the Install 110

PXE Boot Server Deployment 111

DHCP 112

TFTPD 113

Configure Pxelinux 113

Web 116

Test Your PXE Server 116

Customize Automated Installs 118

Multiple Kickstart Files 118

Boot Cheat Codes 119

DHCP Selection 121

DHCP Selection by Subnet 123

Chapter 5 Guide to Common Ubuntu Servers 125

DNS Server 126

Install BIND 127

Ubuntu Conventions 127

Caching Name Server 129

DNS Master 129

DNS Slave 132

Manage BIND with rndc 134

Web Server 135

Install a Web Server 135

Ubuntu Apache Conventions 136

apache2ctl 139

Apache Documentation 141

WordPress, a Sample LAMP Environment 141

Mail Server 144

Install Postfix 144

Postfix Configuration Types 145

Ubuntu Postfix Conventions 146

Administering Postfix 148

Default Postfix Example 150

Secondary Mail Server 153

Greylisting Mail Server 154

POP/IMAP Server 156

Enable Maildirs on Postfix 156

Install Dovecot 157

Ubuntu Dovecot Conventions 158

OpenSSH Server 158

Ubuntu OpenSSH Conventions 159

DHCP Server 160

Install DHCP 160

Ubuntu DHCP Conventions 161

Configure DHCP 161

Database Server 163

MySQL 163

PostgreSQL 169

File Server 172

Samba 174

NFS 177

Edubuntu and LTSP 179

What Is LTSP? 180

Technical Details of the LTSP Boot Process 181

The Benefits of LTSP 182

Other Uses 183

LTSP Availability in Ubuntu 183

Installing an LTSP Server 183

LTSP Server Configurations 184

The Installation Procedure 186

Initial LTSP Server Setup 188

Initial LTSP Client Setup 189

Installing the LTSP Environment in Ubuntu or on a Desktop Installation 190

Special LTSP Cases 191

Changing Your IP Address 194

Local Devices over LTSP 195

Sound over LTSP 197

Chapter 6 Security 199

General Security Principles 200

Sudo 201

Configure sudo 203

sudo Aliases 205

AppArmor 206

AppArmor Profiles 207

Enforce and Complain Modes 209

Ubuntu AppArmor Conventions 210

SSH Security 210

sshd_config 211

Key-Based Authentication 211

SSH Brute-Force Attacks 213

Firewalls 214

ufw Commands 216

ufw Rule Syntax 217

Extended ufw Rules 218

ufw Examples 220

Ubuntu ufw Conventions 224

Intrusion Detection 226

Update Tripwire Policy 227

Initialize the Tripwire Database 228

Update the Tripwire Database 230

Ubuntu Tripwire Conventions 231

Incident Response 232

Do You Prosecute? 233

Pull the Plug 233

Image the Server 233

Server Redeployment 234

Forensics 235

Chapter 7 Backups 237

Backup Principles 238

Drive Imaging 240

Database Backups 242

MySQL 242

PostgreSQL 246

BackupPC 247

BackupPC Storage 248

Default BackupPC Configuration 249

Configure the Client Machine 252

Add the Client to BackupPC 253

Start the First Backup Job 254

rsync Tweaks 256

Restore Files 261

Ubuntu BackupPC Conventions 263

Chapter 8 Monitoring 265

Local Monitoring Tools 266

Smartmontools 266

sysstat 267

Ganglia 271

Install ganglia-monitor on All Hosts 272

Configure Ganglia Server 274

Install the Ganglia Web Front End 276

Nagios 278

Install GroundWork 279

GroundWork File Conventions 280

Initial Configuration 281

Configure Nagios 284

Commit Changes to Nagios 287

Configure Contact List 287

Enable Notifications for Nagios 288

Add a Service Check to a Host 289

Add a New Host 289

Advanced Configuration 290

More GroundWork Information 294

Chapter 9 Virtualization 295

KVM 296

Install KVM 296

Enable Support in BIOS 297

Install KVM Packages 297

Configure KVM Networking 298

Create a New VM 300

Extra vmbuilder Options 304

Manage VMs with virsh 307

KVM Graphical Console and Management Tools 310

VM ware Server 313

Install VMware Server 313

Configure VMware Server 315

VMware Server Init Scripts 316

VMware Web Administration 317

Create a New Virtual Machine 318

VM Console Access 320

Snapshots 321

Suspend 322

Local VM Storage 322

Virtual Appliances 324

Ubuntu Enterprise Cloud 324

UEC System Requirements 325

Install UEC Front-End Server 326

Install UEC Node Server 326

Manage Your Cloud 326

Install a New Server Image 328

Start a New Instance 329

Chapter 10 Fault Tolerance 333

Fault Tolerance Principles 334

RAID 335

RAID Levels 336

Configure RAID during Installation 337

Configure RAID after Installation 340

Software RAID Management 343

Migrate Non-RAID to Software RAID 346

Migrate from RAID 1 to RAID 5 351

Add a Drive to a RAID 5 Array 358

LVM 361

The Story of the Logical Volume Manager 361

LVM Theory and Jargon 362

Setting Up LVM 363

Ethernet Bonding 364

Clusters 369

Heartbeat 371

DRBD 379

Chapter 11 Troubleshooting 391

General Troubleshooting Philosophy 392

Divide the Problem Space 392

Favor Quick, Simple Tests over Slow, Complex Tests 393

Favor Past Solutions 393

Good Communication Is Critical When Collaborating 394

Understand How Systems Work 394

Document Your Problems and Solutions 394

Use the Internet, but Carefully 395

Resist Rebooting 395

Localhost Troubleshooting 395

Host Is Sluggish or Unresponsive 396

Out of Disk Space 405

Network Troubleshooting 408

Server A Can't Talk to Server B 408

Can I Route to the Remote Host? 413

Test the Remote Host Locally 416

Hardware Troubleshooting 417

Network Card Errors 417

Test Hard Drives 418

Test RAM 419

Chapter 12 Rescue and Recovery 421

Ubuntu Recovery Mode 422

File Systems Won't Mount 424

Problem Init Scripts 426

Reset Passwords 427

Ubuntu Server Recovery CD 427

Boot into the Recovery CD 428

Recover GRUB 430

Repair the Root File System 430

Ubuntu Desktop Live CD 431

Boot the Live CD 431

Add the Universe Repository 431

Recover Deleted Files 432

Restore the Partition Table 435

Rescue Dying Drives 436

Chapter 13 Help and Resources 441

Paid Support from Canonical 442

Forums 443

Internet Relay Chat 444

Mailing Lists 447

Online Documentation 448

Localhost Documentation 449

Local Community Teams 450

Other Languages 451

Tech Answers System (Launchpad) 451

Bug Reporting 451

Summary 453

Chapter 14 Basic Linux Administration 455

Shell Globs 456

Regular Expressions 457

Pipes and Redirection 458

Pipes 458

Redirection 462

File Permissions and Ownership 464

chmod 466

Linux File Types 466

Symbolic Links 467

Hard Links 468

Device Files 469

At and Cron 470

At 470

Cron 472

Appendix Cool Tips and Tricks 477

Avoid That grep Command in grep Output 477

Shortcut to a Command Path 478

Wipe a Drive in One Line 478

Run a Command Over and Over 479

Make a Noise When the Server Comes Back Up 479

Search and Replace Text in a File 479

find and exec Commands 480

Bash Commands with Too Many Arguments 480

Use Your Bash History 481

Are These Files Identical? 481

Go Back to Your Previous Directory 481

Find Out Who Is Tying Up a File System You Want to Unmount 482

Send a Test E-mail Using telnet 482

Easy SSH Key Sharing 483

Get the Most Out of Dig 484

Index 487

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >