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

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

Интервал:

Закладка:

Сделать

It's more common to use the ‐Uaction, which installs the new package, or upgrades the package if it's already installed on the system. It has also become somewhat common to add the ‐vhoptions as well. The ‐hoption shows the progress of the update, and the ‐voption shows what it's doing.

rpm -Uvh package

It's also important to remember that you must have root privileges to manually install packages, either as the root user or as a user account with root privileges.

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

MANUALLY INSTALLING RPM PACKAGES

The zsh package is an alternative shell that you can find in the standard CentOS repository. Follow these steps to manually install it:

1 Log into your CentOS server, either as the root user account or as a user account with root privileges.

2 Download the zsh package from the CentOS repository. You can do this either by using the command yumdownloader zsh or by manually downloading the package from mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/ and copying the file to your CentOS server. At the time of this writing, the current zsh package is zsh‐5.5.1‐6.el8_1.2.x86_64.rpm.

3 Install the zsh package by entering the command rpm ‐Uvh zsh‐5.5.1‐6.el8_1.2.x86_64.rpm. You should see output similar to this:# rpm -Uvh zsh-5.5.1-6.el8_1.2.x86_64.rpm Verifying… ################################# [100%] Preparing… ################################# [100%] Updating / installing… 1:zsh-5.5.1-6.el8_1.2 ################################# [100%] #

4 Verify the installation by entering the command zsh. You should then get the Z shell prompt and not an error message.

5 Return to your normal Bash Shell by typing the command exit.

6 Check whether the installation processed properly by typing the command dnflist installed zsh. You should see the package appear, indicating that it is installed.

Even though you installed the zsh package using the rpmcommand‐line tool, it appears when you use the dnfcommand to list the installed packages. This shows that both commands install packages to the same package management database.

Removing Package Files

To remove an installed package, just use the ‐eaction for the rpmcommand.

# rpm -e zsh# rpm -q zshpackage zsh is not installed # dnf list installed zshError: No matching Packages to list #

The ‐eaction doesn't show if it was successful, but it will display an error message if something goes wrong with the removal. You can check to make sure the removal was successful by using the ‐qaction to query the package database or by using the dnf list installedcommand.

Using Flatpak Containers

As discussed in Chapter 3, “Installing and Maintaining Software in Ubuntu,” containers are software packaging systems that bundle all the files required to run an application into a single package. While this creates duplication of files, it helps eliminate the issue of conflicting library files and makes it easier to move application containers around between servers.

The flatpak application container format was created as an independent open source project with no direct ties to any specific Linux distribution. That said, battle lines have already been drawn, with Red Hat, CentOS, and Fedora oriented toward using flatpak instead of Canonical's snap container format.

While CentOS desktop distributions install flatpak by default, the CentOS server environment doesn't. However, you can easily install flatpak as a package using the standard dnfor rpmmethods.

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

INSTALLING FLATPAK

The flatpak container format provides quick installation of many popular application programs. To use flatpak on your CentOS server, you'll need to first install the software package and then install the repository configuration by following these steps:

1 Log onto your CentOS server as the root user account.

2 From the command‐line prompt, enter the command dnf install flatpak. There are lots of dependencies required, so you'll see quite a few packages install.

3 Once flatpak is installed, you will need to point it to a flatpak container repository. The most popular one is Flathub. Configure that by entering the command flatpak remote‐add ‐‐if‐not‐exists flathub https://flathub.org/repo/flathub.flatpakrepo. You should see output that's similar to this:# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo Note that the directories '/var/lib/flatpak/exports/share' '/root/.local/share/flatpak/exports/share' are not in the search path set by the XDG_DATA_DIRS environment variable, so applications installed by Flatpak may not appear on your desktop until the session is restarted. #

4 Test the flatpak command by entering the command flatpak list.# flatpak list #Not too exciting. When you first install flatpak, there won't be any containers installed, but now you know that flatpak is installed.

To find an application in the flatpak repository, you use the flatpak searchcommand.

# flatpak search mosh Name Description Application ID Version Branch Remotes Mosh The Mobile Shell org.mosh.mosh 1.3.2 stable flathub #

When working with a container, you must use its Application ID value and not its name. To install the application, use the flatpak installcommand.

# flatpak install org.mosh.mosh Looking for matches… Found similar ref(s) for 'mosh' in remote 'flathub' (system). Use this remote? [Y/n]: y Found ref 'app/org.mosh.mosh/x86_64/stable' in remote 'flathub' (system). Use this ref? [Y/n]: y Required runtime for org.mosh.mosh/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/20.08) found in remote flathub Do you want to install it? [Y/n]: y … Installation complete. #

To check whether the installation went well, you can use the flatpak listcommand again.

# flatpak list Name Application ID Version Branch Installation Freedesktop Plat… org.freedesktop.Platform 20.08.2 20.08 system default …freedesktop.Platform.GL.default 20.08 system openh264 …g.freedesktop.Platform.openh264 2.1.0 2.0 system Mosh org.mosh.mosh 1.3.2 stable system #

Finally, to remove an application container, use the flatpak uninstallcommand.

# flatpak uninstall org.mosh.mosh ID Branch Op 1. [-] org.mosh.mosh stable r Uninstall complete. #

Using application containers is similar to using package management systems, but what goes on behind the scenes is fundamentally different. However, the end result is that you have an application installed on your Linux system that can be easily maintained and upgraded.

The Bottom Line

Recognize Red Hat packages. Developers bundle the files required for an application into a package to make it easier to install. A package management system allows you to easily track what software packages are installed on your Linux system, as well as install, update, and remove them. Red Hat–based Linux distributions use the Red Hat Package Management (RPM) system for managing application software. The rpm command‐line tool provides access to the package management database, allowing you to quickly determine the status of installed packages.Master It The curl software package allows you to easily transfer data using a multitude of protocols (such as FTP, HTTP, and SCP) from the command line. What command would you use to determine whether curl is installed on your Linux system? If the package is installed, what command would you use to view the version and a description of the package?

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

Интервал:

Закладка:

Сделать

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

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


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

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

x