Linux centos обновление системы

How to Check and Install Updates On CentOS and RHEL

Installing updates for software packages or the kernel itself, is a highly recommended and beneficial task for system administrators; more especially when it comes to security updates or patches. While security vulnerabilities are discovered, the affected software must be updated so as to lessen any potential security risks to the whole system.

If you have not configured your system to install security patches or updates automatically, then you need to do it manually. In this article, we will show you how to check and install software updates on CentOS and RHEL distributions.

To check for any updates available for your installed packages, use YUM package manager with the check-update subcommand; this helps you to see all package updates from all repositories if any are available.

Loaded plugins: changelog, fastestmirror base | 3.6 kB 00:00:00 epel/x86_64/metalink | 22 kB 00:00:00 epel | 4.3 kB 00:00:00 extras | 3.4 kB 00:00:00 mariadb | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/2): epel/x86_64/updateinfo | 842 kB 00:00:15 (2/2): epel/x86_64/primary_db | 6.1 MB 00:00:00 Loading mirror speeds from cached hostfile * base: mirrors.linode.com * epel: mirror.vorboss.net * extras: mirrors.linode.com * updates: mirrors.linode.com MariaDB-client.x86_64 10.1.28-1.el7.centos mariadb MariaDB-common.x86_64 10.1.28-1.el7.centos mariadb MariaDB-server.x86_64 10.1.28-1.el7.centos mariadb MariaDB-shared.x86_64 10.1.28-1.el7.centos mariadb NetworkManager.x86_64 1:1.8.0-11.el7_4 updates NetworkManager-adsl.x86_64 1:1.8.0-11.el7_4 updates .

To update a single package to the latest available version, run the command below. In this example, yum will attempt to update the httpd package.

Loaded plugins: changelog, fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.linode.com * epel: mirror.vorboss.net * extras: mirrors.linode.com * updates: mirrors.linode.com Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.4.6-45.el7.centos.4 will be updated --> Processing Dependency: httpd = 2.4.6-45.el7.centos.4 for package: 1:mod_ssl-2.4.6-45.el7.centos.4.x86_64 ---> Package httpd.x86_64 0:2.4.6-67.el7.centos.6 will be an update --> Processing Dependency: httpd-tools = 2.4.6-67.el7.centos.6 for package: httpd-2.4.6-67.el7.centos.6.x86_64 --> Running transaction check ---> Package httpd-tools.x86_64 0:2.4.6-45.el7.centos.4 will be updated ---> Package httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 will be an update ---> Package mod_ssl.x86_64 1:2.4.6-45.el7.centos.4 will be updated ---> Package mod_ssl.x86_64 1:2.4.6-67.el7.centos.6 will be an update .

To update a package group, the command that follows will update your development tools (C and C++ compiler plus related utilities).

# yum update "Development Tools"
Loaded plugins: changelog, fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.linode.com * epel: mirror.vorboss.net * extras: mirrors.linode.com * updates: mirrors.linode.com .

To upgrade all of your system software as well as their dependencies to the latest version, use this command:

Loaded plugins: changelog, fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.linode.com * epel: mirror.vorboss.net * extras: mirrors.linode.com * updates: mirrors.linode.com Resolving Dependencies --> Running transaction check ---> Package MariaDB-client.x86_64 0:10.1.23-1.el7.centos will be updated ---> Package MariaDB-client.x86_64 0:10.1.28-1.el7.centos will be an update ---> Package MariaDB-common.x86_64 0:10.1.23-1.el7.centos will be updated ---> Package MariaDB-common.x86_64 0:10.1.28-1.el7.centos will be an update ---> Package MariaDB-server.x86_64 0:10.1.23-1.el7.centos will be updated ---> Package MariaDB-server.x86_64 0:10.1.28-1.el7.centos will be an update ---> Package MariaDB-shared.x86_64 0:10.1.23-1.el7.centos will be updated ---> Package MariaDB-shared.x86_64 0:10.1.28-1.el7.centos will be an update ---> Package NetworkManager.x86_64 1:1.4.0-19.el7_3 will be obsoleted ---> Package NetworkManager.x86_64 1:1.8.0-11.el7_4 will be obsoleting .

That’s It! You might like to read these following related articles.

Читайте также:  Линукс ssh connection refused

Always keep you Linux system up to date with latest security and general package updates. Do you have any questions to ask, use comment form below for that.

Источник

How To Upgrade or Update CentOS 7.0/7.1/7.2/7.3/7.4/7.5 to CentOS 7.6

CentOS is a popular fork, or derivative, of the Red Hat Enterprise Linux distribution.

CentOS 7.6 is a minor update and was published in December 2018. It includes updates and changes, including support for newer software and server technology. This guide will walk you through upgrading and updating the current version to the latest CentOS release.

upgrade or update CentOS to the latest version

  • Access to a command line / terminal window (Menu >Applications >Utilities >Terminal)
  • Access to a user account with root or sudo user privileges. To add user to sudoers read this.
  • The yum package manager, included by default

Upgrade CentOS to Latest Version: 6 Easy Steps

Step 1: Check current CentOS version

Check the version of your current release with the command:

The system should display the CentOS Linux release version. Make sure the first number is at least 7.x.x.

Read this, for a full tutorial on how to check CentOS version.

Step 2: Verify data and backups

Backing up important server data should be done before running a operating system upgrade. Take a moment to verify your system backups.

Step 3: Check for available updates

Check available CentOS updates with the command:

The system will display a list of available updates, including the core operating system updates. Scan through these to make sure everything is in order.

A good habit is to scan for software that you’ve specifically configured or installed. If you see a familiar package listed, it can indicate that there are updates or changes you’ll want to be aware of. You can research the upgrades to software packages as needed, depending on your system configuration.

Step 4: Package manager cleanup

As the yum package manager updates your system and software, it accumulates additional listings and downloaded data.

To clear these out of your system use the terminal command:

Читайте также:  Linux firefox about config

This will clear the caches and lists in the local yum repositories. This can help speed the update process, and it can also help prevent issues.

Step 5: Update CentOS

Enter the command into the terminal:

The system should give you a listing of the packages to be downloaded, as well as the disk space required. The system will prompt you to confirm this is OK – press y, and the system will continue with the download and installation.

Note: CentOS 7.6 is a relatively minor release, so the process for updating is fairly straightforward. If you were installing a major update – say, CentOS 6.3 to CentOS 7.6, the process is much more involved.

Step 6: Verify current CentOS version

To verify the current version on CentOS, enter the command into the terminal:

The system should display CentOS Linux release 7.6.x is running on the web server.

Note: If you also have systems running Debian 9, may want to upgrade to the Linux Debian 10 Buster.

If you’ve followed along, you should have an updated version of CentOS 7.6.

The recent updates in CentOS include:

  • Bug reports sent directly to bugs.centos.org
  • Driver updates
  • OpenJDK 11 now available
  • Thunderbolt-3 support
  • Python2 has been deprecated
  • Insecure cryptographic algorithms and protocols removed

You can find more detailed instructions and release notes on the CentOS documentation page. Since CentOS is designed around stability and reliability, it is unlikely that this release will cause any significant problems with your configuration.

Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.

In this SIMPLE Updated Tutorial Learn How to restart, start, & stop Apache web server on the CentOS 7 Linux.

This guide is for users who have already configured a CentOS server and installed the Apache HTTP services.

The Linux kernel is like the central core of the operating system. It works as sort of a mediator, providing.

This technical guide is for users who already have a server running the CentOS 7 operating system on a.

Источник

Как установить обновления на CentOS 7

Поддержание вашей системы CentOS в актуальном состоянии с помощью последних обновлений безопасности — одна из наиболее важных частей общей безопасности системы. Если вы не обновите пакеты своей операционной системы последними исправлениями безопасности, ваш компьютер будет уязвим для атак.

Рекомендуемый подход — автоматизировать обновления с помощью yum-cron . Другой вариант — обновить систему вручную.

В этом руководстве мы покажем вам, как вручную обновить системные пакеты в CentOS 7. Те же инструкции применимы и для CentOS 6.

Подготовка

Для установки и обновления пакетов вам необходимо войти в систему как root или как пользователь с привилегиями sudo .

Читайте также:  Where linux header files

Обновление пакетов в CentOS

RPM — это система упаковки, используемая Red Hat и ее производными, такими как CentOS.

Yum — это инструмент менеджера пакетов по умолчанию в CentOS. Он используется для установки, удаления, загрузки, запроса и обновления пакетов из официальных репозиториев CentOS, а также других сторонних репозиториев.

Перед запуском обновления вы можете проверить наличие доступных обновлений с помощью следующей команды:

Вывод будет содержать список всех пакетов, доступных для обновления:

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.s.uw.edu * centos-sclo-rh: centos.s.uw.edu * centos-sclo-sclo: centos.s.uw.edu * epel: mirror.cherryservers.com * extras: centos.s.uw.edu * updates: centos.s.uw.edu bind-libs-lite.x86_64 32:9.9.4-74.el7_6.2 updates bind-license.noarch 32:9.9.4-74.el7_6.2 updates curl.x86_64 7.29.0-51.el7_6.3 updates device-mapper.x86_64 7:1.02.149-10.el7_6.8 updates device-mapper-event.x86_64 7:1.02.149-10.el7_6.8 updates device-mapper-event-libs.x86_64 7:1.02.149-10.el7_6.8 updates device-mapper-libs.x86_64 7:1.02.149-10.el7_6.8 updates 

Чтобы обновить один пакет, используйте команду yum install за которой следует имя пакета, который вы хотите обновить. Например, чтобы обновить только пакет curl который вы должны запустить:

Yum предоставит вам сводку пакетов, которые будут обновлены, и запросит подтверждение. Ответьте y и пакеты будут обновлены.

Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: curl x86_64 7.29.0-51.el7_6.3 updates 269 k Updating for dependencies: libcurl x86_64 7.29.0-51.el7_6.3 updates 222 k Transaction Summary ================================================================================ Upgrade 1 Package (+1 Dependent package) Total download size: 492 k Is this ok [y/d/N]: 

Чтобы обновить все пакеты, используйте команду yum update :

Команда обновит репозитории и предоставит вам список всех пакетов, которые можно обновить. При появлении запроса введите y чтобы продолжить.

Запретить обновление пакетов

Иногда вам может потребоваться запретить обновление пакета до более новой версии. versionlock плагина versionlock позволяет вам versionlock пакеты к определенной версии.

Плагин не установлен по умолчанию, поэтому сначала вам нужно установить его:

sudo install yum-plugin-versionlock

Во время установки в вашей системе будут созданы два файла конфигурации, которые будут храниться в каталоге /etc/yum/pluginconf.d . Файл конфигурации versionlock.conf и файл versionlock.list содержащий заблокированные пакеты. По умолчанию в этом файле нет пакетов.

Чтобы заблокировать версию пакета, вы можете вручную добавить имя пакета в файл или использовать команду yum versionlock за которой следует имя пакета. Например, чтобы предотвратить обновление всех пакетов PHP (всех пакетов, начинающихся с «php-»), вы должны запустить:

Это заблокирует пакеты PHP до текущей версии.

Просмотр логов Yum

История пакетов, установленных и обновленных с помощью yum , регистрируется в файле /var/log/yum . Вы можете просмотреть последние записи, используя команду cat или tail :

Вывод будет включать записи об установках и обновлениях пакетов:

Jul 23 16:00:04 Installed: 7:squid-3.5.20-12.el7_6.1.x86_64 Jul 31 22:27:16 Updated: libcurl-7.29.0-51.el7_6.3.x86_64 Jul 31 22:27:16 Updated: curl-7.29.0-51.el7_6.3.x86_64 

Выводы

Установить обновления и поддерживать систему CentOS в актуальном состоянии довольно просто, но если вы управляете несколькими компьютерами с CentOS, это может занять много времени, а иногда вы можете пропустить важное обновление. Оптимальный вариант — настроить автоматические обновления.

Если у вас есть какие-либо вопросы или отзывы, не стесняйтесь оставлять комментарии.

Источник

Оцените статью
Adblock
detector