不会写东西,直接说一下怎么使用啦。。
编译包下载: https://github.com/kukume/unicom/releases/
- JDK1.8
- MySQL(如使用mysql)
- nginx/apache(如需域名访问)
快捷方法安装吧。
以宝塔为例:
安装宝塔
#centos
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
#ubuntu
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
#debian
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
打开宝塔面板,只需要在应用商店安装好tomcat9
就会带有JDK1.8
环境。
然后在应用商店安装好mysql
。
下载编译包,更改application.yml
中的配置
然后把unicom.jar
和application.yml
放到同一文件夹下,比如我的文件都在/root/java
文件下
运行
cd /root/java
java -jar unicom.jar
如需持久化运行,可以使用screen
cd /root/java
screen -dmS unicom java -jar unicom.jar
运行之后打开http://IP地址:8099
即可
如果需要域名访问,在宝塔中添加反向代理,代理地址设置为http://localhost:8099
即可