Java aggregation engineering compilation and deployment

DT Company, arranged server development work for Wildfire IM. Wildfire IM_QuickStart

Download the project via github desktop

[email protected]:wildfirechat/server.git

Environmental requirements, jdk: 1.8; MySQL: 5.7.27.

After importing the project, you can see that this is an aggregation project.

    <modules>
        <module>broker</module>
        <module>common</module>
        <module>sdk</module>
        <module>distribution</module> 
        <!-- distribution是一个发布模块,仅有脚本文件 -->
    </modules>

Click Maven in the sidebar.
!](https://img-blog.csdnimg.cn/20200408114157910.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L25laGVxaQ==,size_16,color_FFFFFF,t_70)

Click the show dependencies button of Wildfire Chat to view the dependencies.
Insert picture description here
Click clean-> compile under the root pom, and then generate the corresponding tar package under distribution / target. distribution-0.39-bundle-tar.tar.gz

Extract the command line to the directory

Use the root user to execute

sh ./bin/wildfirechat.sh

Commands can be used for background execution

nohup sh ./bin/wildfirechat.sh 2>&1 &

Ensure that the program can continue to run when exiting the terminal

After executing the start command of the corresponding system, wait for 10 seconds and enter it in the browser

http://${服务器的IP}/api/version

View version information.

Script file wildfirechat.sh

$JAVA -server $JAVA_OPTS $JAVA_OPTS_SCRIPT 
-Dlog4j.configuration="file:$LOG_FILE" 
-Dcom.mchange.v2.c3p0.cfg.xml="$C3P0_CONF_FILE" 
-Dhazelcast.configuration="file:$HZ_CONF_FILE" 
-Dwildfirechat.path="$WILDFIRECHAT_PATH" 
-cp "$WILDFIRECHAT_HOME/lib/*" cn.wildfirechat.server.Server

The first few run several services, and finally cn.wildfirechat.server.Server is a custom startup class.

Access local restful api

curl http://192.168.149.2/api/version
{
	"tags":"null",
	"branch":"wildfirechat",
	"dirty":"null",
	"remoteOriginUrl":"[email protected]:wildfirechat/server.git",
	"commitId":"null",
	"commitIdAbbrev":"2ba54a4",
	"describe":"0.29-1-148-g2ba54a4-dirty",
	"describeShort":"null",
	"commitUserName":"heavyrain.lee",
	"commitUserEmail":"[email protected]",
	"commitMessageFull":"撤回消息时带上被撤回消息的信息\n",
	"commitMessageShort":"撤回消息时带上被撤回消息的信息",
	"commitTime":"20200406112931",
	"closestTagName":"null",
	"closestTagCommitCount":"null",
	"buildUserName":"Hawkii",
	"buildUserEmail":"[email protected]",
	"buildTime":"20200408103756",
	"buildHost":"null",
	"buildVersion":"null"
}
Published 17 original articles · liked 0 · visits 216

Guess you like

Origin blog.csdn.net/neheqi/article/details/105383523