
linfun Documentation Release 0.0.1 rob green Jul 18, 2018 Contents 1 Chapter 5. PACKAGE MANAGEMENT SYSTEMS3 1.1 Chapter 5.1................................................3 1.2 Chapter 5.2................................................3 1.3 Chapter 5.3 Software Packaging Concepts................................3 1.4 Chapter 5.4 Why Use Packages.....................................4 1.5 Chapter 5.5 Package Types........................................4 1.6 Chapter 5.6 Available Package Management Systems..........................4 1.7 Chapter 5.7 Packaging Tool Levels and Variables............................4 1.8 Chapter 5.8 Package Sources.......................................5 1.9 Chapter 5.9 Creating Package Sources..................................5 1.10 Chapter 5.10 Revision Control Systems.................................5 1.11 Chapter 5.12 The Linux Kernel and the Birth of git...........................6 1.12 Chapter 5.13 How git Works. ......................................6 2 Chapter 6. THE RED HAT PACKAGE MANAGER RPM7 2.1 Chapter 6.3................................................7 2.2 Chapter 6.4................................................7 2.3 Chapter 6.5................................................8 2.4 Chapter 6.6................................................8 3 Chapter 7. DPKG 9 3.1 Chapter 7.3 DPKG Essentials......................................9 3.2 Chapter 7.4 Package File Names.....................................9 3.3 Chapter 7.5 Source Packages I...................................... 10 3.4 Chapter 7.5b Source Packages II..................................... 10 3.5 Chapter 7.6 DPKG Queries....................................... 10 3.6 Chapter 7.7 Installing/Upgrading/Uninstalling Packages........................ 10 4 Chapter 10. APT 13 4.1 Chapter 10.3 What is APT?....................................... 13 4.2 Chapter 10.4 apt-get........................................... 13 4.3 Chapter 10.5 Queries using apt-cache.................................. 13 4.4 Chapter 10.6a Installing/ removing/ upgrading I............................ 14 4.5 Chapter 10.6b Installing/ removing/ upgrading II............................ 14 5 Chapter 11. SYSTEM MONITORING 15 5.1 Chapter 11.3 Available Monitoring Tools I............................... 15 i 5.2 Chapter 11.3 Available Monitoring Tools III.............................. 15 5.3 Chapter 11.3 Available Monitoring Tools IV.............................. 16 5.4 Chapter 11.4 The /proc and /sys Psuedo-filesystems.......................... 16 5.5 Chapter 11.5 /proc basics........................................ 16 5.6 Chapter 11.6 A survey of /proc I..................................... 17 5.7 Chapter 11.6.b A survey of /proc II................................... 17 5.8 Chapter 11.6.c A survey of /proc III................................... 18 5.9 Chapter 11.6.d A survey of /proc IV................................... 18 5.10 Chapter 11.7.a /proc/sys I........................................ 19 5.11 Chapter 11.7.b /proc/sys II........................................ 20 5.12 Chapter 11.7.c /proc/sys III....................................... 20 5.13 Chapter 11.8 /sys Basics......................................... 20 5.14 Chapter 11.9.a A Survey of /sys I.................................... 20 5.15 Chapter 11.9.b A Survey of /sys II.................................... 21 5.16 Chapter 11.9.c A Survey of /sys III................................... 21 5.17 Chapter 11.9.c A Survey of /sys IV................................... 21 5.18 Chapter 11.10.a sar I........................................... 22 5.19 Chapter 11.10.b sar II.......................................... 22 5.20 Chapter 11.10.c sar III.......................................... 22 6 Chapter 12 Monitoring Tools (processes) 25 6.1 Chapter 12.4 Viewing process states with ps.............................. 25 6.2 Chapter 12.5 BSD option format for ps ................................. 25 6.3 Chapter 12.6 ps Output fields I...................................... 26 6.4 Chapter 12.6.b ps Output fields II.................................... 26 6.5 Chapter 12.7.a UNIX Output fields for ps I............................... 27 6.6 Chapter 12.7.b UNIX Option format for ps II.............................. 27 6.7 Chapter 12.8 Customizing the ps Output................................ 28 6.8 Chapter 12.9 Using pstree........................................ 28 6.9 Chapter 12.10 Viewing System Loads with top............................. 29 6.10 Chapter 12.11 top Options I....................................... 29 6.11 Chapter 12.11 top Options II....................................... 30 7 Chapter 13. Memory: Monitoring Usage and Tuning 31 7.1 Chapter 13.3 Memory Tuning Considerations:............................. 31 7.2 Chapter 13.4 Memory Monitoring Tools:................................ 31 7.3 Chapter 13.5.a /proc/sys/vm I.................................... 32 7.4 Chapter 13.5.b /proc/sys/vm II (ENTRIES)............................ 32 7.5 Chapter 13.6.a vmstat I.......................................... 33 7.6 Chapter 13.6.b vmstat II......................................... 34 7.7 Chapter 13.6.c vmstat III......................................... 34 7.8 Chapter 13.6.d vmstat IV......................................... 35 7.9 Chapter 13.6.e vmstat V......................................... 35 7.10 Chapter 13.6.f vmstat VI......................................... 36 7.11 Chapter 13.6.g vmstat VII........................................ 36 7.12 Chapter 13.7.a /proc/meminfo I..................................... 36 7.13 Chapter 13.7.b /proc/meminfo II..................................... 37 7.14 Chapter 13.8.a OOM Killer I....................................... 37 7.15 Chapter 13.8.a OOM Killer II...................................... 38 8 KNOWLEDGE CHECK Q&A 39 8.1 CHAPTER 5 KNOWLEDGE CHECK Q&A.............................. 39 8.2 CHAPTER 6 KNOWLEDGE CHECK Q&A.............................. 39 8.3 CHAPTER 7 KNOWLEDGE CHECK Q&A.............................. 39 ii 8.4 CHAPTER 10 KNOWLEDGE CHECK Q&A............................. 39 8.5 CHAPTER 11 KNOWLEDGE CHECK Q&A............................. 40 8.6 CHAPTER 12 KNOWLEDGE CHECK Q&A............................. 40 9 License 43 10 Help 45 11 IndIces and tables 47 iii iv linfun Documentation, Release 0.0.1 SYS ADMIN: Contents 1 linfun Documentation, Release 0.0.1 2 Contents CHAPTER 1 Chapter 5. PACKAGE MANAGEMENT SYSTEMS 1.1 Chapter 5.1 1.2 Chapter 5.2 1.3 Chapter 5.3 Software Packaging Concepts Package management systems supply the tools that allow system administrators to automate installing, upgrading, configuring and removing software packages in a known, predictable and consistent manner. These systems: Gather and compress associated software files into a single package (archive), which may require one or more other packages to be installed first. Allow for easy software installation or removal. Can verify file integrity via an internal database. Can authenticate the origin of packages. Facilitate upgrades. Group packages by logical features. Manage dependencies between packages. A given package may contain executable files, data files, documentation, installation scripts and configuration files. Also included are metadata attributes such as version numbers, checksums, vendor information, dependencies, de- scriptions, etc. Upon installation, all that information is stored locally into an internal database which can be conveniently queried for version status and update information. 3 linfun Documentation, Release 0.0.1 1.4 Chapter 5.4 Why Use Packages Software package management systems are widely seen as one of the biggest advancements Linux brought to enter- prise IT environments. By keeping track of files and metadata in an automated, predictable and reliable way, system administrators can use package management systems to make their installation processes scale to thousands of systems without requiring manual work on each individual system. Features include: Automation: No need for manual installs and upgrades. Scalability: Install packages on one system, or 10,000 systems. Repeatability and predictability. Security and auditing. 1.5 Chapter 5.5 Package Types Packages come in several different types: Binary packages contain files ready for deployment, including executable files and libraries. These are architecture- dependent and must be compiled for each type of machine. Source packages are used to generate binary packages; one should always be able to rebuild a binary package (for example, by using rpmbuild –rebuild on RPM-based systems) from the source package. One source package can be used for multiple architectures. Architecture-independent packages contain files and scripts that run under script interpreters, as well as documentation and configuration files. Meta-packages are essentially groups of associated packages that collect everything needed to install a relatively large subsystem, such as a desktop environment, or an office suite, etc. Binary packages are the ones that system administrators have to deal with most of the time. On 64-bit systems that can run 32-bit programs, one may have two binary packages installed for a given program, perhaps one with x86_64 or amd64 in its name, and the other with i386 or i686 in its name. Source packages can be helpful in keeping track of changes and source code used to come up with binary packages. They are usually not installed on a system by default, but can always be retrieved from the vendor. 1.6 Chapter 5.6 Available Package Management
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages53 Page
-
File Size-