Pro Linux System Administration

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

We can all be Linux experts, provided we invest the time in learning the craft of Linux administration. Pro Linux System Administration makes it easy for small to medium–sized businesses to enter the world of zero–cost software running on Linux and covers all the distros you might want to use, including Red Hat, Ubuntu, Debian, and CentOS. Authors, and systems infrastructure experts James Turnbull, Peter Lieverdink, and Dennis Matotek take a layered, component–based approach to open source business systems, while training system administrators as the builders of business infrastructure.

If you want to implement a SOHO or SMB Linux infrastructure, Pro Linux System Administration clearly demonstrates everything you need. You’ll find this book also provides a solid framework to move forward and expand your business and associated IT capabilities, and you’ll benefit from the expertise and experienced guidance of the authors. Pro Linux System Administration covers

  • An introduction to using Linux and free and open source software to cheaply and efficiently manage your business
  • A layered model that allows your infrastructure to grow with your business
  • Easy and simple–to–understand instructions including configurations, examples, and extensive real–world hints and tips

What you’ll learn

This book will explain and demonstrate

  • Linux architecture
  • How to build, back up, and recover Linux servers
  • Creating basic networks and network services with Linux
  • Building and implementing Linux infrastructure and services including mail, web, databases, and file and print
  • Implementing Linux security
  • Understanding Linux performance and capacity planning issues

Who is this book for

This book is for small to medium–sized business owners looking to run their own IT, system administrators considering migrating to Linux, and IT systems integrators looking for an extensible Linux infrastructure management approach.

About the Apress Pro Series

The Apress Pro series books are practical, professional tutorials to keep you on and moving up the professional ladder.

You have gotten the job, now you need to hone your skills in these tough competitive times. The Apress Pro series expands your skills and expertise in exactly the areas you need. Master the content of a Pro book, and you will always be able to get the job done in a professional development project. Written by experts in their field, Pro series books from Apress give you the hard–won solutions to problems you will face in your professional programming career.

Author(s): James Turnbull, Dennis Matotek, Peter Lieverdink
Edition: 1
Publisher: apress
Year: 2009

Language: English
Pages: 1082

Prelims
......Page 1
Contents......Page 7
About the Authors......Page 19
About the Technical Reviewer......Page 20
Acknowledgments......Page 21
Linux and Free and Open Source Software......Page 22
Why Do You Need a Linux Server?......Page 24
Part 1: The Beginning......Page 25
Part 2: Making It Work for You......Page 26
Contacting the Authors......Page 28
Linux Distributions......Page 31
Red Hat Enterprise Linux......Page 32
Ubuntu......Page 33
So Which Distribution Should You Choose?......Page 34
So Which Distributions Does This Book Cover?......Page 35
Supported Hardware......Page 36
Getting Support......Page 37
Summary......Page 38
Installing Linux......Page 39
Virtual Machines......Page 40
Red Hat Enterprise Linux Installation......Page 41
Ubuntu Installation......Page 70
Troubleshooting......Page 88
Summary......Page 89
Getting Started......Page 91
Logging In......Page 92
The GUI Desktop......Page 94
The Command Line......Page 95
Using SSH......Page 101
Getting help......Page 103
Users and Groups......Page 105
Services and processes......Page 106
packages......Page 107
Files and File Systems......Page 108
File Types and Permissions......Page 113
Users, Groups, and Ownership......Page 120
Size and Space......Page 121
Date and Time......Page 122
Reading Files......Page 123
Searching for Files......Page 126
Copying Files......Page 128
Moving and Renaming Files......Page 131
Deleting Files......Page 132
Editing Files......Page 133
Summary......Page 135
What Happens When You Log In......Page 137
Working with Users and Groups......Page 138
Introducing sudo......Page 139
Creating Users......Page 140
Creating Groups......Page 143
Deleting Users and Groups......Page 146
Managing Users and Groups via the GUI......Page 148
Passwords......Page 151
Password Aging......Page 152
Disabling Users......Page 154
Storing User and Group Data......Page 155
Configuring Your Shell and Environment......Page 158
Configuring PAM......Page 161
More about sudo......Page 165
Configuring sudo......Page 167
summary......Page 172
The BIOS......Page 173
The Boot Loader......Page 174
Understanding the GRUB Boot Loader......Page 176
Configuring GRUB......Page 177
Using the GRUB Menu......Page 179
Securing Your Boot Loader......Page 180
What Happens After You Boot?......Page 181
Configuring init......Page 182
Managing Services......Page 184
Managing Services on Red Hat......Page 186
Managing Services on Ubuntu......Page 192
Upstart: A New Way......Page 196
Shutting Down and Rebooting Your Linux Host......Page 197
Scheduling Services and Commands with Cron......Page 198
Summary......Page 201
Networking and Firewalls......Page 203
Introduction to Networks and Networking......Page 204
Getting Started with Interfaces......Page 207
Configuring Interfaces from the GUI......Page 210
Configuring Networks with Network Scripts......Page 222
Adding Routes and Forwarding Packets......Page 233
general Network Troubleshooting......Page 239
Ping!......Page 240
MTR......Page 241
TCP/IP 101......Page 242
The tcpdump Command......Page 244
The Netcat Tool......Page 246
You Dig It?......Page 247
how Netfilter/iptables Work......Page 250
Chains......Page 252
Network Address Translation......Page 253
Using the iptables Command......Page 255
Explaining the Default Rules on Red Hat Hosts......Page 261
Our Configuration......Page 267
Other Firewall Configuration Tools......Page 292
TCp Wrappers......Page 293
Summary......Page 294
package Management......Page 295
Introduction to Package Management......Page 296
Package Management on Red hat Linux......Page 297
Getting Started......Page 298
Package Updater Program......Page 299
Package Manager Program......Page 305
Red Hat Network (RHN)......Page 308
Yellowdog Updater Modified (Yum)......Page 318
Red Hat Package Management (RPM)......Page 323
Package Management on Ubuntu......Page 329
Aptitude......Page 330
Package Management with Synaptic......Page 340
Using dpkg......Page 348
Examining Package Details......Page 351
Examining Package Contents......Page 352
Removing a Package......Page 353
compiling from source......Page 354
Configure......Page 356
Compile and Make......Page 358
Uninstall......Page 359
summary......Page 360
Devices......Page 361
Partitions......Page 363
File Systems......Page 370
using your File System......Page 380
Automating Mounts......Page 383
Checking File System Usage......Page 386
raid......Page 387
Types of RAID......Page 388
Creating an Array......Page 390
Creating Groups and Volumes......Page 398
Expanding a Logical Volume......Page 401
Shrinking a Logical Volume......Page 402
Managing LVM via a GUI......Page 403
recovering from Failure......Page 408
Boot Loader Problems......Page 411
Disk Failure......Page 412
Summary......Page 414
Network Time Protocol......Page 417
The Global NTP Server Pool......Page 420
Root Servers......Page 422
Querying Name Servers......Page 424
Running Caching DNS......Page 429
Authoritative DNS......Page 433
Dynamic DNS......Page 448
Installing and Configuring......Page 449
Static Lease Assignments......Page 451
Dynamic DNS Updates......Page 453
Secure Shell......Page 461
Creating and Distributing Keys......Page 462
Using SSH Agent......Page 463
Tweaking SSH Configuration......Page 464
Performing Quick and Secure File Transfers......Page 467
Summary......Page 469
Mail Services......Page 471
What Happens When You Send an E-Mail?......Page 472
What Happens After You Send Your E-Mail?......Page 475
Configuring E-Mail......Page 476
Installation......Page 477
Starting Postfix......Page 480
Understanding Postfix Configuration......Page 481
Initial Configuration......Page 483
Testing Postfix......Page 485
Choosing a Mailbox Format......Page 489
Using Encryption......Page 493
Authentication......Page 504
getting Help for postfix......Page 515
Fighting Spam......Page 516
Antivirus......Page 528
What’s the Difference?......Page 534
Introducing Dovecot......Page 535
virtual Domains and users......Page 543
summary......Page 544
Installation and Configuration......Page 545
Access Restriction......Page 559
Modules......Page 560
File and Directory Permissions......Page 561
Installation......Page 562
Basic Tuning for InnoDB......Page 565
Basic MySQL Administration......Page 569
installing Websites......Page 571
Web Presence......Page 572
Webmail......Page 577
Other Web Applications......Page 585
Configuration......Page 586
Client Configuration......Page 588
Transparency......Page 589
Summary......Page 590
File Sharing with Samba and NFS......Page 591
Samba......Page 592
Adding Users to Samba......Page 603
Adding a Host to the Domain......Page 604
Required iptables Rules for Samba......Page 608
Using the system-config-samba GUI......Page 609
NFS Shares: Linux to Linux......Page 615
Resources......Page 617
KnowledgeTree, an Open Source DMS......Page 618
Installing KnowledgeTree......Page 619
Administering KnowledgeTree......Page 627
Working with Documents......Page 630
Securing KnowledgeTree with SSL......Page 636
print Servers......Page 637
CUPS......Page 638
Samba and Print Services: Adding a Printer to Your Desktop......Page 645
Summary......Page 648
Disaster Recover Planning......Page 649
Backup Process......Page 651
Network Backups......Page 652
Using Rsync......Page 653
Using Rsync over SSH......Page 654
Using Bacula......Page 664
Getting the Software......Page 666
Configuring Bacula......Page 669
Managing Bacula with bconsole......Page 682
Backing Up Databases with Bacula......Page 686
Introducing the Bat Console......Page 689
Summary......Page 695
Our Example Network......Page 697
Installing OpenVPN......Page 699
Configuring OpenVPN......Page 700
Exposing Head Office Resources with OpenVPN......Page 712
VPN Connections for Mobile Users......Page 715
Troubleshooting OpenVPN......Page 723
summary......Page 724
collaborative Services......Page 725
Zimbra......Page 726
Prerequisites......Page 729
Downloading and Preparing the Hosts......Page 730
Installing Zimbra......Page 731
Zimbra Postinstallation Configuration Menu......Page 735
Firewall Changes......Page 739
The Zimbra Administration Console......Page 740
Creating a Class of Service......Page 741
Adding New Users......Page 747
Aliases and Distribution Lists......Page 753
Adding Resources......Page 756
Adding Zimlets......Page 757
Adding an SSL Certificate......Page 760
Global Settings......Page 766
Monitoring Zimbra......Page 769
Using Zimbra......Page 771
Using E-Mail......Page 772
Using Our Zimlets......Page 775
Sharing Folders, Address Books, Documents, and More......Page 777
migrating from an existing e-mail service......Page 785
summary......Page 786
Directory Services......Page 789
What Is LDAP?......Page 790
General Considerations......Page 793
Implementation......Page 795
Installation......Page 796
Ubuntu Installation Guide......Page 797
Configuration......Page 798
Creating a Schema......Page 803
Access Control Lists......Page 806
Starting the slapd Daemon......Page 811
LDAP Management and Tools......Page 813
LDIFs and Adding Users......Page 814
Adding Users from LDIF Files......Page 816
Searching Your LDAP Tree......Page 819
Deleting Entries from Your LDAP Directory......Page 820
Password Policy Overlay......Page 821
Testing Your Access Control Lists......Page 822
Backing Up Your LDAP Directory......Page 824
LDAP Account Manager: Web-Based GUI......Page 825
Installation and Configuration......Page 826
Adding the Apache Virtual Host for LAM......Page 828
Integration with Other Services......Page 835
Single Sign-On: Centralized Linux Authentication......Page 836
How PAM Works......Page 845
LDAP and Apache Authentication......Page 849
LDAP Integration with KnowledgeTree DMS......Page 852
Summary......Page 857
CPU Usage......Page 859
Memory Usage......Page 860
CPU and Memory Use......Page 862
Swap Space Use......Page 872
Disk Access......Page 873
SNMP......Page 875
Cacti......Page 878
Performance optimization......Page 892
Resource Limits......Page 893
sysctl and the proc File System......Page 895
Storage Devices......Page 896
File System Tweaks......Page 897
summary......Page 898
Logging......Page 899
Configuring Syslog......Page 900
Starting and Configuring the syslog Daemon......Page 906
Testing Logging with logger......Page 908
Log Management and Rotation......Page 909
Log Analysis and Correlation......Page 911
Introducing SEC......Page 912
Running SEC......Page 914
Using SEC......Page 918
Introducing Nagios......Page 927
Installing Nagios......Page 929
Starting Nagios......Page 930
Nagios Configuration......Page 931
Setting Up the Nagios Console......Page 949
Troubleshooting Nagios......Page 956
summary......Page 957
configuration Management......Page 959
Provisioning......Page 960
Provisioning with Red Hat Cobbler......Page 961
Provisioning with Ubuntu......Page 972
Kickstart and Preseed......Page 981
Introducing Puppet......Page 993
Installing Puppet......Page 995
Configuring Puppet......Page 996
Connecting Our First Client......Page 998
Creating Our First Configuration......Page 1000
Applying Our First Configuration......Page 1003
Specifying Configuration for Multiple Hosts......Page 1005
Relating Resources......Page 1008
Using Templates......Page 1010
Definitions......Page 1011
More Puppet......Page 1013
Troubleshooting Puppet......Page 1014
summary......Page 1015
VirtualBox......Page 1017
Xen......Page 1018
OpenVZ......Page 1020
Installing VirtualBox......Page 1021
Creating Virtual Machines with VirtualBox......Page 1022
Preparing Your Computer for Xen Usage......Page 1026
Creating Xen Virtual Machines......Page 1027
Managing the Xen Virtual Machine......Page 1034
Automatically Starting Xen Virtual Machines......Page 1038
Preparing Your Server for KVM Virtualization: Networking......Page 1039
Installing Windows As a Guest Operating System on KVM......Page 1040
Installing Ubuntu Server As a Guest Operating System on KVM......Page 1041
Managing KVM Virtual Machines with Virtual Manager......Page 1042
Virtualization with OpenVZ......Page 1047
Installation......Page 1048
Creating OpenVZ Virtual Machines......Page 1049
Summary......Page 1052
Index......Page 1053