ENGLISH

Linux in Action (Not MEAP)

Book information

Publisher
Manning
Year
2018
ISBN
1617294934, 9781617294938
Language
english
Format
PDF
Filesize
20 MB (20606838 bytes)
Pages
386\386
Topic
Computers\\Operating Systems
Time added
2018-11-11 15:50:55

Description

Linux in Action is a task-based tutorial that will give you the skills and deep understanding you need to administer a Linux-based system. This hands-on book guides you through 12 real-world projects so you can practice as you learn. Each chapter ends with a review of best practices, new terms, and exercises. Linux in Action guides you through 12 real-world projects, including automating a backup-and-restore system, setting up a private Dropbox-style file cloud, and building your own MediaWiki server. You'll try out interesting examples as you lock in core practices like virtualization, disaster recovery, security, backup, DevOps, and system troubleshooting. Each chapter ends with a review of best practices, new terms, and exercises. [...] No prior Linux admin experience is required. Linux in Action......Page 1 brief contents......Page 5 contents......Page 7 preface......Page 13 acknowledgments......Page 14 about this book......Page 16 How this book is organized: A roadmap......Page 17 About the code......Page 18 Other online resources......Page 19 about the author......Page 20 about the cover illustration......Page 21 Chapter 1: Welcome to Linux......Page 23 1.1 What makes Linux different from other operating systems......Page 24 1.2 Basic survival skills......Page 25 1.2.1 The Linux file system......Page 26 1.2.2 Getting around: Linux navigation tools......Page 27 1.2.3 Getting things done: Linux file management tools......Page 31 1.2.4 Keyboard tricks......Page 35 1.2.5 Pseudo file systems......Page 36 1.2.6 Showing ’em who’s boss: sudo......Page 37 1.3.2 Info......Page 38 1.3.3 The internet......Page 39 Chapter 2: Linux virtualization: Building a Linux working environment......Page 44 2.1 What is virtualization?......Page 45 2.2.1 Working with Linux package managers......Page 48 2.2.2 Defining a virtual machine (VM)......Page 55 2.2.3 Installing an operating system (OS)......Page 58 2.2.4 Cloning and sharing a VirtualBox VM......Page 61 2.3.1 Getting started with LXC......Page 63 2.3.2 Creating your first container......Page 64 Chapter 3: Remote connectivity: Safely accessing networked machines......Page 71 3.1 The importance of encryption......Page 72 3.2 Getting started with OpenSSH......Page 73 3.3 Logging in to a remote server with SSH......Page 75 3.4 Password-free SSH access......Page 77 3.4.1 Generating a new key pair......Page 78 3.4.2 Copying the public key over a network......Page 79 3.5 Safely copying files with SCP......Page 81 3.6 Using remote graphic programs over SSH connections......Page 82 3.7 Linux process management......Page 83 3.7.1 Viewing processes with the ps command......Page 84 3.7.2 Working with systemd......Page 86 Chapter 4: Archive management: Backing up or copying entire file systems......Page 90 4.1.1 Compression......Page 91 4.1.2 Archives: Some important considerations......Page 92 4.2 What to archive......Page 93 4.3 Where to back up......Page 95 4.4.1 Simple archive and compression examples......Page 96 4.4.2 Streaming file system archives......Page 98 4.4.3 Aggregating files with find......Page 100 4.4.4 Preserving permissions and ownership…and extracting archives......Page 101 4.5.1 dd operations......Page 105 4.5.2 Wiping disks with dd......Page 106 4.6 Synchronizing archives with rsync......Page 107 4.7 Planning considerations......Page 108 Answer key......Page 111 Chapter 5: Automated administration: Configuring automated offsite backups......Page 112 5.1.1 A sample script for backing up system files......Page 113 5.1.2 A sample script for changing filenames......Page 117 5.2.1 Installing the AWS command-line interface (CLI)......Page 119 5.2.2 Configuring your AWS account......Page 120 5.2.3 Creating your first bucket......Page 121 5.3 Scheduling regular backups with cron......Page 122 5.4.1 Running the S3 sync job......Page 125 5.5 Scheduling regular backups with systemd timers......Page 126 Answer key......Page 130 Chapter 6: Emergency tools: Building a system recovery device......Page 131 6.1.1 The GRUB bootloader......Page 133 6.1.2 Using recovery mode on Ubuntu......Page 134 6.1.4 Finding command-line rescue tools......Page 135 6.2 Building a live-boot recovery drive......Page 136 6.2.1 System rescue images......Page 137 6.2.2 Writing live-boot images to USB drives......Page 138 6.3.1 Testing system memory......Page 142 6.3.2 Damaged partitions......Page 144 6.3.3 Recovering files from a damaged file system......Page 146 6.4 Password recovery: Mounting a file system using chroot......Page 148 Answer key......Page 151 Chapter 7: Web servers: Building a MediaWiki server......Page 152 7.1 Building a LAMP server......Page 153 7.2.1 Installing the Apache web server on Ubuntu......Page 155 7.3 Installing an SQL database......Page 156 7.3.1 Hardening SQL......Page 158 7.3.2 SQL administration......Page 159 7.4.2 Testing your PHP installation......Page 162 7.5 Installing and configuring MediaWiki......Page 163 7.5.1 Troubleshooting missing extensions......Page 164 7.5.2 Connecting MediaWiki to the database......Page 167 7.6 Installing the Apache web server on CentOS......Page 168 7.6.1 Understanding network ports......Page 169 7.6.2 Controlling network traffic......Page 170 7.6.4 Installing PHP on CentOS......Page 171 Answer key......Page 176 Chapter 8: Networked file sharing: Building a Nextcloud file-sharing server......Page 177 8.1 Enterprise file sharing and Nextcloud......Page 178 8.2 Installing Nextcloud using snaps......Page 179 8.3.1 Hardware prerequisites......Page 181 8.3.3 Configuring Apache......Page 183 8.3.4 Downloading and unpacking Nextcloud......Page 185 8.4 Nextcloud administration......Page 188 8.5 Using AWS S3 as the primary Nextcloud storage......Page 191 Answer key......Page 195 Chapter 9: Securing your web server......Page 196 9.1 The obvious stuff......Page 197 9.2.1 Configuring a firewall......Page 199 9.2.2 Using nonstandard ports......Page 205 9.3 Encrypting data in transit......Page 207 9.3.2 Generating certificates using Let’s Encrypt......Page 209 9.4.1 Controlling file system objects with SELinux......Page 211 9.4.2 Installing and activating SELinux......Page 213 9.4.3 Applying SELinux policies......Page 215 9.4.4 System groups and the principle of least privilege......Page 216 9.4.5 Isolating processes within containers......Page 218 9.5 Auditing system resources......Page 219 9.5.2 Scanning for active services......Page 220 9.5.3 Searching for installed software......Page 221 Answer key......Page 224 Chapter 10: Securing network connections: Creating a VPN or DMZ......Page 225 10.1 Building an OpenVPN tunnel......Page 226 10.1.1 Configuring an OpenVPN server......Page 227 10.1.2 Configuring an OpenVPN client......Page 234 10.1.3 Testing your VPN......Page 236 10.2 Building intrusion-resistant networks......Page 237 10.2.1 Demilitarized zones (DMZs)......Page 238 10.2.3 Creating a DMZ using iptables......Page 240 10.2.4 Creating a DMZ using Shorewall......Page 243 10.3 Building a virtual network for infrastructure testing......Page 246 Answer key......Page 250 Chapter 11: System monitoring: Working with log files......Page 251 11.1 Working with system logs......Page 252 11.1.1 Logging with journald......Page 253 11.1.2 Logging with syslogd......Page 255 11.2.1 The journald way......Page 257 11.2.2 The syslogd way......Page 258 11.3.1 Using grep......Page 259 11.3.2 Using awk......Page 260 11.3.3 Using sed......Page 261 11.4.1 Setting up a mail server......Page 263 11.4.2 Installing Tripwire......Page 264 11.4.3 Configuring Tripwire......Page 266 11.4.4 Generating a test Tripwire report......Page 269 Answer key......Page 272 Chapter 12: Sharing data over a private network......Page 273 12.1 Sharing files through Network File System (NFS)......Page 274 12.1.1 Setting up the NFS server......Page 275 12.1.2 Setting up the client......Page 277 12.1.3 Mounting an NFS share at boot time......Page 278 12.1.4 NFS security......Page 279 12.2 Sharing files with Windows users using Samba......Page 281 12.2.1 Testing your Samba configuration......Page 283 12.3 Sharing files with yourself using symbolic links......Page 284 Answer key......Page 289 Chapter 13: Troubleshooting system performance issues......Page 290 13.1.1 Measuring CPU load......Page 291 13.1.2 Managing CPU load......Page 292 13.2.1 Assessing memory status......Page 296 13.3 Storage availability problems......Page 297 13.3.1 Inode limits......Page 298 13.3.2 The solution......Page 300 13.4.1 Measuring bandwidth......Page 301 13.4.2 Solutions......Page 302 13.4.3 Shaping network traffic with tc......Page 303 13.5 Monitoring tools......Page 304 13.5.1 Aggregating monitoring data......Page 305 13.5.2 Visualizing your data......Page 306 Answer key......Page 310 Chapter 14: Troubleshooting network issues......Page 311 14.1.1 What’s NAT addressing?......Page 312 14.1.2 Working with NAT addressing......Page 313 14.2 Establishing network connectivity......Page 315 14.3.1 Tracking down the status of your network......Page 317 14.3.2 Assigning IP addresses......Page 319 14.3.3 Configuring DNS service......Page 322 14.4 Troubleshooting inbound connectivity......Page 324 14.4.2 External connection scanning: netcat......Page 325 Answer key......Page 329 Chapter 15: Troubleshooting peripheral devices......Page 330 15.1 Identifying attached devices......Page 331 15.2.1 Finding kernel modules......Page 333 15.2.2 Manually loading kernel modules......Page 335 15.3.1 Passing parameters at boot time......Page 337 15.4.1 Basics of lp......Page 339 15.4.2 Managing printers using CUPS......Page 340 Answer key......Page 343 Chapter 16: DevOps tools: Deploying a scripted server environment using Ansible......Page 344 16.1 What deployment orchestrators can do for you......Page 346 16.2.1 Setting up passwordless access to hosts......Page 348 16.2.2 Organizing Ansible hosts......Page 349 16.3 Authentication......Page 350 16.4.1 Writing a simple playbook......Page 352 16.4.2 Creating multi-tiered, role-powered playbooks......Page 354 16.4.3 Managing passwords in Ansible......Page 356 Answer key......Page 359 Virtualization......Page 361 What’s next......Page 362 Resources......Page 363 2 Linux virtualization: Building a Linux working environment......Page 365 4 Archive management: Backing up or copying entire file systems......Page 366 7 Web servers: Building a MediaWiki server......Page 367 9 Securing your web server......Page 368 11 System monitoring: Working with log files......Page 369 14 Troubleshooting network issues......Page 370 16 DevOps tools: Deploying a scripted server environment using Ansible......Page 371 A......Page 373 C......Page 374 E......Page 375 I......Page 376 L......Page 377 N......Page 378 R......Page 379 S......Page 380 T......Page 381 W......Page 382 Z......Page 383

Similar books