ວິທີການກວດສອບແລະຕິດຕັ້ງອັບເດດໃນ CentOS ແລະ RHEL


ການຕິດຕັ້ງການປັບປຸງ ສຳ ລັບແພັກເກດຊອບແວຫລືແກ່ນມັນເອງແມ່ນ ໜ້າ ວຽກທີ່ແນະ ນຳ ແລະມີປະໂຫຍດສູງ ສຳ ລັບຜູ້ບໍລິຫານລະບົບ; ຫຼາຍໂດຍສະເພາະໃນເວລາທີ່ມັນມາກັບການປັບປຸງຄວາມປອດໄພຫຼືເພີ້ມ. ໃນຂະນະທີ່ຄວາມອ່ອນແອດ້ານຄວາມປອດໄພຖືກຄົ້ນພົບ, ຊອບແວທີ່ຖືກກະທົບຕ້ອງໄດ້ຮັບການປັບປຸງເພື່ອຫຼຸດຜ່ອນຄວາມສ່ຽງດ້ານຄວາມປອດໄພທີ່ອາດເກີດຂື້ນຕໍ່ລະບົບທັງ ໝົດ.

ຖ້າທ່ານບໍ່ໄດ້ຕັ້ງຄ່າລະບົບຂອງທ່ານໃຫ້ຕິດຕັ້ງເພີ້ມຫລືຄວາມປອດໄພໂດຍອັດຕະໂນມັດ, ທ່ານ ຈຳ ເປັນຕ້ອງເຮັດມັນດ້ວຍຕົນເອງ. ໃນບົດຂຽນນີ້, ພວກເຮົາຈະສະແດງວິທີການກວດສອບແລະຕິດຕັ້ງໂປແກຼມອັບເດດຊອບແວໃນການແຈກຈ່າຍ CentOS ແລະ RHEL.

ເພື່ອກວດເບິ່ງການປັບປຸງໃດໆທີ່ມີຢູ່ ສຳ ລັບແພັກເກດທີ່ທ່ານຕິດຕັ້ງ, ໃຫ້ໃຊ້ຜູ້ຈັດການຊຸດ YUM ກັບ subcommand check-update; ນີ້ຊ່ວຍໃຫ້ທ່ານເບິ່ງການປັບປຸງຊຸດທັງ ໝົດ ຈາກຫໍສະມຸດທັງ ໝົດ ຖ້າມີ.

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

ເພື່ອປັບປຸງຊຸດດຽວກັບເວີຊັນທີ່ມີຢູ່ລ້າສຸດ, ດໍາເນີນການຄໍາສັ່ງຂ້າງລຸ່ມນີ້. ໃນຕົວຢ່າງນີ້, yum ຈະພະຍາຍາມປັບປຸງຊຸດ httpd.

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

ເພື່ອປັບປຸງກຸ່ມຊຸດ, ຄຳ ສັ່ງທີ່ຕິດຕາມຈະປັບປຸງເຄື່ອງມືການພັດທະນາຂອງທ່ານ (C ແລະ C ++ compiler ບວກກັບເຄື່ອງໃຊ້ທີ່ກ່ຽວຂ້ອງ).

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

ເພື່ອຍົກລະດັບໂປຼແກຼມລະບົບທັງ ໝົດ ຂອງທ່ານພ້ອມທັງການເພິ່ງພາອາໄສຂອງພວກມັນໃຫ້ເປັນເວີຊັນລ້າສຸດ, ໃຫ້ໃຊ້ ຄຳ ສັ່ງນີ້:

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

ນັ້ນແມ່ນມັນ! ທ່ານອາດຈະຢາກອ່ານບົດຄວາມທີ່ກ່ຽວຂ້ອງດັ່ງຕໍ່ໄປນີ້.

<

  • ວິທີການຕິດຕັ້ງຫຼືຍົກລະດັບໃຫ້ກັບລຸ້ນລ້າສຸດລ້າສຸດໃນ CentOS 7
  • ວິທີການລຶບເມັດເກົ່າທີ່ບໍ່ໄດ້ໃຊ້ໃນ CentOS, RHEL ແລະ Fedora
  • ວິທີການຕິດຕັ້ງການອັບເດດຄວາມປອດໄພໂດຍອັດຕະໂນມັດໃນ Debian ແລະ Ubuntu
  • ໃຫ້ທ່ານຕິດຕັ້ງລະບົບ Linux ຢູ່ສະ ເໝີ ດ້ວຍຄວາມປອດໄພລ້າສຸດແລະການປັບປຸງຊຸດທົ່ວໄປ. ທ່ານມີ ຄຳ ຖາມຫຍັງທີ່ຈະຖາມ, ໃຊ້ແບບຟອມ ຄຳ ເຫັນຂ້າງລຸ່ມ ສຳ ລັບເລື່ອງນັ້ນ.