Hands-On Linux Administration on Azure - Second Edition
Total Page:16
File Type:pdf, Size:1020Kb
Hands-On Linux Administration on Azure - Second Edition Develop, maintain, and automate applications on the Azure cloud platform Kamesh Ganesan, Rithin Skaria, and Frederik Vos Hands-On Linux Administration on Azure - Second Edition Copyright © 2019 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Authors: Kamesh Ganesan, Rithin Skaria, and Frederik Vos Technical Reviewers: Ashvith Bangera, Janaka Channa Bandara Rangama, and Toni Willberg Managing Editor: Afzal Shaikh Acquisitions Editors: Alicia Wooding and Clint Rodricks Production Editor: Deepak Chavan Editorial Board: Sonali Anubhavne, Vishal Bodwani, Ewan Buckingham, Alex Mazonowicz, and Jonathan Wray First Published: August 2018 Second Edition: December 2019 Production Reference: 1060120 ISBN: 978-1-83921-552-0 Published by Packt Publishing Ltd. Livery Place, 35 Livery Street Birmingham B3 2PB, UK Table of Contents Preface i Chapter 1: Exploring the Microsoft Azure Cloud 1 Fundamentals of Cloud Computing ..................................................................... 2 Virtualization ................................................................................................................. 3 SDDC ............................................................................................................................... 4 SOA ................................................................................................................................. 6 Cloud Services ............................................................................................................... 7 Cloud Types ................................................................................................................... 8 Understanding the Microsoft Azure Cloud ......................................................... 9 A Brief History of the Microsoft Azure Cloud ............................................................ 9 Azure Architecture ...................................................................................................... 10 Azure in Your Organization ....................................................................................... 11 Azure and Open Source ............................................................................................. 12 Summary ............................................................................................................... 12 Questions .............................................................................................................. 13 Further Reading ................................................................................................... 13 Chapter 2: Getting Started with the Azure Cloud 15 Technical Requirements ..................................................................................... 16 Getting Access to Azure ...................................................................................... 17 Logging in Using the Azure portal ............................................................................. 17 Getting Command-line Access to Azure ................................................................... 18 Installing the Azure CLI .............................................................................................. 18 Logging in with the Azure CLI .................................................................................... 19 PowerShell ................................................................................................................... 24 Logging in with PowerShell ........................................................................................ 25 Azure Resource Manager ........................................................................................... 28 Linux and Azure ................................................................................................... 30 Linux distributions ...................................................................................................... 30 Microsoft-endorsed Linux Distributions .................................................................. 31 Deploying a Linux Virtual Machine .................................................................... 32 Your First Virtual Machine ......................................................................................... 32 Images .......................................................................................................................... 33 Virtual Machine Sizing ................................................................................................ 38 Virtual Machine Networking ..................................................................................... 39 Virtual Machine Information ..................................................................................... 41 Connecting to Linux ............................................................................................. 43 Logging into Your Linux virtual machine Using Password Authentication ........ 43 Logging into your Linux Virtual Machine with an SSH private key ...................... 43 Summary ............................................................................................................... 45 Questions .............................................................................................................. 45 Further Reading ................................................................................................... 46 Chapter 3: Basic Linux Administration 49 The Linux Shell ..................................................................................................... 50 Executing Commands ................................................................................................. 51 Command-line Editing ................................................................................................ 53 Working with history .................................................................................................. 55 Autocompletion .......................................................................................................... 56 Globbing ....................................................................................................................... 57 Redirections ................................................................................................................. 58 Working with Variables .............................................................................................. 60 Bash Configuration Files ........................................................................................... 62 Getting Help .......................................................................................................... 64 Using the man pages .................................................................................................. 64 Using info Documents ................................................................................................ 67 Other Documentation ................................................................................................ 68 Working with Text Files ....................................................................................... 68 Reading Text ................................................................................................................ 69 Searching in Text Files ................................................................................................ 71 Editing Text Files ......................................................................................................... 75 Finding Your Way in the Filesystem ................................................................... 76 The Filesystem Hierarchy Standard .......................................................................... 77 Mounting Filesystems ................................................................................................ 81 Finding Files on the Filesystem ................................................................................. 82 Process Management .......................................................................................... 84 View Processes ............................................................................................................ 84 Sending Signals to a Process ..................................................................................... 87 Discretionary Access Control ............................................................................. 88 User Management ...................................................................................................... 88 Group Management ..................................................................................................