{"id":64785,"date":"2026-01-24T05:32:14","date_gmt":"2026-01-23T21:32:14","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64785.html"},"modified":"2026-01-24T05:32:14","modified_gmt":"2026-01-23T21:32:14","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%88%9d%e5%a7%8b%e5%8c%96%e5%ae%8c%e6%95%b4%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64785.html","title":{"rendered":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4"},"content":{"rendered":"<p>\u670d\u52a1\u5668\u521d\u59cb\u5316\u662f\u4fdd\u969c\u670d\u52a1\u5668\u5b89\u5168\u3001\u7a33\u5b9a\u8fd0\u884c\u7684\u57fa\u7840\u64cd\u4f5c&#xff0c;\u9700\u8986\u76d6\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e\u3001\u5b89\u5168\u52a0\u56fa\u3001\u8f6f\u4ef6\u73af\u5883\u51c6\u5907\u4e09\u5927\u6838\u5fc3\u7ef4\u5ea6\u3002\u4ee5\u4e0b\u662f\u9002\u7528\u4e8e Linux \u7cfb\u7edf&#xff08;\u4ee5 CentOS 7 \u4e3a\u4f8b&#xff09;\u7684\u5b8c\u6574\u521d\u59cb\u5316\u6b65\u9aa4&#xff0c;\u5176\u4ed6\u53d1\u884c\u7248&#xff08;\u5982 Ubuntu&#xff09;\u53ef\u53c2\u8003\u8c03\u6574&#xff1a;<\/p>\n<h4>\u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e&#xff08;\u9996\u6b21\u767b\u5f55\u540e\u4f18\u5148\u64cd\u4f5c&#xff09;<\/h4>\n<h5>1. \u5207\u6362 root \u7528\u6237&#xff08;\u907f\u514d\u6743\u9650\u4e0d\u8db3&#xff09;<\/h5>\n<p>\u82e5\u521d\u59cb\u767b\u5f55\u4e3a\u666e\u901a\u7528\u6237&#xff0c;\u5148\u5207\u6362\u81f3 root&#xff1a;<\/p>\n<\/p>\n<p>bash<\/p>\n<p>su &#8211; root  # \u8f93\u5165 root \u5bc6\u7801<\/p>\n<h5>2. \u914d\u7f6e\u7f51\u7edc&#xff08;\u786e\u4fdd\u670d\u52a1\u5668\u53ef\u8054\u7f51&#xff09;<\/h5>\n<ul>\n<li>\u67e5\u770b\u7f51\u5361\u540d\u79f0&#xff1a;\n<p>bash<\/p>\n<p>ip addr  # \u901a\u5e38\u4e3a eth0 \u6216 ens33<\/p>\n<\/li>\n<li>\u4fee\u6539\u7f51\u7edc\u914d\u7f6e\u6587\u4ef6&#xff08;\u8bbe\u7f6e\u9759\u6001 IP&#xff0c;\u907f\u514d\u91cd\u542f\u540e IP \u53d8\u5316&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0  # \u66ff\u6362\u4e3a\u5b9e\u9645\u7f51\u5361\u540d\u79f0<\/p>\n<p>\u5173\u952e\u914d\u7f6e\u9879\u4fee\u6539\u5982\u4e0b&#xff08;\u5176\u4ed6\u9879\u4fdd\u7559\u9ed8\u8ba4\u6216\u6309\u9700\u8c03\u6574&#xff09;&#xff1a;<\/p>\n<p>ini<\/p>\n<p>BOOTPROTO&#061;static  # \u9759\u6001 IP&#xff08;\u9ed8\u8ba4 dhcp \u4e3a\u52a8\u6001&#xff09;<br \/>\nONBOOT&#061;yes        # \u5f00\u673a\u542f\u52a8\u7f51\u5361<br \/>\nIPADDR&#061;192.168.1.100  # \u670d\u52a1\u5668\u9759\u6001 IP&#xff08;\u9700\u4e0e\u7f51\u5173\u5728\u540c\u4e00\u7f51\u6bb5&#xff09;<br \/>\nNETMASK&#061;255.255.255.0  # \u5b50\u7f51\u63a9\u7801<br \/>\nGATEWAY&#061;192.168.1.1    # \u7f51\u5173&#xff08;\u8def\u7531\u5668\/\u4ea4\u6362\u673a IP&#xff09;<br \/>\nDNS1&#061;223.5.5.5         # \u963f\u91cc\u4e91 DNS&#xff08;\u52a0\u901f\u56fd\u5185\u89e3\u6790&#xff09;<br \/>\nDNS2&#061;114.114.114.114   # \u5907\u7528 DNS<\/p>\n<\/li>\n<li>\u91cd\u542f\u7f51\u7edc\u670d\u52a1&#xff1a;\n<p>bash<\/p>\n<p>systemctl restart network  #  CentOS 7<br \/>\n# \u82e5\u4e3a CentOS 8\/RHEL 8&#xff1a;systemctl restart NetworkManager<\/p>\n<\/li>\n<li>\u9a8c\u8bc1\u7f51\u7edc&#xff1a;\n<p>bash<\/p>\n<p>ping baidu.com  # \u80fd\u901a\u5219\u7f51\u7edc\u6b63\u5e38<\/p>\n<\/li>\n<\/ul>\n<h5>3. \u5173\u95ed SELinux&#xff08;\u907f\u514d\u5bf9\u540e\u7eed\u8f6f\u4ef6\u8fd0\u884c\u7684\u6743\u9650\u5e72\u6270&#xff09;<\/h5>\n<ul>\n<li>\u4e34\u65f6\u5173\u95ed&#xff08;\u7acb\u5373\u751f\u6548&#xff0c;\u91cd\u542f\u540e\u5931\u6548&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>setenforce 0<\/p>\n<\/li>\n<li>\u6c38\u4e45\u5173\u95ed&#xff08;\u4fee\u6539\u914d\u7f6e\u6587\u4ef6&#xff0c;\u9700\u91cd\u542f\u751f\u6548&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>vi \/etc\/selinux\/config<\/p>\n<p>\u5c06\u00a0SELINUX&#061;enforcing\u00a0\u6539\u4e3a\u00a0SELINUX&#061;disabled&#xff0c;\u4fdd\u5b58\u9000\u51fa\u540e&#xff0c;\u540e\u7eed\u91cd\u542f\u670d\u52a1\u5668\u5373\u53ef\u6c38\u4e45\u751f\u6548\u3002<\/li>\n<\/ul>\n<h5>4. \u914d\u7f6e\u65f6\u533a\u4e0e\u65f6\u95f4\u540c\u6b65&#xff08;\u907f\u514d\u65e5\u5fd7\u3001\u4efb\u52a1\u8c03\u5ea6\u65f6\u95f4\u6df7\u4e71&#xff09;<\/h5>\n<ul>\n<li>\u8bbe\u7f6e\u65f6\u533a\u4e3a\u4e0a\u6d77&#xff08;\u4e9a\u6d32 \/ \u4e0a\u6d77&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>ln -sf \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime<\/p>\n<\/li>\n<li>\u5b89\u88c5\u5e76\u542f\u52a8\u65f6\u95f4\u540c\u6b65\u670d\u52a1&#xff08;ntp&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>yum install -y ntp  # \u5b89\u88c5 ntp<br \/>\nsystemctl start ntpd  # \u542f\u52a8\u670d\u52a1<br \/>\nsystemctl enable ntpd  # \u5f00\u673a\u81ea\u542f<br \/>\nntpdate ntp.aliyun.com  # \u624b\u52a8\u540c\u6b65\u963f\u91cc\u4e91\u65f6\u95f4\u670d\u52a1\u5668&#xff08;\u9a8c\u8bc1\u540c\u6b65&#xff09;<\/p>\n<\/li>\n<\/ul>\n<h4>\u4e8c\u3001\u5b89\u5168\u52a0\u56fa&#xff08;\u964d\u4f4e\u88ab\u653b\u51fb\u98ce\u9669&#xff09;<\/h4>\n<h5>1. \u4f18\u5316 SSH \u670d\u52a1\u914d\u7f6e&#xff08;\u7981\u6b62\u5bc6\u7801\u767b\u5f55\u3001\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3&#xff09;<\/h5>\n<ul>\n<li>\u5907\u4efd SSH \u914d\u7f6e\u6587\u4ef6&#xff1a;\n<p>bash<\/p>\n<p>cp \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config.backup<\/p>\n<\/li>\n<li>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6&#xff1a;\n<p>bash<\/p>\n<p>vi \/etc\/ssh\/sshd_config<\/p>\n<p>\u5173\u952e\u914d\u7f6e\u9879\u8c03\u6574&#xff08;\u6309\u9700\u6c42\u9009\u62e9&#xff0c;\u5efa\u8bae\u5168\u90e8\u914d\u7f6e&#xff09;&#xff1a;<\/p>\n<p>ini<\/p>\n<p>Port 2222        # \u4fee\u6539 SSH \u9ed8\u8ba4\u7aef\u53e3&#xff08;22\u21922222&#xff0c;\u907f\u514d\u626b\u63cf\u653b\u51fb&#xff0c;\u9700\u8bb0\u4f4f\u65b0\u7aef\u53e3&#xff09;<br \/>\nPermitRootLogin no  # \u7981\u6b62 root \u76f4\u63a5\u767b\u5f55&#xff08;\u9700\u901a\u8fc7\u666e\u901a\u7528\u6237 su \u5207\u6362&#xff0c;\u66f4\u5b89\u5168&#xff09;<br \/>\nPasswordAuthentication no  # \u7981\u6b62\u5bc6\u7801\u767b\u5f55&#xff08;\u4ec5\u5141\u8bb8\u5bc6\u94a5\u767b\u5f55&#xff0c;\u675c\u7edd\u66b4\u529b\u7834\u89e3&#xff09;<br \/>\nPubkeyAuthentication yes   # \u5f00\u542f\u5bc6\u94a5\u767b\u5f55&#xff08;\u524d\u63d0\u662f\u5df2\u914d\u7f6e\u5ba2\u6237\u7aef\u516c\u94a5&#xff0c;\u53c2\u8003\u524d\u6587&#xff09;<\/p>\n<\/li>\n<li>\u91cd\u542f SSH \u670d\u52a1&#xff1a;\n<p>bash<\/p>\n<p>systemctl restart sshd<br \/>\nsystemctl enable sshd  # \u786e\u4fdd\u5f00\u673a\u81ea\u542f<\/p>\n<p>\u00a0<\/p>\n<p>\u6ce8\u610f&#xff1a;\u4fee\u6539\u7aef\u53e3\u540e&#xff0c;\u540e\u7eed SSH \u8fde\u63a5\u9700\u6307\u5b9a\u65b0\u7aef\u53e3&#xff08;\u5982\u00a0ssh -p 2222 \u7528\u6237\u540d&#064;\u670d\u52a1\u5668IP&#xff09;&#xff0c;\u4e14\u9700\u63d0\u524d\u5728\u9632\u706b\u5899\u5f00\u653e\u65b0\u7aef\u53e3\u3002<\/p>\n<\/li>\n<\/ul>\n<h5>2. \u914d\u7f6e\u9632\u706b\u5899&#xff08;\u4ec5\u5f00\u653e\u5fc5\u8981\u7aef\u53e3&#xff09;<\/h5>\n<p>CentOS 7 \u9ed8\u8ba4\u4f7f\u7528\u00a0firewalld&#xff0c;\u66ff\u4ee3\u4f20\u7edf\u00a0iptables&#xff0c;\u64cd\u4f5c\u5982\u4e0b&#xff1a;<\/p>\n<\/p>\n<ul>\n<li>\u67e5\u770b\u9632\u706b\u5899\u72b6\u6001&#xff1a;\n<p>bash<\/p>\n<p>systemctl status firewalld  # \u82e5\u672a\u542f\u52a8&#xff0c;\u6267\u884c systemctl start firewalld \u542f\u52a8<br \/>\nsystemctl enable firewalld  # \u5f00\u673a\u81ea\u542f\u9632\u706b\u5899<\/p>\n<\/li>\n<li>\u5f00\u653e\u5e38\u7528\u7aef\u53e3&#xff08;\u6309\u9700\u6dfb\u52a0&#xff0c;\u793a\u4f8b\u5f00\u653e SSH \u65b0\u7aef\u53e3\u3001HTTP\u3001HTTPS&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>firewall-cmd &#8211;add-port&#061;2222\/tcp &#8211;permanent  # \u5f00\u653e SSH \u65b0\u7aef\u53e3&#xff08;2222&#xff09;<br \/>\nfirewall-cmd &#8211;add-port&#061;80\/tcp &#8211;permanent    # \u5f00\u653e HTTP&#xff08;web \u670d\u52a1&#xff09;<br \/>\nfirewall-cmd &#8211;add-port&#061;443\/tcp &#8211;permanent   # \u5f00\u653e HTTPS&#xff08;\u52a0\u5bc6 web \u670d\u52a1&#xff09;<\/p>\n<\/li>\n<li>\u91cd\u8f7d\u9632\u706b\u5899\u89c4\u5219&#xff08;\u4f7f\u914d\u7f6e\u751f\u6548&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>firewall-cmd &#8211;reload<\/p>\n<\/li>\n<li>\u9a8c\u8bc1\u5f00\u653e\u7aef\u53e3&#xff1a;\n<p>bash<\/p>\n<p>firewall-cmd &#8211;list-ports  # \u67e5\u770b\u5df2\u5f00\u653e\u7aef\u53e3\u5217\u8868<\/p>\n<\/li>\n<\/ul>\n<h5>3. \u6dfb\u52a0\u666e\u901a\u7528\u6237\u5e76\u8d4b\u4e88 sudo \u6743\u9650&#xff08;\u907f\u514d\u76f4\u63a5\u4f7f\u7528 root \u64cd\u4f5c&#xff09;<\/h5>\n<ul>\n<li>\u521b\u5efa\u666e\u901a\u7528\u6237&#xff08;\u793a\u4f8b\u7528\u6237\u540d\u4e3a\u00a0admin&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>useradd admin  # \u521b\u5efa\u7528\u6237<br \/>\npasswd admin   # \u8bbe\u7f6e\u5bc6\u7801&#xff08;\u8f93\u5165\u65f6\u5bc6\u7801\u4e0d\u663e\u793a&#xff0c;\u786e\u4fdd\u590d\u6742\u5ea6&#xff1a;\u5b57\u6bcd&#043;\u6570\u5b57&#043;\u7279\u6b8a\u7b26\u53f7&#xff09;<\/p>\n<\/li>\n<li>\u8d4b\u4e88 sudo \u6743\u9650&#xff08;\u5141\u8bb8\u00a0admin\u00a0\u6267\u884c root \u547d\u4ee4&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>vi \/etc\/sudoers<\/p>\n<p>\u5728\u00a0root ALL&#061;(ALL) ALL\u00a0\u4e0b\u65b9\u6dfb\u52a0\u4e00\u884c&#xff1a;<\/p>\n<p>ini<\/p>\n<p>admin    ALL&#061;(ALL)       ALL<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa&#xff08;vi \u4e2d\u9700\u6309\u00a0:wq!\u00a0\u5f3a\u5236\u4fdd\u5b58&#xff0c;\u56e0 sudoers \u6587\u4ef6\u4e3a\u53ea\u8bfb&#xff09;\u3002<\/li>\n<\/ul>\n<h4>\u4e09\u3001\u8f6f\u4ef6\u73af\u5883\u51c6\u5907&#xff08;\u57fa\u7840\u4f9d\u8d56\u4e0e\u5305\u7ba1\u7406\u4f18\u5316&#xff09;<\/h4>\n<h5>1. \u914d\u7f6e\u56fd\u5185 Yum \u6e90&#xff08;\u52a0\u901f\u8f6f\u4ef6\u4e0b\u8f7d&#xff0c;\u53c2\u8003\u524d\u6587\u8865\u5145&#xff09;<\/h5>\n<ul>\n<li>\u5907\u4efd\u9ed8\u8ba4\u6e90&#xff1a;\n<p>bash<\/p>\n<p>mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup<\/p>\n<\/li>\n<li>\u4e0b\u8f7d\u963f\u91cc\u4e91\u6e90&#xff08;CentOS 7&#xff09;&#xff1a;\n<p>bash<\/p>\n<p># \u5b89\u88c5 curl&#xff08;\u82e5\u672a\u5b89\u88c5&#xff09;<br \/>\nyum install -y curl<br \/>\n# \u4e0b\u8f7d Base \u6e90<br \/>\ncurl -o \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo<br \/>\n# \u4e0b\u8f7d EPEL \u6e90&#xff08;\u63d0\u4f9b\u989d\u5916\u8f6f\u4ef6&#xff0c;\u5982 nginx\u3001git \u7b49&#xff09;<br \/>\nyum install -y epel-release<br \/>\nsed -e &#039;s|^metalink&#061;|#metalink&#061;|g&#039; -e &#039;s|^#baseurl&#061;|baseurl&#061;|g&#039; -e &#039;s|\/\/download.fedoraproject.org\/pub|\/\/mirrors.aliyun.com|g&#039; -i \/etc\/yum.repos.d\/epel.repo<\/p>\n<\/li>\n<li>\u6e05\u7406\u7f13\u5b58\u5e76\u751f\u6210\u65b0\u7f13\u5b58&#xff1a;\n<p>bash<\/p>\n<p>yum clean all<br \/>\nyum makecache<\/p>\n<\/li>\n<\/ul>\n<h5>2. \u66f4\u65b0\u7cfb\u7edf\u5185\u6838\u4e0e\u8f6f\u4ef6&#xff08;\u4fee\u590d\u5df2\u77e5\u6f0f\u6d1e&#xff09;<\/h5>\n<p>bash<\/p>\n<p>yum update -y  # \u5347\u7ea7\u6240\u6709\u8f6f\u4ef6\u5305&#xff08;\u5305\u62ec\u5185\u6838&#xff0c;\u82e5\u4e0d\u9700\u8981\u5347\u7ea7\u5185\u6838&#xff0c;\u7528 yum upgrade-minimal -y&#xff09;<\/p>\n<p>\u6ce8\u610f&#xff1a;\u5185\u6838\u66f4\u65b0\u540e\u9700\u91cd\u542f\u670d\u52a1\u5668\u751f\u6548&#xff0c;\u6267\u884c\u00a0reboot\u00a0\u91cd\u542f&#xff0c;\u91cd\u542f\u540e\u901a\u8fc7\u00a0uname -r\u00a0\u9a8c\u8bc1\u5185\u6838\u7248\u672c\u3002<\/p>\n<h5>3. \u5b89\u88c5\u5e38\u7528\u57fa\u7840\u5de5\u5177&#xff08;\u540e\u7eed\u64cd\u4f5c\u4f9d\u8d56&#xff09;<\/h5>\n<p>bash<\/p>\n<p>yum install -y vim wget net-tools lsof gcc gcc-c&#043;&#043; make  # \u5206\u522b\u4e3a&#xff1a;\u7f16\u8f91\u5668\u3001\u4e0b\u8f7d\u5de5\u5177\u3001\u7f51\u7edc\u5de5\u5177\u3001\u8fdb\u7a0b\u7aef\u53e3\u67e5\u770b\u3001\u7f16\u8bd1\u5de5\u5177<\/p>\n<h4>\u56db\u3001\u6536\u5c3e\u9a8c\u8bc1&#xff08;\u786e\u4fdd\u521d\u59cb\u5316\u914d\u7f6e\u751f\u6548&#xff09;<\/h4>\n<li>\u91cd\u542f\u670d\u52a1\u5668&#xff08;\u8ba9\u65f6\u533a\u3001SELinux\u3001\u5185\u6838\u7b49\u914d\u7f6e\u751f\u6548&#xff09;&#xff1a;\n<p>bash<\/p>\n<p>reboot<\/p>\n<\/li>\n<li>\u91cd\u65b0\u767b\u5f55\u9a8c\u8bc1&#xff1a;\n<ul>\n<li>\u4f7f\u7528\u666e\u901a\u7528\u6237\u00a0admin\u00a0&#043; \u65b0 SSH \u7aef\u53e3\u767b\u5f55&#xff1a;ssh -p 2222 admin&#064;\u670d\u52a1\u5668IP<\/li>\n<li>\u5c1d\u8bd5\u5207\u6362 root&#xff1a;sudo su -&#xff08;\u8f93\u5165\u00a0admin\u00a0\u5bc6\u7801&#xff0c;\u80fd\u5207\u6362\u5219 sudo \u6743\u9650\u6b63\u5e38&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u9a8c\u8bc1\u7f51\u7edc\u4e0e\u8f6f\u4ef6\u6e90&#xff1a;\n<p>bash<\/p>\n<p>ping baidu.com  # \u7f51\u7edc\u6b63\u5e38<br \/>\nyum install -y nginx  # \u6d4b\u8bd5 Yum \u6e90\u662f\u5426\u80fd\u6b63\u5e38\u4e0b\u8f7d\u8f6f\u4ef6&#xff08;\u5b89\u88c5 nginx \u793a\u4f8b&#xff0c;\u53ef\u540e\u7eed\u5378\u8f7d&#xff09;<\/p>\n<\/p>\n<\/li>\n<h4>\u4e0d\u540c\u573a\u666f\u8865\u5145\u8bf4\u660e<\/h4>\n<ul>\n<li>Ubuntu \u7cfb\u7edf&#xff1a;\u5c06\u00a0yum\u00a0\u66ff\u6362\u4e3a\u00a0apt&#xff0c;SSH \u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u4e0d\u53d8&#xff0c;\u9632\u706b\u5899\u7528\u00a0ufw&#xff08;\u5982\u00a0ufw allow 2222\/tcp&#xff09;\u3002<\/li>\n<li>\u751f\u4ea7\u73af\u5883&#xff1a;\u5efa\u8bae\u989d\u5916\u914d\u7f6e\u00a0\u5b9a\u671f\u5907\u4efd&#xff08;\u5982 rsync&#xff09;\u3001\u65e5\u5fd7\u6536\u96c6&#xff08;\u5982 ELK&#xff09;\u3001\u76d1\u63a7&#xff08;\u5982 Prometheus&#043;Grafana&#xff09;&#xff0c;\u8fdb\u4e00\u6b65\u63d0\u5347\u670d\u52a1\u5668\u7a33\u5b9a\u6027\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u670d\u52a1\u5668\u521d\u59cb\u5316\u662f\u4fdd\u969c\u670d\u52a1\u5668\u5b89\u5168\u3001\u7a33\u5b9a\u8fd0\u884c\u7684\u57fa\u7840\u64cd\u4f5c&#xff0c;\u9700\u8986\u76d6\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e\u3001\u5b89\u5168\u52a0\u56fa\u3001\u8f6f\u4ef6\u73af\u5883\u51c6\u5907\u4e09\u5927\u6838\u5fc3\u7ef4\u5ea6\u3002\u4ee5\u4e0b\u662f\u9002\u7528\u4e8e Linux \u7cfb\u7edf&#xff08;\u4ee5 CentOS 7 \u4e3a\u4f8b&#xff09;\u7684\u5b8c\u6574\u521d\u59cb\u5316\u6b65\u9aa4&#xff0c;\u5176\u4ed6\u53d1\u884c\u7248&#xff08;\u5982 Ubuntu&#xff09;\u53ef\u53c2\u8003\u8c03\u6574&#xff1a;\u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e&#xff08;\u9996\u6b21\u767b\u5f55\u540e\u4f18\u5148\u64cd\u4f5c&#xff09;1. \u5207\u6362 root \u7528\u6237&#xff08;\u907f\u514d\u6743\u9650\u4e0d\u8db3&#xff09;\u82e5\u521d\u59cb\u767b\u5f55\u4e3a\u666e\u901a\u7528\u6237<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,78],"topic":[],"class_list":["post-64785","post","type-post","status-publish","format-standard","hentry","category-server","tag-43","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64785.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u670d\u52a1\u5668\u521d\u59cb\u5316\u662f\u4fdd\u969c\u670d\u52a1\u5668\u5b89\u5168\u3001\u7a33\u5b9a\u8fd0\u884c\u7684\u57fa\u7840\u64cd\u4f5c&#xff0c;\u9700\u8986\u76d6\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e\u3001\u5b89\u5168\u52a0\u56fa\u3001\u8f6f\u4ef6\u73af\u5883\u51c6\u5907\u4e09\u5927\u6838\u5fc3\u7ef4\u5ea6\u3002\u4ee5\u4e0b\u662f\u9002\u7528\u4e8e Linux \u7cfb\u7edf&#xff08;\u4ee5 CentOS 7 \u4e3a\u4f8b&#xff09;\u7684\u5b8c\u6574\u521d\u59cb\u5316\u6b65\u9aa4&#xff0c;\u5176\u4ed6\u53d1\u884c\u7248&#xff08;\u5982 Ubuntu&#xff09;\u53ef\u53c2\u8003\u8c03\u6574&#xff1a;\u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e&#xff08;\u9996\u6b21\u767b\u5f55\u540e\u4f18\u5148\u64cd\u4f5c&#xff09;1. \u5207\u6362 root \u7528\u6237&#xff08;\u907f\u514d\u6743\u9650\u4e0d\u8db3&#xff09;\u82e5\u521d\u59cb\u767b\u5f55\u4e3a\u666e\u901a\u7528\u6237\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64785.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-23T21:32:14+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64785.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64785.html\",\"name\":\"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-23T21:32:14+00:00\",\"dateModified\":\"2026-01-23T21:32:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64785.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64785.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64785.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64785.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u662f\u4fdd\u969c\u670d\u52a1\u5668\u5b89\u5168\u3001\u7a33\u5b9a\u8fd0\u884c\u7684\u57fa\u7840\u64cd\u4f5c&#xff0c;\u9700\u8986\u76d6\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e\u3001\u5b89\u5168\u52a0\u56fa\u3001\u8f6f\u4ef6\u73af\u5883\u51c6\u5907\u4e09\u5927\u6838\u5fc3\u7ef4\u5ea6\u3002\u4ee5\u4e0b\u662f\u9002\u7528\u4e8e Linux \u7cfb\u7edf&#xff08;\u4ee5 CentOS 7 \u4e3a\u4f8b&#xff09;\u7684\u5b8c\u6574\u521d\u59cb\u5316\u6b65\u9aa4&#xff0c;\u5176\u4ed6\u53d1\u884c\u7248&#xff08;\u5982 Ubuntu&#xff09;\u53ef\u53c2\u8003\u8c03\u6574&#xff1a;\u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e&#xff08;\u9996\u6b21\u767b\u5f55\u540e\u4f18\u5148\u64cd\u4f5c&#xff09;1. \u5207\u6362 root \u7528\u6237&#xff08;\u907f\u514d\u6743\u9650\u4e0d\u8db3&#xff09;\u82e5\u521d\u59cb\u767b\u5f55\u4e3a\u666e\u901a\u7528\u6237","og_url":"https:\/\/www.wsisp.com\/helps\/64785.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-23T21:32:14+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64785.html","url":"https:\/\/www.wsisp.com\/helps\/64785.html","name":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-23T21:32:14+00:00","dateModified":"2026-01-23T21:32:14+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64785.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64785.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64785.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u521d\u59cb\u5316\u5b8c\u6574\u6b65\u9aa4"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64785"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64785\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64785"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}