今天给大家操作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.profile