ÔõÑùʹÓÃÇå¾²µÄÔ¶³Ì¿ÍÕ»ÉèÖÃCentOSϵͳµÄÈí¼þ×°ÖÃ
ÔõÑùʹÓÃÇå¾²µÄÔ¶³Ì¿ÍÕ»ÉèÖÃcentosϵͳµÄÈí¼þ×°ÖÃ
¸ÅÊö:
ÔÚCentOSϵͳÖУ¬×°ÖÃÈí¼þ°üÊÇÒ»ÏîÒªº¦µÄ²Ù×÷¡£ÎªÁË°ü¹ÜÈí¼þµÄÇå¾²ÐÔºÍÎȹÌÐÔ£¬ÎÒÃÇÓ¦¸ÃʹÓÃÇå¾²µÄÔ¶³Ì¿ÍÕ»À´¾ÙÐÐÈí¼þµÄ×°Öú͸üС£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚCentOSϵͳÖÐÉèÖÃÇå¾²µÄÔ¶³Ì¿ÍÕ»£¬²¢ÌṩÏà¹ØµÄ´úÂëʾÀý¡£
°ì·¨Ò»£º×°Öò¢ÉèÖÃyum²å¼þ
Ê×ÏÈ£¬È·±£ÄãµÄϵͳÒѾװÖÃÁËyum²å¼þ¡£Ê¹ÓÃÒÔÏÂÏÂÁî¼ì²é²¢×°Öãº
sudo yum install yum-plugin-security
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê±Ïºó£¬Ê¹ÓÃÒÔÏÂÏÂÁî·¿ªyumÉèÖÃÎļþ£º
sudo vi /etc/yum/pluginconf.d/security.conf
µÇ¼ºó¸´ÖÆ
ÐÞ¸ÄÎļþÄÚÈÝÈçÏ£º
[main] enabled = 1
µÇ¼ºó¸´ÖÆ
°ì·¨¶þ£ºÉèÖÃÇå¾²µÄÔ¶³Ì¿ÍÕ»
Ê×ÏÈ£¬½¨ÉèÒ»¸öеÄyum¿ÍÕ»Îļþ¡£Ê¹ÓÃÒÔÏÂÏÂÁÉè²¢·¿ªÎļþ£º
sudo vi /etc/yum.repos.d/security.repo
µÇ¼ºó¸´ÖÆ
ÔÚÎļþÖУ¬Õ³ÌùÒÔÏÂÄÚÈÝ£º
[CentOS-Security] name=CentOS-$releasever - Security baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/updates/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
µÇ¼ºó¸´ÖÆ
˵Ã÷£º
ÐÞ¸Ä$releaseverΪÄãµÄCentOS°æ±¾ºÅ£¬ºÃ±È7¡£
ÐÞ¸Ä$basearchΪÄãµÄϵͳ¼Ü¹¹£¬ºÃ±Èx86_64¡£
ÉúÑIJ¢Í˳öÎļþ¡£
°ì·¨Èý£º¸üÐÂϵͳ²¢×°ÖÃÈí¼þ
Ê×ÏÈ£¬Ê¹ÓÃÒÔÏÂÏÂÁî¸üÐÂϵͳÖеÄÈí¼þ°üÁÐ±í£º
sudo yum update
µÇ¼ºó¸´ÖÆ
×°ÖÃÈí¼þ°üʱ£¬Ê¹ÓÃÒÔÏÂÏÂÁî¾ÙÐÐ×°Ö᣺ñȣ¬×°ÖÃnginx£º
sudo yum install nginx
µÇ¼ºó¸´ÖÆ
yum»á×Ô¶¯¼ì²éÈí¼þ°üµÄÇå¾²ÐÔ£¬²¢´ÓÉèÖõÄÇå¾²Ô¶³Ì¿ÍÕ»ÖÐÏÂÔØÇå¾²µÄÈí¼þ°ü¡£
ʹÓÃÒÔÏÂÏÂÁî¼ì²éÇå¾²ÐÔ±¨¸æ£º
sudo yum updateinfo list security
µÇ¼ºó¸´ÖÆ
×ܽá:
±¾ÎÄÏÈÈÝÁËÔõÑùÔÚCentOSϵͳÖÐÉèÖÃÇå¾²µÄÔ¶³Ì¿ÍÕ»£¬²¢ÌṩÁËÏà¹ØµÄ´úÂëʾÀý¡£Í¨¹ýʹÓÃÇå¾²µÄÔ¶³Ì¿ÍÕ»£¬ÎÒÃÇ¿ÉÒÔ°ü¹ÜÈí¼þ°üµÄÇå¾²ÐÔºÍÎȹÌÐÔ£¬Ìá¸ßϵͳµÄ¿É¿¿ÐÔºÍÇå¾²ÐÔ¡£
ÒÔÉϾÍÊÇÔõÑùʹÓÃÇå¾²µÄÔ¶³Ì¿ÍÕ»ÉèÖÃCentOSϵͳµÄÈí¼þ×°ÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡