复制成功
  • 图案背景
  • 纯色背景

笔记

  • 2019-11-16
    为大人带来形象的羊生肖故事来历 为孩子带去快乐的生肖图画故事阅读
    谈谈怎样学好数学_苏步青-中学生文库
网上书摊QQ..

上传于:2019-11-21

粉丝量:853

QQ 3555755295



CompTIA Linux _ XK0-004 Cert Guide

下载积分:1000

内容提示: CompTIA Linux+ XK0-004 CertGuideLearn, prepare, and practice for examsuccessRoss BrunsonWilliam J. RothwellPearson IT Certification Contents at a GlanceIntroductionPart I: Software ManagementChapter 1. Installing LinuxChapter 2. Package Installation and ManagementChapter 3. VirtualizationChapter 4. The Boot ProcessChapter 5. Managing System ServicesChapter 6. System PerformancePart II: File ManagementChapter 7. File ManipulationChapter 8. File ProcessingChapter 9. File Permissions & EscalationChapter 10...

文档格式:PDF| 浏览次数:0| 上传日期:2019-11-21 16:14:03| 文档星级:
CompTIA Linux+ XK0-004 CertGuideLearn, prepare, and practice for examsuccessRoss BrunsonWilliam J. RothwellPearson IT Certification Contents at a GlanceIntroductionPart I: Software ManagementChapter 1. Installing LinuxChapter 2. Package Installation and ManagementChapter 3. VirtualizationChapter 4. The Boot ProcessChapter 5. Managing System ServicesChapter 6. System PerformancePart II: File ManagementChapter 7. File ManipulationChapter 8. File ProcessingChapter 9. File Permissions & EscalationChapter 10. SELinux and AppArmorChapter 11. File Compression and StoragePart III: Account ManagementChapter 12. User and Group ManagementChapter 13. Account SecurityChapter 14. Logging ServicesPart IV: Device ManagementChapter 15. Linux DevicesChapter 16. Hardware TroubleshootingChapter 17. Kernel Modules Chapter 18. Storage ConceptsChapter 19. Storage ConfigurationPart V: Network ManagementChapter 20. Network ConfigurationChapter 21. Network TroubleshootingChapter 22. Linux FirewallsPart VI: AutomationChapter 23. OrchestrationChapter 24. Automate TasksChapter 25. Manage LocalizationChapter 26. BASH Scripting EssentialsChapter 27. GitPart VII: Security and Server ManagementChapter 28. Server RolesChapter 29. Security Best PracticesPart VIII: Final PreparationChapter 30. Final PreparationGlossary of Key TermsAppendix A. Answers to “Do I Know This Already?”Quizzes and Review QuestionsAppendix B. CompTIA Linux+ XK0-004 Exam UpdatesAppendix C. Study Planner Table of ContentsIntroductionPart I: Software ManagementChapter 1. Installing LinuxFoundation TopicsHardware and Linux InstallationSummaryChapter 2. Package Installation and Management“Do I Know This Already?” QuizFoundation TopicsSoftware in a Linux SystemInstalling Software from SourcePackages and Package ManagersRPM and YUM Package ManagementSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 3. Virtualization“Do I Know This Already?” QuizFoundation TopicsWhat Is Virtualization?Types of Virtualization/Hypervisors Bootstrapping VMsTemplate FormatsVirtualization StorageNetworking ConsiderationsSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 4. The Boot Process“Do I Know This Already?” QuizFoundation TopicsThe Linux Boot ProcessBoot Loaders and FilesWhen Kernels PanicSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 5. Managing System Services“Do I Know This Already?” QuizFoundation TopicssystemdDown Memory Lane with SysVinitSummary Exam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 6. System Performance“Do I Know This Already?” QuizFoundation TopicsManaging ProcessesSending Signals to ProcessesJob ControlManaging Process PrioritiesLeaving Programs Running After LogoutSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsPart II: File ManagementChapter 7. File Manipulation“Do I Know This Already?” QuizFoundation TopicsFile and Directory OperationsWorking with Input/Output StreamsSummaryExam Preparation Tasks Review All Key TopicsDefine Key TermsReview QuestionsChapter 8. File ProcessingChapter 9. File Permissions & EscalationChapter 10. SELinux and AppArmor“Do I Know This Already?” QuizFoundation TopicsSELinux ConfigurationsSELinux ContextsAppArmorSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 11. File Compression and StoragePart III: Account ManagementChapter 12. User and Group ManagementChapter 13. Account SecurityChapter 14. Logging ServicesPart IV: Device ManagementChapter 15. Linux Devices“Do I Know This Already?” QuizFoundation Topics Understanding Linux HardwareManaging Printers and PrintingLinux Graphical User InterfacesAccessibility OptionsRemote DesktopSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 16. Hardware Troubleshooting“Do I Know This Already?” QuizFoundation TopicsStorage Monitoring and ConfigurationCPU Monitoring and ConfigurationMemory Monitoring and ConfigurationTroubleshooting Additional Hardware IssuesSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 17. Kernel Modules“Do I Know This Already?” QuizFoundation TopicsUnderstanding Kernel Modules Managing Kernel ModulesThe modprobe CommandSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 18. Storage Concepts“Do I Know This Already?” QuizFoundation TopicsBasic PartitionsFilesystem HierarchyDevice MapperFilesystem TypesSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 19. Storage Configuration“Do I Know This Already?” QuizFoundation TopicsDisk Partitioning ToolsManaging LVMManaging Software RAIDCreating Filesystems Advanced Filesystem CommandsMounting and UnmountingSpace UtilizationSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsPart V: Network ManagementChapter 20. Network Configuration“Do I Know This Already?” QuizFoundation TopicsConceptual Overview of NetworkingManaging InterfacesNetwork Configuration UtilitiesBondingSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 21. Network Troubleshooting“Do I Know This Already?” QuizFoundation TopicsKey Network Troubleshooting Concepts Network Troubleshooting ToolsSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 22. Linux Firewalls“Do I Know This Already?” QuizFoundation TopicsThe iptables CommandAdditional Firewall TechnologiesSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsPart VI: AutomationChapter 23. Orchestration“Do I Know This Already?” QuizFoundation TopicsAutomation and OrchestrationSummaryExam Preparation TasksReview All Key TopicsDefine Key Terms Review QuestionsChapter 24. Automate Tasks“Do I Know This Already?” QuizFoundation TopicsJob ControlLeaving Programs Running After LogoutThe cron SystemRunning ad hoc JobsSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 25. Manage Localization“Do I Know This Already?” QuizFoundation TopicsTime ZonesCharacter EncodingRepresenting LocalesExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 26. BASH Scripting Essentials“Do I Know This Already?” QuizFoundation Topics Basics of ScriptingShell Script CommandsExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 27. Git“Do I Know This Already?” QuizFoundation TopicsVersion Control ConceptsGit Concepts and FeaturesHandling BranchesExecuting DiffsMerging FilesExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsPart VII: Security and Server ManagementChapter 28. Server Roles“Do I Know This Already?” QuizFoundation TopicsServer TypesServer FeaturesSummary Exam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsChapter 29. Security Best Practices“Do I Know This Already?” QuizFoundation TopicsHost Security Best PracticesAuthentication Security Best PracticesService Security Best PracticesBannersSummaryExam Preparation TasksReview All Key TopicsDefine Key TermsReview QuestionsPart VIII: Final PreparationChapter 30. Final PreparationExam InformationGetting ReadyTools for Final PreparationSuggested Plan for Final Review/StudySummaryGlossary of Key TermsAppendix A. Answers to “Do I Know This Already?” Quizzes and Review QuestionsAppendix B. CompTIA Linux+ XK0-004 Exam UpdatesAlways Get the Latest at the Book’s Product PageTechnical ContentAppendix C. Study Planner Introduction [This content iscurrently in development.]This content is currently in development. Part I: Software Management Chapter 1. Installing LinuxThis chapter covers the following topics:• Installing Linux• Using virtualizationWhile installation of Linux is not a stated topic in the currentversion of the Linux+ exam, in order to learn Linux, you mustinstall it. You often need to reinstall it as you make mistakes andlearn lessons.In addition, the Linux+ exam isn’t concerned with the exactprocedure to install Linux because it varies between Linuxdistributions and is constantly changing. The exam is morefocused on what happens to your Linux systems after they areinstalled.Because of this focus, this chapter lacks “‘Do I Know ThisAlready?’ Quiz” and “Review Questions” sections that begin andend the other chapters in this book.This chapter is concerned primarily with setting you up for yoursuccess studying Linux as an operating system by showing youhow to• Pick a virtualization option• Use ISO files as an installation source• Use snapshots• Install a Linux distribution into a virtual machineFOUNDATION TOPICSHARDWARE AND LINUX INSTALLATIONBecoming proficient with Linux starts with understanding thehardware that runs the operating system. Linux has had a bumpyhistory of hardware support because it was originally written with no help from the manufacturers. Over time hardwaresupport has become better, and compatibility information hasbecome easier to find. At one time, it was common to have tospend long nights poring over message boards to find someoneelse running the same video card. Thankfully, such problemshave become increasingly rare.In general, you can expect excellent compatibility on most serverhardware and on recent generations of desktop hardware. If youbuy only the newest, most cutting-edge (that is, the mostexpensive) equipment, you might find that you need to do a bit ofextra reading and troubleshooting to get things to work.We recommend using a virtualization tool such as VMwareWorkstation, VMware Fusion, VirtualBox, or KVM. If you do, youwill have much less to learn about troubleshooting hardwareissues because you will be using mainly software on top of thephysical laptop or desktop you use as a virtualization system.Typically, a chapter on Linux installation would discuss asystem’s hardware and how that hardware is treated andrecognized by Linux; it would cover the motherboard’s variouscomponents and how they are connected via internal buses aswell as how peripherals are connected to the system via externalbuses such as USB, SCSI, and others. We don’t need to do that inthis chapter, though, as Linux makes a fantastic virtualizationclient, and when you install a Linux distribution into avirtualization environment, you can choose from a set ofpreconfigured options the components you want Linux todiscover and use. For example, most virtualization environmentsinclude options for disk drives that include the SCSI interface aswell as the IDE interface.Oracle’s VirtualBox environment gives you seven differentpossible disk controller options, the most common being IDE,SCSI and SATA. The choices for storage controllers in Oracle’sVirtualBox virtualization application are as follows: • Add IDE Controller• Add SATA Controller• Add SCSI Controller• Add SAS Controller• Add Floppy Controller• Add USB Controller• Add NVMe ControllerInstalling Linux as a Study ToolMany years ago, learning an operating system was an exercise inphysical devices, and a big part of it was operating systeminstallation and reinstallation. It typically included a lot ofwaiting for files to be copied and troubleshooting of errors ormisconfigurations. This frustrating process was mainly due to theneed to install directly onto a physical system; virtualizationenvironments had not yet become widely available.The process is much easier today. Now you can download avirtualization environment or helper application, download anISO file of your selected distribution, and have Linux installedand ready for use in as little as a few minutes.Ideally, you want an environment that doesn’t require a lot oflong wait times or troubleshooting issues. This chapter looks atsome recommendations for getting started.Setting Up a Virtualized EnvironmentThe following sections detail the items you need to build avirtualized study environment. Keep in mind that these aresimply recommendations, and you can stay with them or go asfar in your own direction as you prefer. Most of all, rememberthat the goal is to get Linux installed and enable snapshots so youwill be able to go back when needed. The suggestions in thischapter help you make this process easier on yourself.Virtualization Host System You need a computer—either a desktop or a laptop—withsufficient specifications to be a reasonable virtualizationenvironment host. We recommend the following specifications asa minimum:• Processor: Use a recent AMD- or Intel-based desktop orlaptop (not a Chromebook).• Host operating system: The host OS is typically Windows,Mac OS X, or Linux, though VirtualBox supports Solaris andOpenSolaris as well.• Memory: You need at least 2GB to 4GB of RAM for the mainoperating system, plus 1GB or more for each of the virtualizedinstances of Linux.• Hard disk: Virtualization environments are pretty smallcompared to an entire operating system, so plan to allocateabout 10GB to 20GB per virtualized instance of Linux.• Network device: It used to be very important what networkcard or device you chose, but today, as long as you have anetwork device that can be assigned an IP address in yourvirtualized environment, that should be enough.• Guest operating systems: Because this is a book aboutlearning Linux, we don’t discuss any virtualizationenvironments that would not host a guest running Linux.Installation Media OptionsWhile you can likely still find physical installation CDs or DVDs,it’s recommended that you download ISO files (an image of a CDor DVD) either from a Linux distribution vendor’s site or fromvarious trusted sources.NoteYou should download and install at the very least two Linux distributions: oneof the RPM package style and one of the DEB package style. This is critical,because the Linux+ exam requires you to knowinstallation/configuration/removal methods for both package formats, and youneed to know how to update packages and installations on both package styles.One of the most trusted sources of Linux distros is the amazingand very active Distrowatch.com (www.distrowatch.com), whichhas been in business for almost 18 years at the time of thiswriting, serving countless pages of Linux distribution news,tutorials, and links to the many distributions, large and small,popular and obscure.Of course, you can go to the website of a commercial Linuxvendor and get a copy of the latest offering of its community (nosubscription fees) edition. The following are a few examples:• www.opensuse.org• www.centos.org• www.ubuntu.comIn addition, there are literally hundreds and maybe eventhousands of possible Linux distributions that you can download,install, and use to study for the Linux+ exam.Installing Linux is important, but it’s become less and less of thetotal Linux experience these days, and it doesn’t tend to take aninordinate amount of time. As mentioned earlier, Linuxinstallation isn’t really covered on the Linux+ exam. Therefore,this chapter shows how to do a couple sample installations so youcan decide whether you want to go further with otherdistributions.Downloading ISO FilesTo download an ISO file of your favorite distribution, go to thedownload page, click on the latest version, choose 64-bit ifthere’s a choice between 32-bit and 64-bit, and then save the ISOfile to your local system’s drive.This section walks through downloading an RPM package(openSUSE) and a DEB package (Ubuntu).Downloading an openSUSE ISO for Installation To download the RPM distribution, navigate in your browser towww.opensuse.org and hover over the Leap green text on theright side of the page, and then click on the Install Leap link thatshows up.Figure 1-1 shows the download page for openSUSE’s Leapdistribution.Figure 1-1 Download page for the openSUSE Leap distributionThe main Leap download page then shows up. Notice that youcan use the default Installation x86_64 source at 3.6GB, and youcan leave the Network Image setting alone for now (unless youalready know what you are doing with a network install).The Live x86_64 link in the middle right of Figure 1-1 is for whenyou want to use a Live distribution, which is a distro that willonly use your system’s memory and will not be installed to thehard disk.Choose one of the green links under the DVD Image (3.6GB)header to start downloading the ISO file. The Direct Link optionis the most straightforward, so use that one if you are not familiar with mirrors or torrents.When the Save or Open dialog opens, choose to save the file—andremember where you put it. It is a good idea to put all your ISOsin a common /home/iso folder or, if on Windows, somewherein your file structure that makes sense to you.Figure 1-2 shows the dialog that pops up for saving the ISO file todisk on a Mac.Figure 1-2 Saving an openSUSE ISO file to diskDownloading an Ubuntu ISO for InstallationSelecting and downloading an openSUSE distro is easy, butgetting an Ubuntu distribution is even easier: Navigate towww.ubuntu.com and click on the Download menu, and choosethe Ubuntu Desktop LTS (Long Term Support) version listedthere. When a dialog pops up, you should choose to save the ISOfile to your preferred location on your local disk.Installing an Ubuntu Virtual MachineThis section shows how to install Ubuntu inside VirtualBox. Youneed to either download and install VirtualBox or use the virtual machine environment of your choice.NoteThe VirtualBox documentation is comprehensive and excellent, and youshould open the online version of the manual before beginning to work withthe software (see https://www.virtualbox.org/manual/UserManual.html).Creating the Virtual MachineFollow these simple steps to create the virtual machine:NoteTo keep this section brief, we show screenshots only when really needed.Step 1. Start the VirtualBox application and click the Newicon at the top left of the VirtualBox interface.Step 2. On the Name and Operating System screen, entera. ubuntustudyb. Type: Linuxc. Version: Ubuntu (64-bit)Step 3. Click Continue.Step 4. On the Memory Size screen enter 2048 in thetextbox and click Continue.Step 5. On the Hard Disk screen, choose the Create aVirtual Hard Disk Now selection and click the Createbutton.Step 6. On the Hard Disk File Type screen, make sure VDI(VirtualBox Disk Image) is selected, and click Continue.Step 7. On the Storage on Physical Hard Disk screen, selectthe Dynamically Allocated item and click Continue. Step 8. On the File Location and Size screen, ensure thatubuntustudy is entered in the textbox, ensure that thesize is set to 10.00GB, and click Create.The main Oracle VM VirtualBox Manager window reappears, andyou should see the ubuntustudy virtual machine in the left panel.At this point, the virtual machine should be powered off.Attaching the Distribution ISOEnsure that the VirtualBox application is running and that youcan see the ubuntustudy virtual machine in the list on the left.The ubuntustudy VM should not be powered on for this stage.Follow these steps:Step 1. Right-click the ubuntustudy virtual machine andselect Settings.Step 2. When the Settings screen appears, click on theStorage icon, and then click the small CD-ROM icon withthe green + on it that is slightly to the right of theController: IDE Storage Device to add an optical drive.Step 3. When prompted about adding a new optical drive tothe IDE controller, click the Choose Disk item to open afile chooser dialog.Step 4. Navigate to the location of your ISO file for Ubuntu18.x, click on the ISO file, and click the Open button.Step 5. When the system returns to the Storage dialog,confirm that the ubuntu-xxxxx.iso file appears as anitem under the Controller: IDE tree, and click OK.Installing Ubuntu on a Virtual MachineTo install Ubuntu on a VM, follow these steps:Step 1. When the main application appears, right-click on theubuntustudy virtual machine, select Start, and clickon the Normal Start item to start the virtual machinenormally. NoteAs the virtual machine boots, you may see one or more messages, such as“You have the Auto capture keyboard option turned on,” at the top of theinterface. You can read each message and then click on the blue circle withthe white x in it to dismiss the messages one time, or you can click the Nexticon to dismiss a message and prevent it from showing again.Step 2. When the virtual machine boots and you have achoice of selecting either Try Ubuntu or Install Ubuntu,choose Install Ubuntu.Step 3. On the Keyboard Layout screen, choose theappropriate settings and click Continue.Step 4. On the Updates and Other Software screen, leave theNormal Installation radio button selected and deselectthe Download Updates while Installing Ubuntucheckbox. Then click Continue.Step 5. On the Installation Type screen, be sure the EraseDisk and Install Ubuntu radio button is selected, andclick Install Now.Step 6. On the Write the Changes to Disk? screen, clickContinue.Step 7. On the Where Are You? screen, choose theappropriate time zone and click Continue.Step 8. On the Who Are You? screen, fill in the followingdetails:a. Your Name: Tuxb. Your Computer’s Name: ubuntustudyc. Pick a Username: tuxd. Choose a Password: linuxe. Confirm Your Password: linuxEnsure that the Require My Password to Log In box is checked.Step 9. Click Continue to begin the installation of thesystem.NoteThis process takes a few minutes, during which you see the “Beaver” screenand the software is installed to the system.Step 10. When the Installation Complete dialog appears, clickthe Restart Now button.Step 11. When presented with the final installation screen, yousee the request “Please remove the installation medium,then press Enter” because the system doesn’t know it’s adisc image. The system should boot normally withoutyour doing anything to disconnect the image, so simplypress Enter. The system restarts and presents you withthe login window.Step 12. Click the orange Tux User box.Step 13. Type the password you entered earlier and click SignIn.Step 14. When signed in and presented with the What’s Newin Ubuntu screen, click the green Next button.Step 15. On the LivePatch screen, click the green Next button.Step 16. On the Help Improve Ubuntu screen, click No,Don’t Send System Info and click the green Nextbutton.NoteSteps 16 and 17 might not appear in the order presented here; simply answerthem as they occur. Step 17. On the You’re Ready to Go! screen, click the greenDone button.Step 18. If presented with Software Updater popups, clickRemind Me Later (rather than doing the installationright away).Getting to the Command LineTo open a terminal/command line prompt on Ubuntu:Step 1. Click on the Activities menu at the top left of theinterface.Step 2. In the dialog box, type terminal.Step 3. When the Terminal icon appears, click on it to openthe Terminal app.You can also find the Terminal icon toward the bottom of theleft-hand margin, under the Favorites menu.NoteDepending on your screen size, you may or may not have to scroll down theFavorites menu to see the Terminal icon.You’ll be opening the terminal approximately 300 times as youread this book. To make opening it easier, you can arrange theFavorites menu to keep the Terminal icon in view or move theicon further up in the Favorites menu.When you have the command line/shell/terminal open,rearrange it so that you get the maximum amount of space totype your commands. You can easily do this by clicking on thesquare Maximize button to the left of the x Close button on theterminal application window.The Importance of SnapshotsIt is very important to take an initial snapshot of your study machine. Doing so will prevent you from having to reinstall thevirtual machine if you make mistakes or misconfigurations.Taking a SnapshotTo take a snapshot of a running virtual machine, you must beworking with the menu items in the virtual machine instance—not Ubuntu’s File and other menus but the VirtualBox menus forthat virtual machine. Follow these steps to take a snapshot:Step 1. With the virtual machine running, and not in fullscreen, click on the VirtualBox main menu’s Machineitem.Step 2. Click the Take Snapshot menu item.Step 3. When the Snapshot dialog appears, replace theSnapshot 1 text with After Installation. Optionally,add a description in the Snapshot Description textbox.Click OK.Step 4. When the snapshot progress bar finishes and youhave access to the main window again, you can makechanges to the installed system and, if necessary, restorethe After Installation snapshot.Restoring a SnapshotRestoring a snapshot effectively takes you back to the systemstate that existed when the snapshot was taken. Follow thesesteps:Step 1. Navigate to the main VirtualBox Manager screen.Step 2. Select the ubuntustudy virtual machine on the leftcolumn.Step 3. Click on the Snapshots button at the top right of theinterface. (Click the Machine Tools button, if needed,to make the Snapshots button visible.) The snapshotsthat exist for the ubuntustudy virtual machine aredisplayed. Step 4. If any changes have occurred since the snapshot wasmade and you want your restore to include them, selectthe Current State (changed) item in the subordinatehierarchy.Step 5. To restore the After Installation snapshot, right-clickthe Snapshot and choose the Restore option from themenu.Step 6. When you are prompted about restoring from thesnapshot, uncheck the Create a Snapshot of theCurrent Machine State checkbox, and click theRestore button to restore the snapshot.By using snapshots properly and often, you can recover fromalmost any problem. As you work through this book, you mightwant to take a snapshot before working through each exercise.Then, if anything goes amiss, you can easily recover your system.SUMMARYIn this chapter you learned how to create a proper studyenvironment for your certification preparation by installing avirtual machine manager such as Oracle VirtualBox, creating avirtual machine, getting the necessary ISO files, and installingLinux inside that virtual machine. You also learned aboutsnapshots, including how to make and restore them.This study environment will serve you well, allowing you to makeas many mistakes as you need to and still be able to undo thosemistakes.By shortening the time between the occurrence of an error andgetting your system back to being operational, you can mostrapidly study for the exam and gain the Linux knowledge youneed.Please don’t forget to install a second virtual machine of an RPMpackage style, such as openSUSE, CentOS, or Arch. Chapter 2. Package Installation andManagementThis chapter covers the following topics:• Package types• Installation tools• Build tools• Repositories• Acquisition commandsThe exam objectives covered in this chapter are asfollows:• Objective 2.1: Given a scenario, conduct softwareinstallations, configuration, updates, and removals.A Linux system is meant to be useful, such as serving as somekind of application server or allowing a user to read email orbrowse the web. The Linux kernel is great, but by itself it doesn’tdo much; to make a Linux system useful, you need software.A lot of software is available for Linux; you just need to install it.You can install software in a few ways, depending on yourdistribution and how the software was packaged.At one point software was distributed in source format, whichneeded to be compiled into something that could run on acomputer. Source format is still around, but as a community,we’ve moved on to distributing binary packages that are mucheasier to install. Binary packages avoid the compilation step (bybeing already compiled); in addition, dependencies, libraries,configuration, and documentation are automatically managed.There are a few different formats of these packages, but two aremost prevalent: Debian style and Red Hat style. You are expectedto know both of these main styles for the Linux+ exam because many computing environments have both types of systems, andthe package style used depends on the project and the servicesbeing provided by the systems.“DO I KNOW THIS ALREADY?” QUIZThe “Do I Know This Already?” quiz enables you to assesswhether you should read this entire chapter or simply jump tothe “Exam Preparation Tasks” section for review. If you are indoubt, read the entire chapter. Table 2-1 outlines the majorheadings in this chapter and the corresponding “Do I Know ThisAlready?” quiz questions. You can find the answers in AppendixA, “Answers to the ‘Do I Know This Already?’ Quizzes andReview Questions.”Table 2-1 “Do I Know This Already?” Foundation Topics Section-to-Question MappingCautionThe goal of self-assessment is to gauge your mastery of the topics in thischapter. If you do not know the answer to a question or are only partially sureof the answer, you should mark that question as wrong for purposes of theself-assessment. Giving yourself credit for an answer you correctly guessskews your self-assessment results and might provide you with a false senseof security.1. Which of the following is most likely a Debian/Ubuntupackage file? a. packagename.tgzb. packagename.rpmc. packagename.debd. packagename.sh2. A package is described as being a type of cpio archive withsome added meta information. Which package type bestdescribes this sort of package?a. RPMb. Slackwarec. Debiand. Gentoo3. How could you install a package called foo-1.2.3.rpm?(Choose two.)a. yum install foo-1.2.3.rpmb. rpm -i foo-1.2.3.debc. dpkg --update foo-1.2.3.rpmd. apt-get insert foo-1.2.3.rpm4. If you want to install a local RPM package (rpm -i) andignore any dependency errors, what do you need to do?a. Nothing; this is the default.b. Add --force-depends.c. Add --force-nodeps.d. Add --force-install.5. You wish to compile a software package on your system.Which of the following must be run first in order to customizethe makefile for your system?a. make confb. /configurec. conf makefile.c d. .configure6. A command you compiled from source isn’t executingproperly. Which of the following could you use to see whatlibraries it depends on?a. ldconfigb. lddc. ldattachd. ls --lib7. You are manually configuring a software repository on asystem. Which of the following can contain a repositorydefinition?a. /etc/apt/sources.listb. /var/rpmc. /sys/dpkg/reposd. /var/cache/apt.d8. True or false: The rpm command manages packages; theyum command handles repositories.a. Trueb. False9. You wish to retrieve an RPM package file from a remotepackage repository, and you have the full URL of the requiredfile. Which command do you use? (Choose two.)a. wgetb. dloadc. getfiled. curl10. You want to create a local file that contains the content ofthe main page for the site www.example.com. Which of thefollowing will accomplish this? a. curl www.example.comb. curl -o www.example.comc. curl -O www.example.comd. curl www.example.com > index.htmlFOUNDATION TOPICSSOFTWARE IN A LINUX SYSTEMA typical piece of software is composed of five pieces:• Binaries: You execute files—called commands, programs,applications, binaries, or executables—to perform particulartasks. We’ll call them commands throughout this book. Whena command is executed, the kernel loads it into memory andstarts running the instructions.• Libraries: Libraries are shared components such asmethods to read files from a disk or display a certaingraphical widget.• Configuration: Configuration is usually in the form of oneor more files that are read by and direct the application as tohow it should behave when executed and running.• Documentation: Documentation provides instructions onhow to use the software.• Data: Data is stored text or binary information.These five pieces of information might be spread about yourfilesystem according to the Filesystem Hierarchy Standard(FHS). If you want to upgrade your software, you generally haveto reinstall the new version on top of the old one, but doing socan leave older versions of some files lying around. Eventuallyyou end up with several outdated pieces that you’re not surewhether you can delete, and your system gets messy. The sameproblem happens when you delete software.The FHS describes where particular types of files are to be placed, which helps maintain consistency across differentdistributions.Shared LibrariesMuch of what a software developer needs to do has already beendone in some other program. Linux has libraries that handletasks such as writing files to disk, displaying windows, and eventalking over the network. Libraries are reusable components thata software developer can link to an application so that thelibrary’s functionality can be used. A...

关注我们

关注微信公众号

您选择了以下内容