今天给大家操作HC小区物联网系统安装,代码地址 https://gitee.com/java110/MicroCommunityThings
视频地址 https://www.bilibili.com/video/BV1fv411j7vr
一、 创建数据库
这里我们 和HC小区管理系统共用一个数据库
./mysql -h127.0.0.1 -e"create user ‘hc_things’@’%’ identified by ‘hc_things12345678’;"
./mysql -h127.0.0.1 -e"flush privileges;"
./mysql -h127.0.0.1 -e"CREATE DATABASE hc_things ;"
./mysql -h127.0.0.1 -e"grant all privileges on hc_things.* to ‘hc_things’@’%’ ;"
wget https://dl.winqi.cn/hc/iot/hc_things.sql1
mv hc_things.sql1 hc_things.sql
vim hc_things.sql 第一行加入 use hc_things;
./mysql -h127.0.0.1 -e"source /home/mysql/mysql/bin/hc_things.sql"

二、 添加域名映射
vim /etc/hosts
127.0.0.1 iot.homecommunity.cn
今天我们把物联网系统安装在另一台机器上所以,这里ip不是127.0.0.1

三、 安装软件
mkdir iot
cd iot
mkdir bin
mkdir face
cd bin
vim start_iot.sh
nohup java -jar-Dspring.profiles.active=dev -Dcache-Xms256m-Xmx512m …/Things.jar > …/things.log $2 2>&1 &
tail-f …/things.log
cd ~/iot/
wget https://dl.winqi.cn/hc/iot/Things.jar
cd bin
sh start_iot.sh
这里 nginx转发下,主机没有开9999端口(可以忽略)

四、 配置
在c_app_attr 中的地址改成物业系统的在物业系统编码映射中ip改成物联网系统的

更多推荐