{"id":4539,"date":"2025-07-10T23:37:54","date_gmt":"2025-07-10T14:37:54","guid":{"rendered":"https:\/\/eternalsphere.net\/echoes\/?p=4539"},"modified":"2026-06-06T09:18:00","modified_gmt":"2026-06-06T00:18:00","slug":"e1mafv01ktrxnxi","status":"publish","type":"post","link":"https:\/\/eternalsphere.net\/echoes\/index.php\/2025\/07\/10\/e1mafv01ktrxnxi\/","title":{"rendered":"\u4f7f\u7528 Duplicator \u5728\u5c40\u57df\u7f51Linux\u4e0a\u8fd8\u539f WordPress \u5e76\u89e3\u51b3 Redis \u62a5\u9519"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u5c40\u57df\u7f51\u6216\u672c\u5730\u6d4b\u8bd5\u73af\u5883\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5c06 WordPress \u7f51\u7ad9\u901a\u8fc7 Duplicator \u5feb\u901f\u8fc1\u79fb\u6216\u8fd8\u539f\u5230\u4e00\u53f0\u65b0\u7684 Linux \u670d\u52a1\u5668\u3002\u4ee5\u4e0b\u6574\u7406\u4e86\u5b8c\u6574\u64cd\u4f5c\u6d41\u7a0b\u4e0e\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u4f9b\u540e\u7eed\u53c2\u8003\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u7cfb\u7edf\u57fa\u7840\u51c6\u5907<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7edf\u5e76\u5b89\u88c5 Apache\u3001PHP\u3001MySQL\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update<br>apt upgrade -y<br>apt install apache2 mysql-server php libapache2-mod-php php-mysql php-zip unzip -y<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u4e2d\uff0c<code>php-zip<\/code> \u6a21\u5757\u5341\u5206\u91cd\u8981\uff0c\u5426\u5219 Duplicator \u5b89\u88c5\u5668\u4f1a\u63d0\u793a\u89e3\u538b\u9519\u8bef\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 MySQL \u914d\u7f6e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8f83\u65b0\u7248\u672c\u4e2d\uff0cMySQL \u7684 root \u7528\u6237\u9ed8\u8ba4\u91c7\u7528 socket \u8ba4\u8bc1\u65b9\u5f0f\uff0c\u5982\u679c\u9700\u8981\u901a\u8fc7\u7f51\u9875\u5b89\u88c5\u5668\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u9700\u8981\u5148\u4e3a root \u7528\u6237\u8bbe\u7f6e\u5bc6\u7801\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u767b\u5f55 MySQL\uff08\u4f7f\u7528 socket\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo mysql<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u4ee5\u4e0b\u8bed\u53e5\uff0c\u5c06 root \u7528\u6237\u5207\u6362\u4e3a\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5e76\u8bbe\u7f6e\u5bc6\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '\u81ea\u5b9a\u4e49\u5bc6\u7801';<br>FLUSH PRIVILEGES;<br>EXIT;<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u7740\uff0c\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93 <code>wordpress<\/code>\uff0c\u5e76\u7ee7\u7eed\u4f7f\u7528 root \u7528\u6237\u8bbf\u95ee\uff08\u65e0\u9700\u65b0\u5efa\u7528\u6237\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<br><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<br>EXIT;<br><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u4e0a\u4f20\u5e76\u89e3\u538b Duplicator \u6587\u4ef6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u65b0\u6587\u4ef6\u5939\uff08\u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528 <code>site<\/code>\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cd \/var\/www\/html\/<br>mkdir site<br>chown www-data:www-data site<br>chmod 755 site<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06 <code>installer.php<\/code> \u548c\u5f52\u6863 <code>.zip<\/code> \u6587\u4ef6\u4e0a\u4f20\u81f3 <code>site<\/code> \u6587\u4ef6\u5939\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee\u5b89\u88c5\u5668\uff08\u793a\u4f8b\u5730\u5740\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>http:\/\/\u5c40\u57df\u7f51IP\/site\/installer.php<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6309\u7167\u5411\u5bfc\u89e3\u538b\u6587\u4ef6\uff0c\u5bfc\u5165\u6570\u636e\u5e93\uff0c\u5b8c\u6210\u914d\u7f6e\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u89e3\u51b3 Redis \u62a5\u9519<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fc1\u79fb\u5b8c\u6210\u540e\uff0c\u82e5\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\u63d0\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Error establishing a Redis connection<br>To disable Redis, delete the object-cache.php file in the \/wp-content\/ directory.<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u8868\u793a WordPress \u5f53\u524d\u542f\u7528\u4e86 Redis \u5bf9\u8c61\u7f13\u5b58\uff0c\u4f46\u670d\u52a1\u5668\u672a\u6b63\u786e\u5b89\u88c5\u6216\u542f\u52a8 Redis \u670d\u52a1\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5\u5e76\u542f\u7528 Redis<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install redis-server -y<br>systemctl start redis-server<br>systemctl enable redis-server<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u68c0\u67e5 Redis \u72b6\u6001\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl status redis-server<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u663e\u793a <code>active (running)<\/code>\uff0c\u8868\u793a Redis \u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">\u6d4b\u8bd5 Redis<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>redis-cli ping<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd4\u56de <code>PONG<\/code> \u5373\u4ee3\u8868\u6b63\u5e38\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">\u5220\u9664 object-cache.php\uff08\u82e5\u4e0d\u4f7f\u7528 Redis\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u6682\u65f6\u4e0d\u6253\u7b97\u4f7f\u7528 Redis\uff0c\u53ef\u76f4\u63a5\u5220\u9664\u5bf9\u8c61\u7f13\u5b58\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>rm \/var\/www\/html\/site\/wp-content\/object-cache.php<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u64cd\u4f5c\u5c06\u5173\u95ed\u5bf9\u8c61\u7f13\u5b58\uff0c\u6062\u590d WordPress \u9ed8\u8ba4\u6570\u636e\u5e93\u7f13\u5b58\u673a\u5236\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u603b\u7ed3<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u5c40\u57df\u7f51 Linux \u670d\u52a1\u5668\u4e2d\u8fc1\u79fb WordPress \u65f6\uff0c\u65e0\u9700\u914d\u7f6e\u57df\u540d\u4e0e SSL \u8bc1\u4e66\u3002<\/li>\n\n\n\n<li>MySQL root \u7528\u6237\u9700\u5207\u6362\u4e3a\u5bc6\u7801\u8ba4\u8bc1\uff0c\u65b9\u4fbf\u5b89\u88c5\u5668\u8fde\u63a5\u6570\u636e\u5e93\u3002<\/li>\n\n\n\n<li>\u4e0d\u6253\u7b97\u7ee7\u7eed\u4f7f\u7528 Redis \u65f6\uff0c\u53ef\u76f4\u63a5\u5220\u9664\u5bf9\u8c61\u7f13\u5b58\u6587\u4ef6\uff1b\u82e5\u7ee7\u7eed\u4f7f\u7528\uff0c\u5219\u9700\u5b89\u88c5\u5e76\u542f\u52a8 Redis \u670d\u52a1\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcac \u53c2\u8003<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a>Duplicator \u5b98\u65b9\u6587\u6863<\/a><\/li>\n\n\n\n<li><a>WordPress Redis Object Cache \u63d2\u4ef6<\/a><\/li>\n\n\n\n<li><a class=\"\" href=\"https:\/\/dev.mysql.com\/doc\/\">MySQL \u5b98\u65b9\u6587\u6863<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5c40\u57df\u7f51\u6216\u672c\u5730\u6d4b\u8bd5\u73af\u5883\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5c06 WordPress \u7f51\u7ad9\u901a\u8fc7 Duplicator \u5feb\u901f\u8fc1\u79fb\u6216\u8fd8\u539f\u5230\u4e00\u53f0\u65b0\u7684 Linux \u670d\u52a1\u5668\u3002\u4ee5\u4e0b\u6574\u7406\u4e86\u5b8c\u6574\u64cd\u4f5c\u6d41\u7a0b\u4e0e\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u4f9b\u540e\u7eed\u53c2\u8003\u3002 \u2705 \u7cfb\u7edf\u57fa\u7840\u51c6\u5907 \u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7edf\u5e76\u5b89\u88c5 Apache\u3001PHP\u3001MySQL\uff1a apt updateapt upgrade -yapt install apache2 mysql-server php libapache2-mod-php php-mysql php-zip unzip -y \u5176\u4e2d\uff0cphp-zip \u6a21\u5757\u5341\u5206\u91cd\u8981\uff0c\u5426\u5219 Duplicator \u5b89\u88c5\u5668\u4f1a\u63d0\u793a\u89e3\u538b\u9519\u8bef\u3002 \u2705 MySQL \u914d\u7f6e \u5728\u8f83\u65b0\u7248\u672c\u4e2d\uff0cMySQL \u7684 root \u7528\u6237\u9ed8\u8ba4\u91c7\u7528 socket \u8ba4\u8bc1\u65b9\u5f0f\uff0c\u5982\u679c\u9700\u8981\u901a\u8fc7\u7f51\u9875\u5b89\u88c5\u5668\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u9700\u8981\u5148\u4e3a root \u7528\u6237\u8bbe\u7f6e\u5bc6\u7801\u3002 \u767b\u5f55 MySQL\uff08\u4f7f\u7528 socket\uff09\uff1a sudo mysql \u6267\u884c\u4ee5\u4e0b\u8bed\u53e5\uff0c\u5c06 root \u7528\u6237\u5207\u6362\u4e3a\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5e76\u8bbe\u7f6e\u5bc6\u7801\uff1a ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193],"tags":[],"class_list":["post-4539","post","type-post","status-publish","format-standard","hentry","category-abjh3eiun5cktvl"],"_links":{"self":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/4539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/comments?post=4539"}],"version-history":[{"count":1,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/4539\/revisions"}],"predecessor-version":[{"id":4540,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/4539\/revisions\/4540"}],"wp:attachment":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/media?parent=4539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/categories?post=4539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/tags?post=4539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}