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

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

Интервал:

Закладка:

Сделать

Once you find the package you'd like to install, installing it using aptis as easy as this:

sudo apt install package_name

Since installing new software requires root privileges, you must use the sudocommand in Ubuntu. The output will show basic information about the package and ask if you want to proceed with the installation.

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

INSTALLING SOFTWARE USING APT

Using the aptcommand makes installing software in Ubuntu easy. In this exercise, you'll install the Z shell on your Ubuntu server.

1 Log into your Linux system as the sysadmin account created in Chapter 2, “Installing an Ubuntu Server.”

2 From the command prompt, enter the command sudo apt install zsh. The sudo command is required to allow your user to run the apt command with root user privileges. Enter your user password when prompted. You should see something similar to this output: [sudo] password for sysadmin: Reading package lists… Done Building dependency tree Reading state information… Done The following additional packages will be installed: zsh-common Suggested packages: zsh-doc The following NEW packages will be installed: zsh zsh-common 0 upgraded, 2 newly installed, 0 to remove and 56 not upgraded. Need to get 4,450 kB of archives. After this operation, 18.0 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 zsh-common all 5.8-3ubuntu1 [3,744 kB] Get:2 http://us.archive.ubuntu.com/ubuntu focal/main amd64 zsh amd64 5.8-3ubuntu1 [707 kB] Fetched 4,450 kB in 4s (1,039 kB/s) Selecting previously unselected package zsh-common. (Reading database … 179515 files and directories currently installed.) Preparing to unpack …/zsh-common_5.8-3ubuntu1_all.deb … Unpacking zsh-common (5.8-3ubuntu1) … Selecting previously unselected package zsh. Preparing to unpack …/zsh_5.8-3ubuntu1_amd64.deb … Unpacking zsh (5.8-3ubuntu1) … Setting up zsh-common (5.8-3ubuntu1) … Setting up zsh (5.8-3ubuntu1) … Processing triggers for man-db (2.9.1-1) … $

3 Test the install by entering the command zsh. You will see a menu prompting if you want to customize your Z shell environment. Enter 0 to use the default configuration. You should then get the Z shell prompt. ubuntu-server%

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

5 Check whether the installation processed properly, type the command apt ‐‐installed list. You should see the package appear, indicating that it is installed.

When installing a package, aptwill ask to install other packages as well. This is because aptautomatically resolves any necessary package dependencies for us and installs the needed additional library and software packages. This is a wonderful feature included in many package management systems.

Upgrading Software with apt

While apthelps protect you from problems installing software, trying to coordinate a multiple‐package update with dependencies can get tricky. To safely upgrade all the software packages on a system with any new versions in the repository, use the upgradecommand (again, using sudoto obtain root privileges).

sudo apt upgrade

Notice that this command doesn't take any software package names as an argument. That's because the upgradeoption will upgrade all the installed packages to the most recent version available in the repository, which is safer for system stabilization.

Figure 3.1shows a sample output from running the apt upgradecommand.

In the Figure 3.1output, notice that aptlists the packages that will be upgraded, but also any new packages that are required to be installed because of upgrades.

The upgradecommand won't remove any packages as part of the upgrade process. If a package needs to be removed as part of an upgrade, use the following command:

sudo apt full-upgrade

Although this may seem like an odd thing, sometimes it's required to remove packages to keep things synchronized between distribution upgrades.

FIGURE 31Upgrading Ubuntu using apt UPDATING A NEW INSTALLATION Obviously - фото 16

FIGURE 3.1Upgrading Ubuntu using apt

UPDATING A NEW INSTALLATION

Obviously, running apt's upgradeoption is something you should do on a regular basis to keep your system up‐to‐date. However, it is especially important to run it after a fresh distribution installation. Usually there are lots of security patches and updates that are released since the last full release of a distribution.

Uninstalling Software with apt

Getting rid of software packages with aptis as easy as installing and upgrading them. The only real choice you have to make is whether to keep the software's data and configuration files around afterward.

To remove a software package but not the data and configuration files, use apt's removecommand. To remove a software package and the related data and configuration files, use the purgeoption.

$ sudo apt purge zsh Reading package lists… Done Building dependency tree Reading state information… Done The following package was automatically installed and is no longer required: zsh-common Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: zsh* 0 upgraded, 0 newly installed, 1 to remove and 56 not upgraded. After this operation, 2,390 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database … 180985 files and directories currently installed.) Removing zsh (5.8-3ubuntu1) … Processing triggers for man-db (2.9.1-1) … (Reading database … 180928 files and directories currently installed.) Purging configuration files for zsh (5.8-3ubuntu1) … $

Notice, though, as part of the purgeoutput, aptwarns us that the zsh‐commonpackage that was installed as a dependency wasn't removed automatically, just in case it might be required for some other package. If you're sure the dependency package isn't required by anything else, you can remove it using the autoremovecommand.

$ sudo apt autoremove Reading package lists… Done Building dependency tree Reading state information… Done The following packages will be REMOVED: zsh-common 0 upgraded, 0 newly installed, 1 to remove and 56 not upgraded. After this operation, 15.6 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database … 180928 files and directories currently installed.) Removing zsh-common (5.8-3ubuntu1) … Processing triggers for man-db (2.9.1-1) … $

The autoremovecommand will check for all packages that are marked as dependencies and no longer required.

The apt Repositories

The default software repository locations for aptare set up for you when you install your Linux distribution. The repository locations are stored in the file /etc/apt/sources.list.

In most cases, you will never need to add or remove a software repository, so you won't need to touch this file. However, aptwill only pull software from these repositories. Also, when searching for software to install or update, aptwill only check these repositories. If you need to include some additional software repositories for your package management system, this is the place to do it.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x