Linux in Action (MEAP - Early Edition)
Book information
Description
Linux in Action MEAP V05......Page 1 Copyright......Page 2 Welcome......Page 3 Brief contents......Page 4 Chapter 1: Welcome to Linux......Page 5 1.1 What makes Linux different from other operating systems......Page 6 1.2.1 The Linux file system......Page 7 1.2.2 Getting around: Linux navigation tools......Page 10 1.2.3 Getting things done: Linux file management tools......Page 14 1.2.4 Keyboard tricks......Page 18 1.2.5 Pseudo File Systems......Page 19 1.2.6 Showing 'em who’s boss: sudo......Page 20 1.3.1 Man......Page 21 1.3.2 Info......Page 22 1.3.3 The Internet......Page 23 1.5 Definitions......Page 24 1.8 Test yourself......Page 25 1.8.1 Answer Key:......Page 26 Chapter 2: Linux virtualization: building a safe and simple Linux working environment......Page 27 2.1 What is virtualization?......Page 28 2.1.1 How virtualization works......Page 29 2.2.1 Working with Linux package managers......Page 31 2.2.2 Defining a virtual machine......Page 37 2.2.3 Installing an Operating System......Page 42 2.2.4 Cloning and sharing a VirtualBox VM......Page 45 2.3.1 Getting started with LXC......Page 47 2.4 Summary......Page 51 2.7 Command line review......Page 52 2.8 Test yourself......Page 53 2.8.1 Answer Key:......Page 54 3.1 The importance of encryption......Page 55 3.2.1 The OpenSSH package......Page 57 3.3 Logging into a remote server with SSH......Page 59 3.4 Password-free SSH access......Page 61 3.4.1 Generating a new key pair......Page 62 3.4.2 Copying the public key over a network......Page 63 3.5 Safely copying files with scp......Page 65 3.6 Using remote graphic programs over SSH connections......Page 66 3.7 Linux process management......Page 68 3.7.1 Viewing processes with the ps command......Page 69 3.7.2 Working with systemd......Page 71 3.10 Security best practices......Page 72 3.12 Test yourself......Page 73 3.12.1 Answer Key:......Page 74 4.1 Why archive?......Page 75 4.1.2 Archives: some important considerations......Page 77 4.2.1 Identifying partitions on a Linux file system......Page 79 4.3 Where to back up......Page 81 4.4.1 Simple archive and compression examples......Page 82 4.4.2 Streaming file system archives......Page 83 4.4.3 Aggregating files......Page 86 4.4.4 Preserving permissions and ownership…and extracting archives......Page 87 4.5.1 dd operations......Page 92 4.6 Synchronizing archives with rsync......Page 93 4.8 Summary......Page 95 4.11 Command line review......Page 96 4.12 Test yourself......Page 97 4.12.1 Answer Key:......Page 98 Chapter 5: Automated administration: configure automated offsite backups......Page 99 5.1.1 A sample script......Page 100 5.2 Back up data to AWS S3......Page 105 5.2.1 Install the AWS command line interface (CLI)......Page 106 5.3 Schedule regular backups with cron......Page 109 5.4 Schedule irregular backups with anacron......Page 111 5.4.1 Running the S3 sync job......Page 112 5.5 Schedule regular backups with systemd timers......Page 113 5.8 Security best practices......Page 115 5.10 Test yourself......Page 116 5.10.1 Answer Key:......Page 117 Chapter 6: Emergency tools: build a system recovery device......Page 118 6.1 Working in recovery/rescue mode......Page 119 6.1.1 The GRUB bootloader......Page 120 6.1.3 Using rescue mode on CentOS......Page 121 6.1.4 Finding command line rescue tools......Page 122 6.2.1 System rescue images......Page 124 6.2.2 Writing live-boot images to USB drives......Page 125 6.3.1 Test system memory......Page 130 6.3.2 Damaged partitions......Page 132 6.3.3 Recovering files from a damaged file system......Page 134 6.4 Chroot: mounting a file system as a process......Page 136 6.8 Command line review......Page 138 6.9 Test yourself......Page 139 6.9.1 Answer Key:......Page 140 Chapter 7: Web servers - build a MediaWiki server......Page 141 7.1 Building a LAMP server?......Page 142 7.2 Setting up an Apache web server......Page 143 7.2.1 Installing the Apache web server on Ubuntu......Page 144 7.2.2 Installing the Apache web server (httpd) on CentOS......Page 145 7.2.3 Understanding network ports......Page 146 7.2.5 Populating your website document root......Page 147 7.3 Installing an SQL database......Page 148 7.3.1 SQL administration......Page 151 7.4.1 Installing PHP on Ubuntu......Page 153 7.4.2 Installing PHP on CentOS......Page 154 7.5 Installing and configuring MediaWiki......Page 156 7.5.1 Troubleshooting missing extensions......Page 157 7.5.2 Connecting MediaWiki to the database......Page 160 7.7 Key terms......Page 162 7.10 Test yourself......Page 163 7.10.1 Answer Key:......Page 165 Chapter 8: Networked file sharing - build a Nextcloud file sharing server......Page 166 8.2 Installing Nextcloud using snaps......Page 167 8.3.1 Hardware prerequisites......Page 170 8.3.3 Apache configuration......Page 172 8.3.4 Downloading and unpacking Nextcloud......Page 175 8.4 Administrating Nextcloud......Page 178 8.5 Using AWS S3 as primary Nextcloud storage......Page 182 8.5.1 Connect Nextcloud to an S3 bucket......Page 183 8.9 Command line review......Page 185 8.10 Test yourself......Page 186 8.10.1 Answer Key:......Page 187 Chapter 9: Securing your web server......Page 188 9.1 The obvious stuff......Page 189 9.2.1 Configuring a firewall......Page 190 9.2.2 Using non-standard ports......Page 197 9.3 Encrypting data in transit......Page 199 9.3.1 Preparing your website domain......Page 201 9.3.2 Generating certificates using Let’s Encrypt......Page 202 9.4 Hardening the authentication process......Page 203 9.4.1 Controlling file system objects with SELinux......Page 204 9.4.2 Installing and activating SELinux......Page 205 9.4.3 Applying SELinux policies......Page 207 9.4.4 System groups and the principle of least privilege......Page 208 9.4.6 Scanning for dangerous user ID values......Page 211 9.5.1 Scanning for open ports......Page 212 9.5.2 Scanning for active services......Page 213 9.7 Key terms......Page 214 9.9 Test yourself......Page 215 9.9.1 Answer Key:......Page 216 Chapter 10: Securing your network connections - create a VPN or DMZ......Page 217 10.1 Building an OpenVPN tunnel......Page 218 10.1.1 Configuring an OpenVPN server......Page 219 10.1.2 Configuring an OpenVPN client......Page 226 10.1.3 Testing your VPN......Page 228 10.2 Building intrusion-resistant networks......Page 229 10.2.1 Demilitarized zones (DMZs)......Page 230 10.2.2 Resistant networks: design considerations......Page 231 10.2.3 Using iptables......Page 233 10.2.4 Create a DMZ using Shorewall......Page 236 10.3 Building a virtual network for infrastructure testing......Page 239 10.5 Key terms......Page 241 10.7 Test yourself......Page 242 10.7.1 Answer Key:......Page 244 Chapter 11: System monitoring - working with log files......Page 245 11.1 Working with system logs......Page 246 11.1.1 Logging with journald......Page 247 11.1.2 Logging with syslogd......Page 249 11.2.1 The journald way......Page 251 11.2.2 The syslogd way......Page 252 11.3.1 grep......Page 253 11.3.2 awk......Page 254 11.3.3 sed......Page 256 11.4 Intrusion detection......Page 257 11.4.2 Installing Tripwire......Page 258 11.4.3 Configuring Tripwire......Page 261 11.5 Summary:......Page 264 11.8 Command line review......Page 265 11.9 Test yourself......Page 266 11.9.1 Answer Key:......Page 267 Chapter 12: Sharing data over a private network......Page 268 12.1 Sharing files through the Network File System (NFS)......Page 269 12.1.1 Setting up the NFS server......Page 270 12.1.2 Setting up the client......Page 272 12.1.3 Mounting an NFS share at boot time......Page 273 12.1.4 NFS security......Page 274 12.2 Samba: sharing files with Windows users......Page 276 12.2.1 Testing your Samba configuration......Page 278 12.2.2 Accessing a Samba server from Windows......Page 279 12.3 Symbolic links: sharing files with yourself......Page 280 12.3.1 Symbolic vs. hard links......Page 281 12.6 Security best practices......Page 282 12.8 Test yourself......Page 283 12.8.1 Answer Key:......Page 284 Chapter 13: Troubleshooting system performance issues......Page 285 13.1.1 Measuring CPU load......Page 286 13.1.2 Managing CPU loads......Page 287 13.1.3 Making trouble (simulating CPU load)......Page 290 13.2.1 Assessing memory status......Page 291 13.3 Storage availability problems......Page 292 13.3.1 Inode limits......Page 293 13.4.1 Measuring bandwidth......Page 296 13.4.3 Shaping network traffic with tc......Page 298 13.5.1 Aggregating monitoring data......Page 300 13.7 Key terms......Page 303 13.10 Test yourself......Page 304 13.10.1 Answer Key:......Page 306 Chapter 14: Troubleshooting network issues......Page 307 14.1.1 NAT addressing......Page 308 14.2 Establishing network connectivity......Page 311 14.3.1 Tracking down the status of your network......Page 313 14.3.2 Assigning IP addresses......Page 315 14.3.3 Configuring DNS service......Page 318 14.3.4 Plumbing......Page 320 14.4.1 netstat: internal connection scanning......Page 321 14.4.2 netcat: external connection scanning......Page 322 14.5 Summary......Page 323 14.8 Command line review......Page 324 14.9 Test yourself......Page 325 14.9.1 Answer Key:......Page 326 Chapter 15: Troubleshooting peripheral devices......Page 327 15.1 Identifying attached devices......Page 328 15.2 Managing peripherals with Linux kernel modules......Page 330 15.2.1 Finding kernel modules......Page 331 15.2.2 Manually loading kernel modules......Page 333 15.3.1 Passing parameters at boot time......Page 335 15.4.1 Basics of lp......Page 337 15.4.2 Managing printers using CUPS......Page 338 15.6 Key terms......Page 340 15.9 Test yourself......Page 341 15.9.1 Answer Key:......Page 342 Chapter 16: DevOps tools: deploy a scripted server environment using Ansible......Page 343 16.1 What can deployment orchestrators do for you......Page 345 16.2 Ansible: installation and setup......Page 346 16.2.1 Organize Ansible hosts......Page 347 16.3 Authentication......Page 349 16.3.1 Administrating remote hosts using permissions......Page 350 16.4.1 Write a simple playbook......Page 351 16.4.2 Multi-tiered, roles-powered playbooks......Page 354 16.4.3 Managing passwords in Ansible......Page 356 16.8 Command line review......Page 357 16.9.1 Answer Key:......Page 358
Similar books
Linux in Action
2018 · AZW
The Complete Obsolete Guide to Generative AI
2024 · RAR
The Complete Obsolete Guide to Generative AI
2024 · PDF
AWS Certified Cloud Practitioner Study Guide With 500 Practice Test Questions: Foundational (CLF-C02) Exam (Sybex Study Guide)
2023 · PDF
The Complete Obsolete Guide to Generative AI
2024 · PDF
The Complete Obsolete Guide to Generative AI
2024 · EPUB
LPI Security Essentials Study Guide: Exam 020-100
EPUB
Solving for Technology: How to quickly learn valuable new skills in a madly changing technology world
MOBI