{"id":31951,"date":"2024-11-25T08:05:07","date_gmt":"2024-11-25T00:05:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31951\/"},"modified":"2024-11-25T08:05:07","modified_gmt":"2024-11-25T00:05:07","slug":"%e8%af%a6%e8%a7%a3ecshop%e5%ae%89%e8%a3%85%e5%92%8c%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31951\/","title":{"rendered":"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528"},"content":{"rendered":"<p><strong>linux\/centos 7 \u73af\u5883\u5b89\u88c5ecshop 3.6<\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202103\/12\/2021031210260134434.jpg\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe\" \/><\/strong><\/p>\n<p>1\u3001\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86Apache HTTP Server\uff0c\u5373httpd<br \/> \u5982\u679c\u8fd4\u56de\u5982\u4e0b\u5185\u5bb9\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5<\/p>\n<pre>[root@localhost ~]# httpd -version\nServer version: Apache\/2.4.6 (CentOS)\nServer built:   Aug  8 2019 11:41:18<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5\u548c\u542f\u52a8\u670d\u52a1<\/p>\n<pre>[root@localhost ~]# yum install httpd -y<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u63a8\u8350\uff08\u514d\u8d39\uff09\uff1a<\/strong><\/p>\n<p>2\u3001\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86PHP\u548c\u63d2\u4ef6<br \/> \u5982\u679c\u8fd4\u56de\u5982\u4e0b\u5185\u5bb9\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5PHP<\/p>\n<pre>[root@localhost ~]# php -v\nPHP 5.4.16 (cli) (built: Nov  1 2019 16:04:20)\nCopyright (c) 1997-2013 The PHP Group\nZend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>[root@localhost ~]# rpm -qa | grep php-gd\nphp-gd-5.4.16-46.1.el7_7.x86_64\n[root@localhost ~]# rpm -qa|grep php-mysql\nphp-mysql-5.4.16-46.1.el7_7.x86_64<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5<\/p>\n<pre>[root@localhost ~]# yum install php php-gd php-mysql -y<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>3\u3001\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86MySQL\u6216MariaDB<br \/> \u5982\u679c\u8fd4\u56de\u5982\u4e0b\u5185\u5bb9\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5MariaDB<\/p>\n<pre>[root@localhost ~]# rpm -qa|grep mariadb\nmariadb-libs-5.5.64-1.el7.x86_64\nmariadb-5.5.64-1.el7.x86_64\nmariadb-server-5.5.64-1.el7.x86_64<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5\u548c\u914d\u7f6e\uff0c\u6309\u7167\u63d0\u793a\u8f93\u5165root\u7528\u6237\u65b0\u5bc6\u7801<\/p>\n<pre>[root@localhost ~]# yum install mariadb-server -y\n[root@localhost ~]# systemctl start mariadb\n[root@localhost ~]# systemctl enable mariadb\n[root@localhost ~]# systemctl status mariadb\n[root@localhost ~]# mysql_secure_installation<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>4\u3001\u4fee\u6539PHP\u914d\u7f6e\u6587\u4ef6\u8bbe\u7f6e\u65f6\u533a<br \/> \u641c\u7d22timezone\uff0c\u628adate.timezone\u524d\u7684\u6ce8\u91ca\u7b26#\u53bb\u6389\uff0c\u503c\u8bbe\u4e3aPRC<\/p>\n<pre>[root@localhost ~]# vim \/etc\/php.ini\ndate.timezone = PRC<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>5\u3001\u4e0b\u8f7d\uff0c\u89e3\u538bECShop 3.6\u6e90\u7801<\/p>\n<pre>[root@localhost ~]# wget http:\/\/zj.mycodes.net\/201708\/ECShop_3.6.0_UTF8_release.zip\n[root@localhost ~]# unzip ECShop_3.6.0_UTF8_release.zip\n[root@localhost ~]# mv ECShop_3.6.0_UTF8_release\/source\/* \/var\/www\/html\/<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>6\u3001\u8bbe\u7f6e\u6e90\u7801\u76ee\u5f55\u53ef\u5199<\/p>\n<pre>[root@localhost ~]# mv ECShop_3.6.0_UTF8_release\/source\/* \/var\/www\/html\/\n[root@localhost ~]# cd \/var\/www\/html\n[root@localhost ~]# ls\nappserver  ecshop\n[root@localhost ~]# chmod 777 -R appserver ecshop<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>7\u3001\u5173\u95edselinux<br \/> \u4fee\u6539selinux\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u628aSELINUX\u7684\u503c\u6539\u4e3adisabled<\/p>\n<pre>[root@localhost conf]# vim \/etc\/selinux\/config\nSELINUX=disabled\nSELINUXTYPE=targeted\n[root@localhost conf]# setenforce 0\nsetenforce: SELinux is disabled<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>8\u3001\u542f\u52a8Apache\u670d\u52a1\uff0c\u67e5\u8be2\u670d\u52a1\u72b6\u6001\u5e76\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u670d\u52a1<\/p>\n<pre>[root@localhost ~]# systemctl start httpd\n[root@localhost ~]# systemctl enable httpd\n[root@localhost ~]# systemctl status httpd<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>9\u3001\u9632\u706b\u5899\u5141\u8bb8Apache\u670d\u52a1\u768480\u7aef\u53e3<\/p>\n<pre>[root@localhost conf]# firewall-cmd --add-port=80\/tcp --zone=public --permanent\nsuccess\n[root@localhost conf]# firewall-cmd --reload\nsuccess<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>10\u3001\u6d4f\u89c8\u5668\u5b89\u88c5ECShop<br \/> \u5047\u8bbe\u670d\u52a1\u5668\u7684IP\u5730\u5740\u662f192.168.8.128\uff0c\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165<br \/><strong><span style=\"color:#f33b45\">http:\/\/192.168.85.128\/ecshop\/install\/index.php<\/span><\/strong><\/p>\n<p><span style=\"color:#f33b45\">\u603b\u662f\u62a5forbidden\uff0c\u624b\u52a8\u628awww\u548chtml,ecshop\u4e0b\u6240\u6709\u76ee\u5f55\u6743\u9650\u5168\u90e8\u624b\u52a8\u6539\u6210\u53ef\u7f16\u8f91\u6a21\u5f0f\u624d\u53ef\u4ee5\u3002\u3002\u3002<\/span><\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/e6f1892b11d5251639ca00c8ff0ebe6a-0.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe1\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe1\" \/><\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/92c1f29b53c926b1e2e90206a80cdb7f-1.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe2\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe2\" \/><\/p>\n<p>\u6839\u636e\u5b89\u88c5\u5411\u5bfc\u6b65\u9aa4\uff0c\u540c\u610f\u534f\u8bae\uff0c\u68c0\u67e5\u73af\u5883<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/e47ae8b892e132c45fe632190b8a6208-2.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe3\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe3\" \/><\/p>\n<p>ECShop\u5b89\u88c5 \u540c\u610f\u534f\u8bae<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/e47ae8b892e132c45fe632190b8a6208-3.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe4\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe4\" \/><\/p>\n<p>\u5982\u679c\u6709\u4e0d\u901a\u8fc7\u7684\u7ee7\u7eed\u624b\u52a8\u4fee\u6539\u6743\u9650<\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/980cb466591861d593ff20853aa044e3-4.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe5\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe5\" \/><\/p>\n<p>ECShop\u5b89\u88c5 \u68c0\u67e5\u73af\u5883<\/p>\n<p>\u914d\u7f6e\u7cfb\u7edf\u65f6\u8f93\u5165\u6570\u636e\u5e93root\u7528\u6237\u5bc6\u7801\uff0c\u6570\u636e\u5e93\u540decshop\uff0c\u8f93\u5165\u7ba1\u7406\u5458\u8d26\u53f7\u548c\u5bc6\u7801\uff0c\u52fe\u9009\u5b89\u88c5\u6d4b\u8bd5\u6570\u636e\uff0c\u70b9\u51fb\u7acb\u5373\u5b89\u88c5<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/980cb466591861d593ff20853aa044e3-5.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe6\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe6\" \/><\/p>\n<p><span style=\"color:#f33b45\">MySQL\u9700\u8981\u4fee\u6539\u5bc6\u7801\uff0c\u521b\u5efa\u6570\u636e\u5e93\uff0c\u4e0d\u7136\u63d0\u793a\u8d26\u6237\u6216\u8005\u5bc6\u7801\u5931\u8d25<\/span><\/p>\n<p><span style=\"color:#f33b45\">\u89e3\u51b3\uff1a<\/span><\/p>\n<pre>mysql&nbsp;-u&nbsp;root&nbsp;-p\n&nbsp;ALTER&nbsp;USER&nbsp;USER()&nbsp;IDENTIFIED&nbsp;BY&nbsp;'Biran1991!2#'\n&nbsp;create&nbsp;database&nbsp;ecshop;\n&nbsp;show&nbsp;databases;\n&nbsp;systemctl&nbsp;restart&nbsp;mysqld.service<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/30d42d670c511a2dd83c81a69528d774-6.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe7\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe7\" \/><\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/30d42d670c511a2dd83c81a69528d774-7.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe8\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe8\" \/><\/p>\n<p>\u6210\u529f<\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/33bdc4281e4221fd4f53c678b3951f12-8.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe9\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe9\" \/><\/p>\n<p><img decoding=\"async\" style=\"max-width:90%\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/d5170dabfc63b3ff779872e3d75543c2-9.png\" class=\"aligncenter\" title=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe10\" alt=\"\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u56fe10\" \/><br \/> \u5b89\u88c5\u5b8c\u6210\u540e\u4e0d\u9700\u8981\u6fc0\u6d3b\u7cfb\u7edf\uff0c\u6d4f\u89c8\u5668\u8f93\u5165\u9996\u9875\u5730\u5740\u8bbf\u95ee<br \/>http:\/\/192.168.8.128\/ecshop\/index.php<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8be6\u89e3ECSHOP\u5b89\u88c5\u548c\u4f7f\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\/centos 7 \u73af\u5883\u5b89\u88c5ecshop 3.6 1\u3001\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86Apache HTTP Server\uff0c\u5373httpd \u5982\u679c\u8fd4\u56de\u5982\u4e0b\u5185\u5bb9\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5 [root@localhost ~]# httpd -version Server version: Apache\/2.4.6 (CentOS) Server built: Aug 8 2019 11:41:18 \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5\u548c\u542f\u52a8\u670d\u52a1 [root@localhost ~]# yum install httpd -y \u767b\u5f55\u540e\u590d\u5236 \u63a8\u8350\uff08\u514d\u8d39\uff09\uff1a 2\u3001\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86PHP\u548c\u63d2\u4ef6 \u5982\u679c\u8fd4\u56de\u5982\u4e0b\u5185\u5bb9\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5PHP [root@localhost ~]# php -v PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-31951","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=31951"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31951\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}