This article mainly explains the installation of the environment required by the mall project under windows in the form of graphics, mainly including IDEA, Mysql, Redis, Elasticsearch, Mongodb, RabbitMQ, OSS.
IDEA
1. For the installation and use of IDEA, please refer to https://github.com/judasn/IntelliJ-IDEA-Tutorial
2. Search the plugin repository, install the plugin lombok
3. Download the project locally and open it directly
Mysql
Download and install mysql5.7 version, download address: https://dev.mysql.com/downloads/installer/
Set the database account password: root root
Download and install the client connection tool Navicat, download address: http://www.formysql.com/xiazai.html
Create database mall
Import the mall.sql file under document/sql
Redis
1. Download Redis, download address: https://github.com/MicrosoftArchive/redis/releases
2. After downloading, unzip to the specified directory
3. After entering cmd in the current address bar, execute the redis startup command: redis-server.exe redis.windows.conf
Elasticsearch
1. Download the zip package of Elasticsearch 6.2.2, and unzip it to the specified directory, download address: https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-2-2
2. Install the Chinese word segmentation plugin and execute the following command in the elasticsearch-6.2.2\bin directory: elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.2.2/elasticsearch -analysis-ik-6.2.2.zip
3. Run elasticsearch.bat in the bin directory to start Elasticsearch
4. Download Kibana, as a client to access Elasticsearch, please download the 6.2.2 version of the zip package, and unzip it to the specified directory, download address: https://artifacts.elastic.co/downloads/kibana/kibana-6.2.2 -windows-x86_64.zip
5. Run kibana.bat in the bin directory to start the Kibana user interface
6. Visit http://localhost:5601 to open Kibana's user interface
Mongodb
1. Download the Mongodb installation package, download address: https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.2.21-signed.msi
2. Select the installation path to install
3. Create two folders data\db and data\log under the installation path
4. Create the mongod.cfg configuration file under the installation path
systemLog: destination: file path: D:\developer\env\MongoDB\data\log\mongod.logstorage: dbPath: D:\developer\env\MongoDB\data\db
5. Install as a service (administrator rights are required to run commands)
D:\developer\env\MongoDB\bin\mongod.exe --config "D:\developer\env\MongoDB\mongod.cfg" --install
6. Service related commands
Start service: net start MongoDB close service: net stop MongoDB removal service: D:\developer\env\MongoDB\bin\mongod.exe --remove
7. Download the client program: https://download.robomongo.org/1.2.1/windows/robo3t-1.2.1-windows-x86_64-3e50a65.zip
8. Unzip to the specified directory, open robo3t.exe and connect to localhost:27017
RabbitMQ
1. Install Erlang, download address: http://erlang.org/download/otp win64 21.3.exe
2. Install RabbitMQ, download address: https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.14/rabbitmq-server-3.7.14.exe
3. After the installation is complete, enter the sbin directory under the RabbitMQ installation directory
4. Enter cmd in the address bar and press Enter to start the command line, and then enter the following command to start the management function:
rabbitmq-plugins enable rabbitmq_management
5. Visit the address to check whether the installation is successful: http://localhost:15672/
6. Enter the account password and log in: guest guest
7. Create an account and set its role as an administrator: mall mall
8. Create a new virtual host as: /mall
9. Click on the mall user to enter the user configuration page
10. Configure the permissions of the virtual host for mall users
11. At this point, the installation and configuration of RabbitMQ is complete.
US
Open OSS service
Log in to the official website of Alibaba Cloud;
Move the mouse to the product tab, click Object Storage OSS to open the OSS product details page;
On the OSS product details page, click Activate Now.
Create storage space
Click the console button in the upper right corner of the page to enter the console
Select the object storage OSS in my cloud product
Click the plus sign on the left storage space to create a new storage space
Create a new storage space and set the read and write permissions to public read
Cross-domain resource sharing (CORS) settings
Select a storage space and open its basic settings
Click the settings button across settings
Click Create Rule
Set cross-domain rules
mall-admin
Start the project: directly run the main method of com.macro.mall.MallAdminApplication
Interface document address: http://localhost:8080/swagger-ui.html
mall-search
Start the project: directly run the main method of com.macro.mall.search.MallSearchApplication
Interface document address: http://localhost:8081/swagger-ui.html
You need to call the interface to import data before use; http://localhost:8081/esProduct/importAll
If there is a problem that cannot be started, you can delete the data in Elasticsearch before starting
mall-portal
Start the mall-portal project: directly run the main method of com.macro.mall.portal.MallPortalApplication
Interface document address: http://localhost:8085/swagger-ui.html