Bii o ṣe le Ṣayẹwo ati Fi Awọn imudojuiwọn sori CentOS ati RHEL


Fifi awọn imudojuiwọn sii fun awọn idii sọfitiwia tabi ekuro funrararẹ, jẹ iṣẹ-ṣiṣe ti a ṣe iṣeduro gíga ati anfani fun awọn alaṣẹ eto; diẹ sii paapaa nigbati o ba de awọn imudojuiwọn aabo tabi awọn abulẹ. Lakoko ti a ti ṣe awari awọn ailagbara aabo, sọfitiwia ti o kan gbọdọ wa ni imudojuiwọn lati dinku eyikeyi awọn eewu aabo aabo si gbogbo eto naa.

Ti o ko ba tunto eto rẹ lati fi awọn abulẹ aabo tabi awọn imudojuiwọn sori ẹrọ laifọwọyi, lẹhinna o nilo lati ṣe pẹlu ọwọ. Ninu nkan yii, a yoo fi ọ han bi o ṣe le ṣayẹwo ati fi awọn imudojuiwọn sọfitiwia sori awọn kaakiri CentOS ati RHEL.

Lati ṣayẹwo fun eyikeyi awọn imudojuiwọn ti o wa fun awọn idii ti o fi sii, lo oluṣakoso package YUM pẹlu aṣẹ atunyẹwo-ayẹwo; eyi ṣe iranlọwọ fun ọ lati wo gbogbo awọn imudojuiwọn package lati gbogbo awọn ibi ipamọ ti eyikeyi ba wa.

# yum check-update
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 
....

Lati ṣe imudojuiwọn package kan si ẹya tuntun ti o wa, ṣiṣe aṣẹ ni isalẹ. Ninu apẹẹrẹ yii, yum yoo gbiyanju lati mu package httpd ṣe.

# yum update httpd
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
....

Lati ṣe imudojuiwọn ẹgbẹ package kan, aṣẹ ti o tẹle yoo mu awọn irinṣẹ idagbasoke rẹ ṣe (Olupilẹṣẹ C ati C ++ pẹlu awọn ohun elo ti o jọmọ).

# 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
...

Lati ṣe igbesoke gbogbo sọfitiwia eto rẹ bii awọn igbẹkẹle wọn si ẹya tuntun, lo aṣẹ yii:

# yum update
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
....

O n niyen! O le fẹ lati ka awọn nkan wọnyi ti o jọmọ wọnyi.

  1. Bii o ṣe le Fi sii tabi Igbesoke si Ẹya Kernel Tuntun ni CentOS 7
  2. Bii a ṣe le Pa awọn Kernels atijọ ti a ko lo ni CentOS, RHEL ati Fedora
  3. Bii a ṣe le Fi Awọn imudojuiwọn Aabo sori Aifọwọyi lori Debian ati Ubuntu

Nigbagbogbo jẹ ki o jẹ eto Linux titi di oni pẹlu aabo tuntun ati awọn imudojuiwọn package gbogbogbo. Ṣe o ni awọn ibeere eyikeyi lati beere, lo fọọmu asọye ni isalẹ fun iyẹn.