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

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

Интервал:

Закладка:

Сделать

Debian‐based distributions such as Ubuntu use, at the base of their package management system utilities, the dpkgcommand. This command interacts directly with the package management system on the Linux system and is used for installing, managing, and removing software packages.

The Red Hat–based distributions, such as CentOS, use the rpmcommand at the base of their package management system. Similar to the dpkgcommand, the rpmcommand can list installed packages, install new packages, and remove existing software.

Note that these two commands are the core of their respective package management system, not the entire package management system itself. Many Linux distributions that use the dpkgor rpmmethods have built additional specialty package management system utilities upon these base commands to make your life much easier. The following sections walk through the package management systems you'll find in Debian‐based systems, such as Ubuntu. Chapter 5, “Installing and Maintaining Software in Red Hat,” covers using the rpm package management system.

Inspecting the Debian‐Based Systems

The dpkgcommand is at the core of the Debian‐based family of package management system tools. It provides options to install, update, and remove Debian package files on your Linux system.

The dpkgcommand assumes you have the package file either downloaded onto your local Linux system or available as a URL. More often than not, that isn't the case. Usually you'll want to install an application package from the repository for your Linux distribution. To do that, you'll use the Advanced Package Tool (APT) suite of tools.

apt‐cache

apt‐get

apt

The aptcommand is essentially a front end for both the apt‐cacheand apt‐getcommands. The nice thing about APT is that you don't need to remember which tool to use when—it covers everything you need to do with package management. The basic format for the aptcommand is

apt [options] command

The command defines the action for aptto take. If needed, you can specify one or more options to fine‐tune what happens. This section looks at how to use the APT command‐line tool to work with the software packages on your Linux system.

Managing Packages with apt

A common task that Linux system administrators face is to determine what packages are already installed on the system. The apt listcommand displays all the packages available in the repository, but by adding the ‐‐installedoption, you can limit the output to only those packages already installed on your system.

$ apt --installed list Listing… accountsservice/focal-updates,focal-security,now 0.6.55-0ubuntu12~20.04.4 amd64 [installed,automatic] adduser/focal,now 3.118ubuntu2 all [installed,automatic] alsa-topology-conf/focal,now 1.2.2-1 all [installed,automatic] alsa-ucm-conf/focal-updates,now 1.2.2-1ubuntu0.4 all [installed,automatic] amd64-microcode/focal,now 3.20191218.1ubuntu1 amd64 [installed,automatic] apparmor/focal-updates,now 2.13.3-7ubuntu5.1 amd64 [installed,automatic] apport-symptoms/focal,now 0.23 all [installed,automatic] apport/focal-updates,focal-security,now 2.20.11-0ubuntu27.12 all [installed,automatic] … $

As you can guess, the list of installed packages will be long, so we've abbreviated the output to show just a sample of what the output looks like. Next to the package name is additional information about the package, such as the version name, and whether the package is installed and flagged for automatic upgrades.

If you already know the package name and want to quickly display detailed information about it, use the showcommand.

apt show package_name

Here's an example of displaying the details of the package zsh:

$ apt show zsh Package: zsh Version: 5.8-3ubuntu1 Priority: optional Section: shells Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Debian Zsh Maintainers Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2,390 kB Depends: zsh-common (= 5.8-3ubuntu1), libc6 (>= 2.29), libcap2 (>= 1:2.10), libtinfo6 (>= 6) Recommends: libgdbm6 (>= 1.16), libncursesw6 (>= 6), libpcre3 Suggests: zsh-doc Homepage: https://www.zsh.org/ Download-Size: 707 kB APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages Description: shell with lots of features Zsh is a UNIX command interpreter (shell) usable as an interactive login shell and as a shell script command processor. Of the standard shells, zsh most closely resembles ksh but includes many enhancements. Zsh has command-line editing, built-in spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and a host of other features. $

The apt showcommand does not indicate that the package is installed on the system. It shows only detailed package information from the software repository. One detail you cannot get with aptis a listing of all the files associated with a particular software package. To get this list, you will need to go to the dpkgcommand itself.

dpkg -L package_name

Here's an example of using dpkgto list all the files installed as part of the apt‐utilspackage:

$ dpkg -L apt-utils /. /usr /usr/bin /usr/bin/apt-extracttemplates /usr/bin/apt-ftparchive /usr/bin/apt-sortpkgs /usr/lib /usr/lib/apt /usr/lib/apt/planners /usr/lib/apt/planners/apt /usr/lib/apt/solvers /usr/lib/apt/solvers/apt … $

You can also do the reverse—find what package a particular file belongs to, as shown here:

dpkg --search absolute_file_name

Note that you need to use an absolute file reference for this to work.

$ dpkg --search /usr/bin/apt-ftparchive apt-utils: /usr/bin/apt-ftparchive $

The output shows the apt‐ftparchivefile was installed as part of the apt‐utilspackage.

Installing Software Packages with apt

Now that you know more about listing software package information on your system, this section walks you through a software package installation. First, you'll want to determine the package name to install. How do you find a particular software package? Use aptwith the searchcommand.

apt search package_name

The beauty of the searchcommand is that you do not need to insert wildcards around package_name. Wildcards are implied. By default, the search command displays packages that contain the search term in either the package name or the package description, which can be misleading at times. If you want to limit the output to only package names, include the ‐‐names‐onlyoption.

$ apt --names-only search zsh Sorting… Done Full Text Search… Done fizsh/focal,focal 1.0.9-1 all Friendly Interactive ZSHell zsh/focal 5.8-3ubuntu1 amd64 shell with lots of features zsh-antigen/focal,focal 2.2.3-2 all manage your zsh plugins zsh-autosuggestions/focal,focal 0.6.4-1 all Fish-like fast/unobtrusive autosuggestions for zsh zsh-common/focal,focal 5.8-3ubuntu1 all architecture independent files for Zsh zsh-dev/focal 5.8-3ubuntu1 amd64 shell with lots of features (development files) zsh-doc/focal,focal 5.8-3ubuntu1 all zsh documentation - info/HTML format zsh-static/focal 5.8-3ubuntu1 amd64 shell with lots of features (static link) zsh-syntax-highlighting/focal,focal 0.6.0-3 all Fish shell like syntax highlighting for zsh zsh-theme-powerlevel9k/focal,focal 0.6.7-2 all powerlevel9k is a theme for zsh which uses powerline fonts zshdb/focal,focal 1.1.2-1 all debugger for Z-Shell scripts $

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

Интервал:

Закладка:

Сделать

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

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


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

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

x