Linux in Action MEAP V05 - Chapter 1 · PDF file... the rest of the book will require a...

26

Transcript of Linux in Action MEAP V05 - Chapter 1 · PDF file... the rest of the book will require a...

  • MEAPEditionManningEarlyAccessProgram

    LinuxinActionVersion5

    Copyright2018ManningPublications

    FormoreinformationonthisandotherManningtitlesgotowww.manning.com

    Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

    https://forums.manning.com/forums/linux-in-action

    http://www.manning.comhttps://https://forums.forums.manning.manning.com/com/forums/forums/linux-linux-in-in-action

  • welcome No matter what you do or how long youve been doing it in the IT or programming world, if youre not learning new stuff, youre probably not doing it right. Its not just that the platforms and paradigms are constantly changing. Nor is it just that new business demands require fresh thinking. Or that the bad guys are constantly coming up with new ways to attack your severs. Its all of those things and more.

    You simply cant afford to stop learning. The trick is finding a way to learn the high-priority skills without turning the experience into a major detour.

    Its my intention and desire that you should be able to read even a single chapter from Linux in Action and walk away feeling confident enough to take on something challenging and productive. Something you wouldnt previously have even considered. If you hang around 'till the end, youll learn to work with critical and current technologies powering virtualization, disaster recovery, infrastructure security, data backup, web servers, DevOps, and system troubleshooting.

    But why Linux? Because Linux powers most of the internet, most scientific research, most commercemost of the worlds servers. Those servers need to be provisioned, launched, secured, and managed effectively by smart and well trained people. "Smart" is what you bring to the table, but I think I can help with "well trained."

    Not sure you know enough about Linux to embark on such an ambitious project? Chapter 1 will quickly fill in the holes. After that, fasten your seat belt and prepare for a serious learning curve. Im learning new things as I write each new chapter. I hope youll join me. And be in touchyour feedback will make this a much better book.

    David Clinton

    PS Chapter 1 covers Linux fundamentals for newbies. If you know the basics, feel free to skip to Chapter 2 and start your journey there.

    Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

    https://forums.manning.com/forums/linux-in-action

    https://forums.manning.com/forums/linux-in-action

  • brief contents 0 Front Matter

    1 Welcome to Linux

    2 Linux virtualization: building a safe and simple Linux working environment

    3 Remote connectivity: safely access networked machines

    4 Archive management: backup or copy entire filesystems

    5 Automated administration: configure automated offsite backups

    6 Emergency tools: build a system recovery device

    7 Web servers - build a MediaWiki server

    8 Networked file sharing - build a Nextcloud file sharing server

    9 Securing your web server

    10 Securing your network connections - create a VPN or DMZ

    11 System monitoring - working with log files

    12 Sharing data over a private network

    13 Troubleshooting system performance issues

    14 Troubleshooting network issues

    15 Troubleshooting peripheral devices

    16 DevOps tools: deploy a scripted server environment using Ansible

    Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

    https://forums.manning.com/forums/linux-in-action

    https://forums.manning.com/forums/linux-in-action

  • 1 This chapter covers: What makes Linux different Basic survival skills Getting help

    This is a book that turns technology training sideways. That is, while other books, courses, and online resources organize their content around skills, Im going to use real-world projects as teaching tools. Each of the core skills and the functionality of Linux systems will be covered - and covered well - but only when needed for a project. When youre done, youll have learned everything you would have from a traditional source, but you will also know how to perform more than a dozen vital and sophisticated administration tasksand be comfortable tackling dozens more.

    The first two or three chapters will quickly guide you through your first anxious introduction to the world of Linux servers. After that, youll work through - and adapt - practical hands-on projects and nothing but practical hands-on projects. Through those projects, you will learn more than just commands and skills. Get ready to push deeper and eventually create solutions to your own business problems.

    No single book can anticipate all the challenges that readers will face through their careers. But by demonstrating how to approach real-world problems using real-world tools (including research tools), this book will make it a whole lot easier for you to leverage the vast resources available through both inline documentation and the internet.

    If your prior Linux experience is very limited, this first chapter will introduce you to some basic command line survival skills and point you to places you can go for

    Welcome to Linux

    Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

    https://forums.manning.com/forums/linux-in-action

    1

    https://forums.manning.com/forums/linux-in-action

  • help when things dont work.

    I should note that through this (and every) chapter, you are strongly encouraged to try everything out for yourself. Theres no better way to really get to the core of an IT skill than actually doing it, realizing that its not working the way you expected, and playing with it until it becomes yours forever.

    Good luck and have fun!

    1.1 What makes Linux different from other operating systems Well it is free, which means its a lot easier to install it exactly where and when you need it for any use you can dream up. Not having to worry about purchasing site licenses and jumping through Digital Rights Management hoops certainly makes testing out all kinds of hardware combinations and server configurations a lot more straightforward.

    Linux makes it possible to do all kinds of really useful and creative things. For instance, you can load a Linux "live boot" image on a USB stick, boot a PC whose own hard disk has been corrupted, and troubleshoot and fix the problem. Or, because Linux is a true multi-user operating system, whole teams can concurrently do their work - locally or remotely - confident in the privacy and stability of the system.

    Linux also provides sophisticated software package management systems that reliably install and maintain any of the thousands of free software applications available through online curated repositories.

    But beyond free, Linux is open source, which means anyone can take the code base and reshape it into anything they want. Practically, this has spawned a vast ecosystem of specialty Linux distributions. A distribution (sometimes shortened to "distro") is a customized stack of software thats packaged along with the Linux kernel and distributed with tools for installing a working version of Linux of user computers.

    Heres a very incomplete distro list to illustrate the kinds of things that are available:

    Purpose Distribution

    Security/anti-hacking Kali Linux Parrot Consumer desktop Mint Elementary OS Lightweight (old hardware; diagnostics) Puppy Linux LXLE Internet of Things administration Snappy Ubuntu Core Enterprise server room CentOS (community version of Red Hat Enterprise

    Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

    https://forums.manning.com/forums/linux-in-action

    2

    https://forums.manning.com/forums/linux-in-action

  • Linux) OpenSUSE (community version of SUSE) Cloud computing Amazon Linux (AWS AMI) Ubuntu Server (AWS AMI) All-purpose (except lightweight) Ubuntu

    Cant find what youre after? Create your own. Need help? Theres a very large and active community online where, if someone hasnt already solved your problem, theyll know where to go to get it done.

    More than anything else, Id say its the community-based resources that really make Linux so powerful.

    1.2 Basic survival skills Before we get started with the enterprise-ready projects that will make up the rest of the book, its worthwhile making sure that were all starting off at the same spot. So this chapter will cover the Linux basics; the Unix Filesystem Hierarchy Standard (including pseudo file systems), navigation (ls, pwd and cd), file management tools (cat, less, touch, mkdir, rmdir, rm, cp and mv), some tricks (like tab completion and file globbing), sudo, and where to turn for help (man, info, and journalctl).

    Its very possible that youve got enough experience already that you wont need any of that material, so feel free to skip the chapter altogether. Dont worry about the rest of us. Well catch up. Im not going