{"id":30,"date":"2024-09-23T10:53:40","date_gmt":"2024-09-23T10:53:40","guid":{"rendered":"https:\/\/www.3forty.media\/koga\/demo\/?p=30"},"modified":"2024-12-25T02:54:15","modified_gmt":"2024-12-25T02:54:15","slug":"my-entrance-me-is-disposal-bachelor-remember-relation","status":"publish","type":"post","link":"https:\/\/mutou.men\/?p=30","title":{"rendered":"Litecart\u5546\u57ce\u5b89\u88c5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5b89\u88c5litecart\u5546\u57ce\uff0c\u5e76\u6dfb\u52a0\u52a0\u5bc6\u8d27\u5e01\u652f\u4ed8\u529f\u80fd\u3002<br>\u4e3b\u673a\uff1a\u7532\u9aa8\u6587amd\uff0c\u7cfb\u7edfubuntu22.04<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u7cfb\u7edf\u521d\u6b65\u914d\u7f6e<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -i\napt update\napt upgrade\napt -y install language-pack-es language-pack-fr language-pack-de language-pack-zh-hans<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001\u5b89\u88c5\u6240\u9700\u7684\u7ec4\u4ef6\uff0cphp\uff0cmysql\u7b49\u3002<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>apt -y install curl nano unzip apache2 libapache2-mod-php mariadb-server php php-common php-cli php-fpm php-apcu php-curl php-dom php-gd php-imagick php-mysql php-simplexml php-mbstring php-intl php-zip php-xml<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2.1\u5f00\u542f\u76f8\u5173\u73af\u5883<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>a2enmod rewrite headers proxy_fcgi setenvif\nmysql_secure_installation<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2.2\u914d\u7f6e\u6570\u636e\u5e93<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root - p &lt;&lt;END\nALTER USER 'root'@'localhost' IDENTIFIED BY '{desired_root_password_here}';\nGRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;\nDROP USER IF EXISTS ''@'localhost';\nDROP DATABASE IF EXISTS test;\nFLUSH PRIVILEGES;\nEND<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u6570\u636e\u5e93\u65f6\u6ce8\u610f\uff0c\u4e00\u5b9a\u8981\u8bbe\u7f6e\u597droot\u5bc6\u7801\uff0c\u4e0d\u540c\u7248\u672c\u7684mysql\u7684\u8bbe\u7f6e\u65b9\u5f0f\u4e5f\u4e0d\u540c<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">2.3\u914d\u7f6ephp<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -ri 's\/;?memory_limit\\s*=\\s*&#91;^\\s]*\/memory_limit = 256M\/' \/etc\/php\/8.1\/apache2\/php.ini\nsed -ri 's\/;?upload_max_filesize\\s*=\\s*&#91;^\\s]*\/upload_max_filesize = 64M\/' \/etc\/php\/8.1\/apache2\/php.ini\nsed -ri 's\/;?date\\.timezone\\s*=\\s*&#91;^\\s]*\/date.timezone = Europe\\\/Stockholm\/g' \/etc\/php\/8.1\/apache2\/php.ini<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\/php\/8.1\/\u7684\u8def\u5f84\u9700\u8981\u6839\u636e\u5b89\u88c5\u7684\u4e0d\u540cphp\u7248\u672c\u8fdb\u884c\u66f4\u6539\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.4\u6dfb\u52a0litecart DB \u5230Mysql<\/h2>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>read -p \"New database name: \" newdb_name\nread -p \"New database user: \" newdb_user\nread -sp \"Password for database user '$newdb_user': \" newdb_password\n\nmysql -u root -p -e \"CREATE DATABASE $newdb_name; \\\nCREATE USER '$newdb_user'@'localhost' IDENTIFIED BY '$newdb_password'; \\\nGRANT ALL PRIVILEGES ON $newdb_name.* TO '$newdb_user'@'localhost' WITH GRANT OPTION; \\\nFLUSH PRIVILEGES;\"<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u914d\u7f6eapache<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/apache2\/sites-enabled\/000-default.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> &lt;VirtualHost *:80&gt;\n    ServerName youdomain.com\n    ServerAdmin webmaster@localhost\n    DocumentRoot \/var\/www\/html\/\n\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\n\n    &lt;Directory \/var\/www\/html\/&gt;\n        Options FollowSymLinks\n        AllowOverride All\n        Require all granted\n    &lt;\/Directory&gt;\n  &lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f7f\u66f4\u6539\u751f\u6548<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u3001\u5b89\u88c5LITECART<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/html\nrm index.html\nchown -R www-data:www-data .\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6253\u5f00\u4f60Apache\u4e2d\u914d\u7f6e\u7684\u7f51\u7ad9\u5730\u5740\uff0c\u8fdb\u884c\u4e0b\u4e00\u6b65\u5b89\u88c5\u5373\u53ef\uff01<br>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5220\u9664install\u6587\u4ef6\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u9519\u8bef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -Rf install\/<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e94\u3001\u914d\u7f6eSSL<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">5.1\u5b89\u88c5snapd \u5305\u7ba1\u7406\u5de5\u5177<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install -y snapd\nsnap install core\nsnap refresh core<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5.2\u5b89\u88c5certbot<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>snap install --classic certbot\nln -s \/snap\/bin\/certbot \/usr\/bin\/certbot<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5.3\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u4e00\u4e2a\u8bc1\u4e66:<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>certbot --apache -d yourdomain.com<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Enjoy!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5litecart\u5546\u57ce\uff0c\u5e76\u6dfb\u52a0\u52a0\u5bc6\u8d27\u5e01\u652f\u4ed8\u529f\u80fd\u3002\u4e3b\u673a\uff1a\u7532\u9aa8\u6587amd\uff0c\u7cfb\u7edfubuntu22.04 \u4e00\u3001\u7cfb\u7edf\u521d\u6b65&#8230;<\/p>\n","protected":false},"author":1,"featured_media":30,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"gallery","meta":{"footnotes":""},"categories":[1],"tags":[7],"class_list":["post-30","post","type-post","status-publish","format-gallery","has-post-thumbnail","hentry","category-uncategorized","tag-jiaocheng","post_format-post-format-gallery","article","has-background","tfm-is-light","dark-theme-","has-excerpt","has-avatar","has-author","has-nickname","has-date","has-comment-count","has-category-meta","has-read-more","has-title","has-format-icons","has-post-media","thumbnail-","cat-id-1"],"_links":{"self":[{"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mutou.men\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":1,"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":186,"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/186"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mutou.men\/index.php?rest_route=\/wp\/v2\/posts\/30"}],"wp:attachment":[{"href":"https:\/\/mutou.men\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mutou.men\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mutou.men\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}