Richard Blum - Mastering Linux System Administration

Здесь есть возможность читать онлайн «Richard Blum - Mastering Linux System Administration» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Mastering Linux System Administration: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Mastering Linux System Administration»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Achieve Linux system administration mastery with time-tested and proven techniques  In 
, Linux experts and system administrators Christine Bresnahan and Richard Blum deliver a comprehensive roadmap to go from Linux beginner to expert Linux system administrator with a learning-by-doing approach. Organized by do-it-yourself tasks, the book includes instructor materials like a sample syllabus, additional review questions, and slide decks. 
Amongst the practical applications of the Linux operating system included within, you’ll find detailed and easy-to-follow instruction on: 
Installing Linux servers, understanding the boot and initialization processes, managing hardware, and working with networks Accessing the Linux command line, working with the virtual directory structure, and creating shell scripts to automate administrative tasks Managing Linux user accounts, system security, web and database servers, and virtualization environments Perfect for entry-level Linux system administrators, as well as system administrators familiar with Windows, Mac, NetWare, or other UNIX systems, 
 is a must-read guide to manage and secure Linux servers.

Mastering Linux System Administration — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Mastering Linux System Administration», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

As you can see from the output, there are lots of different packages that must be installed for the Z shell to work properly. Good thing dnfensured they were all installed for us!

Working with RPM Repositories

Just like the aptsystems, dnfhas its software repositories set up at installation. For most purposes, these preinstalled repositories will work just fine for your needs. But if and when the time comes that you need to install software from a different repository, here are some things you will need to know.

ROGUE REPOSITORIES

These days, it's always a good idea to stick with approved repositories. An approved repository is one that is sanctioned by the distribution's official site. If you start adding unapproved repositories, you lose the guarantee of stability. And you will be heading into broken dependencies territory.

To see what repositories you are currently pulling software from, use the repolistoption.

# dnf repolist repo id repo name appstream CentOS Linux 8 - AppStream baseos CentOS Linux 8 - BaseOS extras CentOS Linux 8 - Extras #

If you don't find a repository you need software from, then you will need to do a little configuration file editing. There are two places where the dnfrepository definitions can be located.

In the /etc/dnf/dnf.conf configuration file

As separate files in the /etc/yum.repos.d directory

Good repository sites such as rpmfusion.orgwill lay out all the steps necessary to use them. Sometimes these repository sites will offer an RPM file that you can download and install. The installation of the RPM file will do all the repository setup work for you!

Working Directly with Packages

There may be some environments where your Linux server won't have Internet access to contact the repository to automatically download packages. For example, often high‐security environments block all network traffic except internal traffic. In these environments, you'll need a way to manually install or update software packages.

The main tool for working with .rpmfiles is the rpmprogram. The rpmutility is a command‐line program to install, modify, and remove .rpmsoftware packages. Its basic format is as follows:

rpm action [OPTION] package

Table 5.1describes the actions for the rpmcommand.

TABLE 5.1: The rpmCommand Actions

SHORT LONG DESCRIPTION
‐e ‐‐erase Removes the specified package
‐F ‐‐freshen Upgrades a package only if an earlier version already exists
‐i ‐‐install Installs the specified package
‐q ‐‐query Queries if the specified package is installed
‐U ‐‐upgrade Installs or upgrades the specified package
‐V ‐‐verify Verifies if the package files are present and the package's integrity

The following sections show how to use the rpmcommand to manually manage software packages.

Finding Package Files

If you need to obtain copies of RPM files on a Red Hat–based distro, such as CentOS or Fedora, you have a few different options. If you have a separate Linux system connected to the Internet, use the yumdownloaderutility. This downloads a specified rpm package file directly from the repository. The yumdownloadertool is part of the yum‐utilspackage, which you'll most likely need to install first; then you can download any rpm package from the repository.

$ yumdownloader zsh Last metadata expiration check: 0:21:30 ago on Sat 05 Dec 2020 08:49:35 AM EST. zsh-5.5.1-6.el8_1.2.x86_64.rpm 1.1 MB/s | 2.9 MB 00:02 $ ls -l zsh* -rw-r--r--. 1 root root 3039264 Dec 5 09:11 zsh-5.5.1-6.el8_1.2.x86_64.rpm $

The other method for obtaining rpm package files is using the distribution website. Most Linux distributions provide direct access to RPM files used in the distribution via a download site. For CentOS, click the RPMslink on the Download page ( mirror.centos.org/centos/8 /at the time of this writing), next to the distribution version you have installed on the server. This takes you to a repository of all the current rpm packages for that distribution.

Inspecting Package Files

Use the ‐qaction to perform a simple query on the package management database for installed packages.

$ rpm -q bashbash-4.4.19-12.el8.x86_64 $ rpm -q zshpackage zsh is not installed $

There are several options you can add to the query action to obtain more detailed information. Table 5.2shows a few of the more commonly used query options.

TABLE 5.2: The rpmCommand Query Action Options

SHORT OPTION LONG OPTION DESCRIPTION
‐c ‐‐configfiles Lists the names and absolute directory references of package configuration files
‐i ‐‐info Provides detailed information, including version, installation date, and signatures
N/A ‐‐provides Shows what facilities the package provides
‐R ‐‐requires Displays various package requirements (dependencies)
‐s ‐‐state Provides states of the different files in a package, such as normal(installed), not installed, or replaced
N/A ‐‐what‐provides Shows to what package a file belongs

You can also add the ‐iaction, which provides a detailed list of information on the package.

$ rpm -qi bashName : bash Version : 4.4.19 Release : 12.el8 Architecture: x86_64 Install Date: Sat 05 Dec 2020 08:43:49 AM EST Group : Unspecified Size : 6861588 License : GPLv3+ Signature : RSA/SHA256, Tue 21 Jul 2020 12:08:45 PM EDT, Key ID 05b555b38483c65d Source RPM : bash-4.4.19-12.el8.src.rpm Build Date : Tue 21 Jul 2020 12:03:55 PM EDT Build Host : x86-02.mbox.centos.org Relocations : (not relocatable) Packager : CentOS Buildsys Vendor : CentOS URL : https://www.gnu.org/software/bash Summary : The GNU Bourne Again shell Description : The GNU Bourne Again shell (Bash) is a shell or command language interpreter that is compatible with the Bourne shell (sh). Bash incorporates useful features from the Korn shell (ksh) and the C shell (csh). Most sh scripts can be run by bash without modification. $

From the output of the detailed query, you can see specific information, such as the date the package was installed and a brief description of the package.

LISTING INSTALLED PACKAGES

You can use the rpmcommand to list all the packages installed on your Linux system by using the ‐aoption with the rpm ‐qcommand, although the packages are returned in the order in which they were installed, which can make it hard to find a specific package. We like to use the command rpm ‐qa | sortto sort the output by package name.

Installing Package Files

There are a couple of ways to install an rpm package that you have downloaded. For a new package, use the ‐iaction to install the package. However, if an older version of the package already exists on your system, you'll receive an error message.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Mastering Linux System Administration»

Представляем Вашему вниманию похожие книги на «Mastering Linux System Administration» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Mastering Linux System Administration»

Обсуждение, отзывы о книге «Mastering Linux System Administration» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x