{"id":10160,"date":"2025-04-18T17:53:25","date_gmt":"2025-04-18T09:53:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/10160.html"},"modified":"2025-04-18T17:53:25","modified_gmt":"2025-04-18T09:53:25","slug":"%e5%9c%a8-ubuntu-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e4%bd%bf%e7%94%a8%e5%ae%9d%e5%a1%94%e9%9d%a2%e6%9d%bf%e6%90%ad%e5%bb%ba%e5%8d%9a%e5%ae%a2","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/10160.html","title":{"rendered":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2"},"content":{"rendered":"<h3>&#x1f4cc; \u4ecb\u7ecd<\/h3>\n<p>\u5728\u672c\u6559\u7a0b\u4e2d&#xff0c;\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 Ubuntu \u670d\u52a1\u5668 \u4e0a\u5b89\u88c5 \u5b9d\u5854\u9762\u677f&#xff0c;\u5e76\u4f7f\u7528 Nginx &#043; PHP &#043; MySQL \u642d\u5efa\u4e00\u4e2a\u535a\u5ba2&#xff08;\u5982 WordPress&#xff09;\u3002<\/p>\n<p>\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec&#xff1a;<\/p>\n<li>\u5b89\u88c5\u5b9d\u5854\u9762\u677f<\/li>\n<li>\u914d\u7f6e Nginx &#043; PHP &#043; MySQL<\/li>\n<li>\u7ed1\u5b9a\u57df\u540d\u4e0e SSL \u8bc1\u4e66<\/li>\n<li>\u5b89\u88c5 WordPress \u5e76\u4f18\u5316<\/li>\n<hr \/>\n<h3>&#x1f4cc; 1. \u5b89\u88c5\u5b9d\u5854\u9762\u677f<\/h3>\n<p>\u5b9d\u5854\u5b98\u7f51<\/p>\n<p>\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u66f4\u65b0\u7cfb\u7edf<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> update <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> upgrade <span class=\"token parameter variable\">-y<\/span><\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d\u5e76\u5b89\u88c5\u5b9d\u5854\u9762\u677f&#xff08;\u9002\u7528\u4e8e Ubuntu&#xff09;<\/span><br \/>\n<span class=\"token function\">wget<\/span> <span class=\"token parameter variable\">-O<\/span> install.sh http:\/\/www.bt.cn\/install\/install-ubuntu_6.0.sh <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">bash<\/span> install.sh<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u7ec8\u7aef\u4f1a\u663e\u793a \u5b9d\u5854\u9762\u677f\u7684\u8bbf\u95ee\u5730\u5740\u3001\u8d26\u53f7\u548c\u5bc6\u7801&#xff0c;\u8bf7\u59a5\u5584\u8bb0\u5f55\u3002<\/p>\n<hr \/>\n<h3>&#x1f4cc; 2. \u767b\u5f55\u5b9d\u5854\u9762\u677f\u5e76\u914d\u7f6e\u73af\u5883<\/h3>\n<ul>\n<li>\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/\u670d\u52a1\u5668IP:8888<\/li>\n<li>\u8f93\u5165 \u8d26\u53f7 &amp; \u5bc6\u7801 \u767b\u5f55<\/li>\n<\/ul>\n<p>\u5b89\u88c5\u5fc5\u5907\u73af\u5883&#xff1a;<\/p>\n<li>\u8fdb\u5165 \u201c\u8f6f\u4ef6\u5546\u5e97\u201d<\/li>\n<li>\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6&#xff1a;\n<ul>\n<li>Nginx&#xff08;Web \u670d\u52a1\u5668&#xff09;<\/li>\n<li>MySQL&#xff08;\u6570\u636e\u5e93&#xff09;<\/li>\n<li>PHP 8.0&#043;&#xff08;\u7528\u4e8e\u8fd0\u884c WordPress&#xff09;<\/li>\n<li>phpMyAdmin&#xff08;\u6570\u636e\u5e93\u7ba1\u7406\u5de5\u5177&#xff09;<\/li>\n<\/ul>\n<\/li>\n<p>\u914d\u7f6e PHP&#xff1a;<\/p>\n<ul>\n<li>\u4e0a\u4f20\u9650\u5236&#xff1a;128M<\/li>\n<li>\u6267\u884c\u65f6\u95f4&#xff1a;300 \u79d2<\/li>\n<li>\u542f\u7528 fileinfo \u6269\u5c55<\/li>\n<\/ul>\n<hr \/>\n<h3>&#x1f4cc; 3. \u914d\u7f6e\u57df\u540d\u89e3\u6790<\/h3>\n<p>\u5728\u57df\u540d\u7ba1\u7406\u5e73\u53f0&#xff08;\u5982 Cloudflare\u3001\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91&#xff09;\u4e2d\u6dfb\u52a0 DNS \u89e3\u6790&#xff1a;<\/p>\n<li>A \u8bb0\u5f55\u89e3\u6790\u5230\u670d\u52a1\u5668 IP\n<ul>\n<li>\u4e3b\u673a\u8bb0\u5f55&#xff1a;&#064;<\/li>\n<li>\u8bb0\u5f55\u503c&#xff1a;\u670d\u52a1\u5668 IP<\/li>\n<\/ul>\n<\/li>\n<li>\u6dfb\u52a0 www \u89e3\u6790\n<ul>\n<li>\u4e3b\u673a\u8bb0\u5f55&#xff1a;www<\/li>\n<li>\u8bb0\u5f55\u503c&#xff1a;\u670d\u52a1\u5668 IP<\/li>\n<\/ul>\n<\/li>\n<p>\u6d4b\u8bd5\u89e3\u6790\u662f\u5426\u751f\u6548&#xff1a;<\/p>\n<p><span class=\"token function\">ping<\/span> example.com<\/p>\n<p>\u5982\u679c\u8fd4\u56de \u670d\u52a1\u5668 IP&#xff0c;\u8bf4\u660e\u89e3\u6790\u6210\u529f\u3002<\/p>\n<hr \/>\n<h3>&#x1f4cc; 4. \u914d\u7f6e\u53cd\u5411\u4ee3\u7406\u9690\u85cf\u5b9d\u5854\u9762\u677f\u7aef\u53e3<\/h3>\n<p>\u914d\u7f6e\u53cd\u5411\u4ee3\u7406\u53ef\u4ee5\u53c2\u8003 Nginx \u4e0a\u5b89\u88c5 SSL \u8bc1\u4e66\u5e76\u542f\u7528 HTTPS \u8bbf\u95ee \u3002\u5982\u679c\u5df2\u7ecf\u5728\u5b9d\u5854\u4e0a\u5b89\u88c5\u4e86Nginx\u5c31\u4e0d\u8981\u5b89\u88c5\u5355\u72ec\u7684 Nginx&#xff0c;\u4e0d\u7136\u4e24\u4e2a\u51b2\u7a81\u4e86\u786e\u5b9e\u633a\u9ebb\u70e6\u7684\u3002<\/p>\n<li>\u8fdb\u5165\u5b9d\u5854\u9762\u677f \u2192 \u8bbe\u7f6e \u2192 \u7ed1\u5b9a\u57df\u540d<\/li>\n<li>\u6dfb\u52a0\u4e00\u4e2a\u57df\u540d&#xff0c;\u4f8b\u5982 panel.example.com<\/li>\n<li>\u8fdb\u5165 Nginx \u914d\u7f6e&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u53cd\u5411\u4ee3\u7406&#xff1a;<\/li>\n<p>proxy_cache_path \/www\/wwwroot\/\u57df\u540d\/proxy_cache_dir levels&#061;1:2 keys_zone&#061;\u4e3b\u673a\u8bb0\u5f55&#xff08;. \u66ff\u6362\u6210 _&#xff09;_cache:20m inactive&#061;1d max_size&#061;5g;<\/p>\n<p>server {<br \/>\n    listen 80;<br \/>\n    listen 443 ssl;<br \/>\n    listen 443 quic;<br \/>\n    http2 on;<\/p>\n<p>listen [::]:80;<\/p>\n<p>    server_name \u57df\u540d;<br \/>\n    index index.php index.html index.htm default.php default.htm default.html;<br \/>\n    root \/www\/wwwroot\/\u57df\u540d;<\/p>\n<p>    #CERT-APPLY-CHECK&#8211;START<br \/>\n    # \u7528\u4e8eSSL\u8bc1\u4e66\u7533\u8bf7\u65f6\u7684\u6587\u4ef6\u9a8c\u8bc1\u76f8\u5173\u914d\u7f6e &#8212; \u8bf7\u52ff\u5220\u9664<br \/>\n    include \/www\/server\/panel\/vhost\/nginx\/well-known\/\u57df\u540d.conf;<br \/>\n    #CERT-APPLY-CHECK&#8211;END<\/p>\n<p>    #SSL-START SSL\u76f8\u5173\u914d\u7f6e&#xff0c;\u8bf7\u52ff\u5220\u9664\u6216\u4fee\u6539\u4e0b\u4e00\u884c\u5e26\u6ce8\u91ca\u7684404\u89c4\u5219<br \/>\n    #error_page 404\/404.html;<br \/>\n    ssl_certificate    \/www\/server\/panel\/vhost\/cert\/\u57df\u540d\/fullchain.pem;<br \/>\n    ssl_certificate_key    \/www\/server\/panel\/vhost\/cert\/\u57df\u540d\/privkey.pem;<br \/>\n    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;<br \/>\n    ssl_ciphers EECDH&#043;CHACHA20:EECDH&#043;CHACHA20-draft:EECDH&#043;AES128:RSA&#043;AES128:EECDH&#043;AES256:RSA&#043;AES256:EECDH&#043;3DES:RSA&#043;3DES:!MD5;<br \/>\n    ssl_prefer_server_ciphers on;<br \/>\n    ssl_session_tickets on;<br \/>\n    ssl_session_cache shared:SSL:10m;<br \/>\n    ssl_session_timeout 10m;<br \/>\n    add_header Strict-Transport-Security &#034;max-age&#061;31536000&#034;;<br \/>\n    add_header Alt-Svc &#039;quic&#061;&#034;:443&#034;; h3&#061;&#034;:443&#034;; h3-29&#061;&#034;:443&#034;; h3-27&#061;&#034;:443&#034;;h3-25&#061;&#034;:443&#034;; h3-T050&#061;&#034;:443&#034;; h3-Q050&#061;&#034;:443&#034;;h3-Q049&#061;&#034;:443&#034;;h3-Q048&#061;&#034;:443&#034;; h3-Q046&#061;&#034;:443&#034;; h3-Q043&#061;&#034;:443&#034;&#039;;<br \/>\n    error_page 497  https:\/\/$host$request_uri;<\/p>\n<p>    #SSL-END<br \/>\n    #REDIRECT START<\/p>\n<p>    #REDIRECT END<\/p>\n<p>    #ERROR-PAGE-START  \u9519\u8bef\u9875\u914d\u7f6e&#xff0c;\u53ef\u4ee5\u6ce8\u91ca\u3001\u5220\u9664\u6216\u4fee\u6539<br \/>\n    #error_page 404 \/404.html;<br \/>\n    #error_page 502 \/502.html;<br \/>\n    #ERROR-PAGE-END<\/p>\n<p>    #PHP-INFO-START  PHP\u5f15\u7528\u914d\u7f6e&#xff0c;\u53ef\u4ee5\u6ce8\u91ca\u6216\u4fee\u6539<\/p>\n<p>    include enable-php-00.conf;<br \/>\n    #PHP-INFO-END<\/p>\n<p>    #IP-RESTRICT-START \u9650\u5236\u8bbf\u95eeip\u7684\u914d\u7f6e&#xff0c;IP\u9ed1\u767d\u540d\u5355<\/p>\n<p>    #IP-RESTRICT-END<\/p>\n<p>    #BASICAUTH START<\/p>\n<p>    #BASICAUTH END<\/p>\n<p>    #SUB_FILTER START<\/p>\n<p>    #SUB_FILTER END<\/p>\n<p>    #GZIP START<\/p>\n<p>    #GZIP END<\/p>\n<p>    #GLOBAL-CACHE START<\/p>\n<p>    #GLOBAL-CACHE END<\/p>\n<p>    #WEBSOCKET-SUPPORT START<\/p>\n<p>  proxy_http_version 1.1;<br \/>\n    proxy_set_header Upgrade $http_upgrade;<br \/>\n    proxy_set_header Connection $connection_upgrade;<br \/>\n    #WEBSOCKET-SUPPORT END<\/p>\n<p>     #PROXY-CONF-START<br \/>\n     location ^~ \/ {<br \/>\n     auth_basic &#034;Authorization&#034;;<br \/>\n     auth_basic_user_file \/www\/server\/pass\/\u57df\u540d\/SNUZu.htpasswd;<br \/>\n    proxy_pass https:\/\/127.0.0.1:18395;<br \/>\n      proxy_set_header Host $http_host;<br \/>\n     proxy_set_header X-Real-IP $remote_addr;<br \/>\n      proxy_set_header X-Real-Port $remote_port;<br \/>\n      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\n      proxy_set_header X-Forwarded-Proto $scheme;<br \/>\n      proxy_set_header X-Forwarded-Host $host;<br \/>\n      proxy_set_header X-Forwarded-Port $server_port;<br \/>\n      proxy_set_header REMOTE-HOST $remote_addr;<br \/>\n      proxy_ssl_server_name on;<br \/>\n      proxy_connect_timeout 60s;<br \/>\n    proxy_send_timeout 600s;<br \/>\n    proxy_read_timeout 600s;<br \/>\n      proxy_http_version 1.1;<br \/>\n      proxy_set_header Upgrade $http_upgrade;<br \/>\n      proxy_set_header Connection $connection_upgrade;<br \/>\n    }<\/p>\n<p>    #PROXY-CONF-END<\/p>\n<p>    #SERVER-BLOCK START<\/p>\n<p>    #SERVER-BLOCK END<\/p>\n<p>    #\u7981\u6b62\u8bbf\u95ee\u7684\u6587\u4ef6\u6216\u76ee\u5f55<br \/>\n    location ~ ^\/(\\\\.user.ini|\\\\.htaccess|\\\\.git|\\\\.env|\\\\.svn|\\\\.project|LICENSE|README.md)<br \/>\n    {<br \/>\n    return 404;<br \/>\n    }<\/p>\n<p>    #\u4e00\u952e\u7533\u8bf7SSL\u8bc1\u4e66\u9a8c\u8bc1\u76ee\u5f55\u76f8\u5173\u8bbe\u7f6e<br \/>\n    location \/.well-known{<br \/>\n        allow all;<br \/>\n    }<\/p>\n<p>    #\u7981\u6b62\u5728\u8bc1\u4e66\u9a8c\u8bc1\u76ee\u5f55\u653e\u5165\u654f\u611f\u6587\u4ef6<br \/>\n    if ( $uri ~ &#034;^\/\\\\.well-known\/.*\\\\.(php|jsp|py|js|css|lua|ts|go|zip|tar\\\\.gz|rar|7z|sql|bak)$&#034; ) {<br \/>\n        return 403;<br \/>\n    }<\/p>\n<p>    #LOG START<\/p>\n<p>access_log  \/www\/wwwlogs\/\u57df\u540d.log;<br \/>\nerror_log  \/www\/wwwlogs\/\u57df\u540d.error.log;<\/p>\n<p>    #LOG END<br \/>\n}<\/p>\n<li>\u91cd\u542f Nginx&#xff0c;\u7136\u540e\u4f60\u53ef\u4ee5\u901a\u8fc7 https:\/\/\u57df\u540d \u8bbf\u95ee\u5b9d\u5854\u9762\u677f&#xff0c;\u800c\u65e0\u9700\u66b4\u9732\u7aef\u53e3 \u7aef\u53e3\u3002<\/li>\n<p>PS&#xff1a;\u4e0a\u9762\u7684\u914d\u7f6e\u662f\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u8f93\u5165 bt&#xff0c;\u7136\u540e\u5f00\u542f\/\u5173\u95ed\u301080\u3001443\u3011\u7aef\u53e3\u8bbf\u95ee\u9762\u677f\u8bbe\u7f6e\u65f6\u81ea\u52a8\u751f\u6210\u7684\u3002\u751f\u6210\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\u662f \/www\/server\/panel\/vhost\/nginx\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095321-6802211192a56.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h3>&#x1f4cc; 5. \u5728\u5b9d\u5854\u9762\u677f\u4e2d\u6dfb\u52a0\u7f51\u7ad9<\/h3>\n<li>\u8fdb\u5165 \u201c\u7f51\u7ad9\u7ba1\u7406\u201d \u2192 \u70b9\u51fb \u201c\u6dfb\u52a0\u7ad9\u70b9\u201d<\/li>\n<li>\u586b\u5199\u4fe1\u606f&#xff1a;\n<ul>\n<li>\u57df\u540d&#xff1a;example.com<\/li>\n<li>\u6839\u76ee\u5f55&#xff1a;\/www\/wwwroot\/example.com<\/li>\n<li>\u6570\u636e\u5e93&#xff1a;MySQL<\/li>\n<li>PHP \u7248\u672c&#xff1a;PHP 8.0&#043;<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb \u201c\u521b\u5efa\u201d<\/li>\n<p>\u4fee\u6539 Nginx \u4f2a\u9759\u6001&#xff08;\u9002\u7528\u4e8e WordPress&#xff09;&#xff1a;<\/p>\n<p>location \/ {<br \/>\n    try_files $uri $uri\/ \/index.php?$args;<br \/>\n}<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095321-68022111e96c7.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>&#x1f539; \u4e0b\u8f7d\u5e76\u89e3\u538b WordPress &#xff08;\u624b\u52a8\u5b89\u88c5&#xff1a;\u53ef\u9009&#xff09;<\/p>\n<p><span class=\"token builtin class-name\">cd<\/span> \/www\/wwwroot\/example.com<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/wordpress.org\/latest.zip<br \/>\n<span class=\"token function\">unzip<\/span> latest.zip<br \/>\n<span class=\"token function\">mv<\/span> wordpress\/* <span class=\"token builtin class-name\">.<\/span><br \/>\n<span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-rf<\/span> wordpress latest.zip<br \/>\n<span class=\"token function\">chown<\/span> <span class=\"token parameter variable\">-R<\/span> www:www \/www\/wwwroot\/example.com<br \/>\n<span class=\"token function\">chmod<\/span> <span class=\"token parameter variable\">-R<\/span> <span class=\"token number\">755<\/span> \/www\/wwwroot\/example.com<\/p>\n<hr \/>\n<h3>&#x1f4cc; 6. \u914d\u7f6e SSL \u8bc1\u4e66&#xff08;HTTPS&#xff09;<\/h3>\n<li>\u8fdb\u5165 \u201c\u7f51\u7ad9\u7ba1\u7406\u201d \u2192 \u9009\u62e9 example.com<\/li>\n<li>\u70b9\u51fb \u201cSSL\u201d \u2192 \u7533\u8bf7 Let\u2019s Encrypt \u8bc1\u4e66<\/li>\n<li>\u81ea\u52a8\u7eed\u671f\u5e76\u542f\u7528 HTTPS \u5f3a\u5236\u8df3\u8f6c<\/li>\n<p>\u52a0\u5165\u963f\u91cc\u4e91\u7684 DNS\u89e3\u6790&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095322-6802211222f8f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u83b7\u53d6 key&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095322-6802211233ab4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u7533\u8bf7\u8bc1\u4e66&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095322-68022112eb1a3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5f00\u542f\u81ea\u52a8\u7eed\u7b7e&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095323-680221130bfdf.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h3>&#x1f4cc; 8. \u521b\u5efa WordPress \u6570\u636e\u5e93<\/h3>\n<li>\u8fdb\u5165\u5b9d\u5854\u9762\u677f \u2192 \u6570\u636e\u5e93\u7ba1\u7406 \u2192 \u521b\u5efa\u6570\u636e\u5e93\n<ul>\n<li>\u6570\u636e\u5e93\u540d&#xff1a;wordpress<\/li>\n<li>\u7528\u6237\u540d&#xff1a;wp_user<\/li>\n<li>\u5bc6\u7801&#xff1a;\u5f3a\u5bc6\u7801<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb \u201c\u521b\u5efa\u201d<\/li>\n<hr \/>\n<h3>&#x1f4cc; 9. \u914d\u7f6e WordPress<\/h3>\n<li>\u8bbf\u95ee https:\/\/example.com<\/li>\n<li>\u9009\u62e9 \u8bed\u8a00<\/li>\n<li>\u586b\u5199\u6570\u636e\u5e93\u4fe1\u606f&#xff1a;\n<ul>\n<li>\u6570\u636e\u5e93\u540d&#xff1a;wordpress<\/li>\n<li>\u7528\u6237\u540d&#xff1a;wp_user<\/li>\n<li>\u5bc6\u7801&#xff1a;\u4f60\u8bbe\u7f6e\u7684\u5bc6\u7801<\/li>\n<li>\u6570\u636e\u5e93\u4e3b\u673a&#xff1a;localhost<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb\u63d0\u4ea4 \u2192 \u5b89\u88c5 WordPress<\/li>\n<li>\u521b\u5efa\u7ba1\u7406\u5458\u8d26\u53f7\n<ul>\n<li>\u7528\u6237\u540d&#xff1a;admin<\/li>\n<li>\u5bc6\u7801&#xff1a;\u5f3a\u5bc6\u7801<\/li>\n<li>\u90ae\u7bb1&#xff1a;\u4f60\u7684\u90ae\u7bb1<\/li>\n<\/ul>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095323-68022113869c6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h3>&#x1f4cc; 10. \u914d\u7f6e WordPress \u4e3b\u9898\u548c\u63d2\u4ef6<\/h3>\n<p>&#x1f539; \u8fdb\u5165 WordPress \u540e\u53f0&#xff08;https:\/\/example.com\/wp-admin&#xff09;&#xff1a;<\/p>\n<li>\u5b89\u88c5\u4e3b\u9898&#xff1a;\n<ul>\n<li>\u5916\u89c2 \u2192 \u4e3b\u9898 \u2192 \u9009\u62e9\u4f60\u559c\u6b22\u7684\u4e3b\u9898<\/li>\n<\/ul>\n<\/li>\n<li>\u5b89\u88c5\u63a8\u8350\u63d2\u4ef6&#xff1a;\n<ul>\n<li>Yoast SEO&#xff08;\u4f18\u5316 SEO&#xff09;<\/li>\n<li>WP Super Cache&#xff08;\u52a0\u901f\u7f51\u7ad9&#xff09;<\/li>\n<li>Classic Editor&#xff08;\u7ecf\u5178\u7f16\u8f91\u5668&#xff09;<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h3>&#x1f389; \u7ed3\u8bba<\/h3>\n<p>\u2705 \u4f60\u5df2\u7ecf\u6210\u529f&#xff1a;<\/p>\n<ul>\n<li>\u5b89\u88c5\u5b9d\u5854\u9762\u677f<\/li>\n<li>\u914d\u7f6e Nginx &#043; MySQL &#043; PHP<\/li>\n<li>\u542f\u7528 HTTPS \u5e76\u914d\u7f6e SSL \u8bc1\u4e66<\/li>\n<li>\u6210\u529f\u5b89\u88c5 WordPress<\/li>\n<li>\u521b\u5efa\u4e86\u5c5e\u4e8e\u81ea\u5df1\u7684\u535a\u5ba2\u7f51\u7ad9&#xff01;<\/li>\n<\/ul>\n<p>&#x1f4cc; \u73b0\u5728&#xff0c;\u4f60\u53ef\u4ee5\u8bbf\u95ee https:\/\/example.com \u5f00\u59cb\u5199\u535a\u5ba2\u4e86&#xff01;&#x1f680;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf26\u6b21\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Ubuntu\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u5b9d\u5854\u9762\u677f\uff0c\u5e76\u4f7f\u7528Nginx + PHP + MySQL\u642d\u5efa\u4e00\u4e2a\u535a\u5ba2\u3002_ubuntu \u5b9d\u5854<\/p>\n","protected":false},"author":2,"featured_media":10153,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[417,58,103,43],"topic":[],"class_list":{"0":"post-10160","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-linux","10":"tag-ubuntu","11":"tag-43"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \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\/10160.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf26\u6b21\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Ubuntu\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u5b9d\u5854\u9762\u677f\uff0c\u5e76\u4f7f\u7528Nginx + PHP + MySQL\u642d\u5efa\u4e00\u4e2a\u535a\u5ba2\u3002_ubuntu \u5b9d\u5854\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/10160.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T09:53:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095321-6802211192a56.png\" \/>\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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10160.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/10160.html\",\"name\":\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T09:53:25+00:00\",\"dateModified\":\"2025-04-18T09:53:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/10160.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/10160.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10160.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2\"}]},{\"@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":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \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\/10160.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.2k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf26\u6b21\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Ubuntu\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u5b9d\u5854\u9762\u677f\uff0c\u5e76\u4f7f\u7528Nginx + PHP + MySQL\u642d\u5efa\u4e00\u4e2a\u535a\u5ba2\u3002_ubuntu \u5b9d\u5854","og_url":"https:\/\/www.wsisp.com\/helps\/10160.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T09:53:25+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418095321-6802211192a56.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/10160.html","url":"https:\/\/www.wsisp.com\/helps\/10160.html","name":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T09:53:25+00:00","dateModified":"2025-04-18T09:53:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/10160.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/10160.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/10160.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u5b9d\u5854\u9762\u677f\u642d\u5efa\u535a\u5ba2"}]},{"@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\/10160","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=10160"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10160\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/10153"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=10160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=10160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=10160"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=10160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}