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», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

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

Интервал:

Закладка:

Сделать

You can also look for a single installed package.

$ dnf list installed bash Installed Packages bash.x86_64 4.4.19-10el8 @BaseOS $

If the package isn't installed, dnfwill tell you.

$ dnf list installed zsh Error: No matching Packages to list $

You can then check if the package is available in the software repository by using the listoption with the software package name.

$ dnf list zsh Last metadata expiration check: 0:00:18 ago on Sat 05 Dec 2020 10:33:03 AM EST. Available Packages zsh.x86_64 5.5.1-6.el8_1.2 BaseOS $

Finally, if you need to find out what software package provides a particular file on your filesystem, use the providesoption.

dnf provides file_name

Here's an example of trying to find what software provided the file /usr/bin/gzip:

$ dnf provides /usr/bin/gzip Last metadata expiration check: 0:04:02 ago on Sat 05 Dec 2020 10:32:22 AM EST. gzip-1.9-9.el8.x86_64 : The GNU data compression program Repo : @System Matched from: Filename : /usr/bin/gzip gzip-1.9-9.el8.x86_64 : The GNU data compression program Repo : BaseOS Matched from: Filename : /usr/bin/gzip $

dnfchecked two separate repositories: the local system (denoted by @System) and the default fedora repository (denoted by BaseOS). That allows you to easily check whether there's an update available for the file.

Installing Software with dnf

Installation of a software package using dnfis simple. All you need is the installoption, followed by the package name.

dnf install package_name

This installs not only the software package specified, but also any package dependencies. The output will show you the package information, along with any dependent packages required to install, and prompt you to continue the installation.

картинка 25Real World Scenario

INSTALLING SOFTWARE USING DNF

In this exercise, you'll install the Z shell software package using the dnftool on your CentOS server.

1 Log into your CentOS server as the root user account, using the password you created in Chapter 4, “Installing a Red Hat Server.”

2 From the command prompt, enter the command dnf install zsh. You should see output that's similar to this:# dnf install zsh CentOS-8 - AppStream 2.4 kB/s | 4.3 kB 00:01 CentOS-8 - AppStream 883 kB/s | 6.2 MB 00:07 CentOS-8 - Base 154 B/s | 3.9 kB 00:25 CentOS-8 - Base 865 kB/s | 2.3 MB 00:02 CentOS-8 - Extras 2.3 kB/s | 1.5 kB 00:00 CentOS-8 - Extras 8.3 kB/s | 8.1 kB 00:00 Dependencies resolved. ============================================================================= Package Architecture Version Repository Size ============================================================================= Installing: zsh x86_64 5.5.1-6.el8_1.2 BaseOS 2.9 M Transaction Summary ============================================================================= Install 1 Package Total download size: 2.9 M Installed size: 7.2 M Is this ok [y/N]: y Downloading Packages: zsh-5.5.1-6.el8_1.2.x86_64.rpm 392 kB/s | 2.9 MB 00:07 ------------------------------------------------------------------------------ Total 362 kB/s | 2.9 MB 00:08 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : zsh-5.5.1-6.el8_1.2.x86_64 1/1 Running scriptlet: zsh-5.5.1-6.el8_1.2.x86_64 1/1 Verifying : zsh-5.5.1-6.el8_1.2.x86_64 1/1 Installed products updated. Installed: zsh-5.5.1-6.el8_1.2.x86_64 Complete! #

3 Test the installation by entering the command zsh. You will see a prompt from the new Z shell. If you receive an error message, something went wrong.

4 Return to the Bash Shell by entering the command exit.

5 Check whether the installation processed properly by entering the command dnf list installed zsh. You should see the package appear, as shown here: # dnf list installed zsh Installed Packages zsh.x86_64 5.5.1-6.el8_1.2 @BaseOS #

ROOT PRIVILEGES

To install new software packages, you must have root privileges, either by logging in as the root user account or by using the sudocommand before the dnfcommand to gain root privileges for your user account.

Upgrading Software with dnf

In most Linux distributions, when you're working away in the graphical user interface (GUI), you get those nice little notification icons telling you a software upgrade to a new version is needed. Here at the command line, it takes a little more work.

To see the list of all the available upgrades for your installed packages, type the following command:

dnf list upgrades

If you see that a particular software package needs upgrading, then type in the following command:

dnf upgrade package_name

If you'd like to upgrade all the packages listed in the upgrade list, just enter the following command:

dnf upgrade

One nice feature in dnfis the upgrade‐minimalcommand. It upgrades a package to the latest bug fix or security patch version instead of the latest and greatest version.

Uninstalling Software with dnf

The dnftool also provides an easy way to uninstall software you no longer need by using the removeoption.

# dnf remove zsh Dependencies resolved. ============================================================================== Package Architecture Version Repository Size ============================================================================== Removing: zsh x86_64 5.5.1-6.el8_1.2 @BaseOS 7.2 M Transaction Summary ============================================================================== Remove 1 Package Freed space: 7.2 M Is this ok [y/N]: y Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: zsh-5.5.1-6.el8_1.2.x86_64 1/1 Erasing : zsh-5.5.1-6.el8_1.2.x86_64 1/1 Running scriptlet: zsh-5.5.1-6.el8_1.2.x86_64 1/1 Verifying : zsh-5.5.1-6.el8_1.2.x86_64 1/1 Installed products updated. Removed: zsh-5.5.1-6.el8_1.2.x86_64 Complete! #

Unlike the Ubuntu apttool, dnfdoesn't provide an option to remove the application files but keeps any configuration or data files. When you remove a package, everything associated with that package is removed.

Handling Broken Dependencies

Sometimes as multiple software packages get loaded, a software dependency for one package can get overwritten by the installation of another package. This is called a broken dependency .

If this should happen on your system, first try the following command:

dnf clean all

Then try to use the upgradeoption in the dnfcommand. Sometimes, just cleaning up any misplaced files can help.

If that doesn't solve the problem, try the following command:

dnf repoquery --deplist package_name

This command displays all the package's library dependencies and what software package provides them. Once you know the libraries required for a package, you can then install them. Here's an example of determining the dependencies for the zsh package:

# dnf repoquery --deplist zsh CentOS Linux 8 - AppStream 1.3 MB/s | 6.2 MB 00:04 CentOS Linux 8 - BaseOS 867 kB/s | 2.3 MB 00:02 package: zsh-5.5.1-6.el8_1.2.x86_64 dependency: /bin/sh provider: bash-4.4.19-12.el8.x86_64 dependency: coreutils provider: coreutils-8.30-8.el8.x86_64 dependency: grep provider: grep-3.1-6.el8.x86_64 dependency: info provider: info-6.5-6.el8.x86_64 dependency: libc.so.6(GLIBC_2.15)(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libdl.so.2()(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libdl.so.2(GLIBC_2.2.5)(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libgdbm.so.6()(64bit) provider: gdbm-libs-1:1.18-1.el8.x86_64 dependency: libm.so.6()(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libm.so.6(GLIBC_2.2.5)(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libm.so.6(GLIBC_2.23)(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libncursesw.so.6()(64bit) provider: ncurses-libs-6.1-7.20180224.el8.x86_64 dependency: libpcre.so.1()(64bit) provider: pcre-8.42-4.el8.x86_64 dependency: librt.so.1()(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: librt.so.1(GLIBC_2.2.5)(64bit) provider: glibc-2.28-127.el8.x86_64 dependency: libtinfo.so.6()(64bit) provider: ncurses-libs-6.1-7.20180224.el8.x86_64 dependency: rtld(GNU_HASH) provider: glibc-2.28-127.el8.i686 provider: glibc-2.28-127.el8.x86_64 #

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

Интервал:

Закладка:

Сделать

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

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


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

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

x