/unicom

领取青岛啤酒流量和趣味天天摇(抽奖挂机)

Primary LanguageJava

unicom

https://img.shields.io/badge/language-java-orange.svg?style=flat-square

不会写东西,直接说一下怎么使用啦。。

演示站:https://www.iheit.com/ll

编译包下载: https://github.com/kukume/unicom/releases/

环境

  • JDK
  • 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中的配置

apikeysecretKey为百度ai的数字识别,创建应用,选择数字识别,把key填进去即可。

大佬的接口gg了,自己整了一个。不需要填入百度ai的key了

其余部分配置见图:

然后把unicom.jarapplication.yml放到同一文件夹下,比如我的文件都在/root/java文件下

运行

cd /root/java
java -jar unicom.jar
#这样的话首次获取session的时间会非常长,可以这样运行
java -Djava.security.egd=file:/dev/./urandom -jar unicom.jar

如需持久化运行,可以使用screen

cd /root/java
screen -dmS unicom java -jar unicom.jar
#这样的话首次获取session的时间会非常长,可以这样运行
screen -dmS unicom java -Djava.security.egd=file:/dev/./urandom -jar unicom.jar

运行之后打开http://IP地址:8099即可

如果需要域名访问,在宝塔中添加反向代理,代理地址设置为http://localhost:8099即可