NutzWk 5.0.x microservice distributed version development and deployment instructions

NutzWk 5.x has been released for a period of time. During this period, a smart water system (NB-IOT), an Internet of Things platform, an equipment rental platform, a smart sleep platform, a smart park project, etc. have been developed based on this version. Development and deployment I encountered some small problems in the process, open this post to share some experience and save everyone from detours.

Project address 1: https://github.com/Wizzercn/NutzWk Project address 2: https://gitee.com/wizzer/NutzWk

1. The operating environment is actually written clearly in the project readme and wk-wiki. I would like to emphasize here that these versions are not necessary, but for novices, it is best to keep the same version number. ~~

JDK 8 162 +
Maven 3.5.3 +
Redis 4.0.8 +
MySql 5.7 +
Zookeeper 3.4.11 +

2. The development environment is generally recommended to use IDEA for development, because it is a maven multi-module project, directly use IDEA to open the project root directory, it will download the jar package through maven, automatically build the project and then how to start the project, there are many ways, simple Say a few: 1) Open the main class in each NB project (nutzboot for short) project, right-click to run, such as cn.wizzer.sys.commons.core.***MainLauncher 2) Configure Application to run through IDEA's Run, For details, see https://github.com/Wizzercn/NutzWk/blob/nutzboot-dubbo/wk-wiki/01.QuickStart/01.02.Start.md 3) From the command line, run mvn compile nutzboot:run or IDEA in the root directory of the NB project Run through the plug-in in the Maven management interface on the right, see https://github.com/nutzam/nutzboot-maven-plugin for details

3. The startup sequence ensures that MySQL, Redis, and Zookeeper are all started normally and are the default ports and default configurations (of course, these configuration items can be modified in application.properties) 1) MySQL creates a blank database, the encoding format is UTF-8, and the database name is nutzwk_nb 2) The module startup sequence of the NB project is sys --> cms[optional] --> wx[optional] --> task[optional] --> web-platform --> web-api[optional ] 3) As mentioned above, if you want to run and access the background, you only need to start sys and web-platform. Note that there is a startup sequence, and other modules need to be used. 4) The task timing task is dependent on sys, while the web The -platform system management relies on the task module for timed task management. If you want the task to run independently and do not need to be managed through the page, you can make less changes yourself, it is not impossible.

4. Deployment precautions 1) Because the login page encrypts the password with RSA, sometimes the deployment will not be able to log in, and the background throws an exception java.lang.SecurityException: JCE cannot authenticate the provider BC, the solution is in It has been written in the code comments, but few people go to https://github.com/Wizzercn/NutzWk/blob/nutzboot-dubbo/wk-app/wk-nb-web-platform/src/main/java/ cn/wizzer/app/web/commons/shiro/filter/PlatformAuthenticationFilter.java

1、编辑文件 /usr/java/jdk1.8.0_162/jre/lib/security/java.security
     在9下面添加 security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider
2、拷贝 bcprov-jdk16-143.jar 和 bcprov-jdk15-135.jar 到 /usr/java/jdk1.8.0_162/jre/lib/ext 目录下
3、别问我上面两个文件怎么找……

(If you are https, you can change the RSA encryption method and deprecate it) 2) Server precautions: whether to synchronize the server time, whether to match the hostname in hosts and the mapping relationship between hostname and 127.0.0.1, whether the memory is enough (Have you specified the memory size for the jar), etc.

5. Others 1) Please pay attention to the dynamics of NutzWk, there are new version releases and suggestions to update in time, often to fix problems or add new features 2) If NutzWk has helped you, or has been used in production, https://wizzer.cn /donation welcome to give a certain amount of money to encourage and create a good open source environment in China 3) Finally, I would like to thank the beasts and the majority of netizens in the nutz community for their help and encouragement. Without your support, this project would not have been updated for more than 6 years.

PS: If you have any questions, please open a new thread~~~ :)

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324108464&siteId=291194637