# mall **Repository Path**: chen-jf/mall ## Basic Information - **Project Name**: mall - **Description**: 仿小米商城项目,支持微信支付、支付宝支付 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2020-05-30 - **Last Updated**: 2021-09-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 软件安装 Centos 7安装 JDK :https://blog.csdn.net/Andy2019/article/details/106410861 Centos 7安装 mysql 8.0 :https://blog.csdn.net/Andy2019/article/details/100175656 Centos 7 安装 Redis :https://blog.csdn.net/Andy2019/article/details/106410922 Centos 7 安装 Nginx:https://blog.csdn.net/Andy2019/article/details/103063654 #### 部署流程图 #### ![部署流程图](部署流程图.png) #### nginx配置 ``` server { listen 80; server_name localhost; location / { root /usr/share/nginx/html/mall/; try_files $uri $uri/ /index.html; index index.html index.htm; } location /api { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://47.114.47.149:80/; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } ``` #### Redis 配置 ``` protected-mode no daemonize no requirepass ****** ``` #### CentOS下配置redis允许远程连接 - 将 *bind 127.0.0.1* 使用#注释掉,改为# bind 127.0.0.1(bind配置的是允许连接的ip,默认只允许本机连接;若远程连接需注释掉,或改为0.0.0.0) - 将 *protected-mode yes* 改为 protected-mode no(3.2之后加入的新特性,目的是禁止公网访问redis cache,增强redis的安全性) - 将 *requirepass foobared* 注释去掉,foobared为密码,也可修改为别的值(可选,建议设置)