ctl+alt+t
查看内核,gcc和Ubuntu的版本号:cat /proc/version(18.04)
内核版本和系统多少位:uname -a
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
不理会
ping 192.168.8.116
mysql -u root -h 192.168.8.116 -p
报错:没有对192.168.8.113的访问权限
查看ufw的状态:sudo ufw status
sudo ufw status verbose
其实用dd登录即可
没有打开文件的权限
sudo chmod 777 redis.conf
修改redis.conf
protected-mode:no
# bind 127.0.0.1
requirepass teche123
sudo systemctl status redis
sudo systemctl stop redis
sudo systemctl enable redis(无效)
sudo systemctl start redis
在服务器客户端登录
redis-cli
auth teche123
ping
set test "ok"
get test
exit
用客户端软件登录
192.168.8.116L6379
teche123
sudo arp-scan -I enp3s0 --localnet
模块地址:192.168.8.106
192.168.8.106:82
root abc123
数据库名:teche
字符集:utf8mb4--UTF-8 Unicode
排序规则:utf8mbs_general_ci
数据库名:techeusr
字符集:utf8mb4--UTF-8 Unicode
排序规则:utf8mbs_general_ci
创建数据库
数据库名:quartznet
字符集:utf8mb4--UTF-8 Unicode
排序规则:utf8mbs_general_ci
执行语句
# By: Ron Cordell - roncordell
# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.
# make sure you have UTF-8 collaction for best .NET interoperability
# CREATE DATABASE quartznet CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS QRTZ_CALENDARS;
CREATE TABLE QRTZ_JOB_DETAILS(
SCHED_NAME VARCHAR(60) NOT NULL,
JOB_NAME VARCHAR(60) NOT NULL,
JOB_GROUP VARCHAR(60) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
JOB_CLASS_NAME VARCHAR(250) NOT NULL,
IS_DURABLE BOOLEAN NOT NULL,
IS_NONCONCURRENT BOOLEAN NOT NULL,
IS_UPDATE_DATA BOOLEAN NOT NULL,
REQUESTS_RECOVERY BOOLEAN NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_TRIGGERS (
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
JOB_NAME VARCHAR(60) NOT NULL,
JOB_GROUP VARCHAR(60) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
NEXT_FIRE_TIME BIGINT(19) NULL,
PREV_FIRE_TIME BIGINT(19) NULL,
PRIORITY INTEGER NULL,
TRIGGER_STATE VARCHAR(16) NOT NULL,
TRIGGER_TYPE VARCHAR(8) NOT NULL,
START_TIME BIGINT(19) NOT NULL,
END_TIME BIGINT(19) NULL,
CALENDAR_NAME VARCHAR(60) NULL,
MISFIRE_INSTR SMALLINT(2) NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
REPEAT_COUNT BIGINT(7) NOT NULL,
REPEAT_INTERVAL BIGINT(12) NOT NULL,
TIMES_TRIGGERED BIGINT(10) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_CRON_TRIGGERS (
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
CRON_EXPRESSION VARCHAR(120) NOT NULL,
TIME_ZONE_ID VARCHAR(80),
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SIMPROP_TRIGGERS
(
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
STR_PROP_1 VARCHAR(512) NULL,
STR_PROP_2 VARCHAR(512) NULL,
STR_PROP_3 VARCHAR(512) NULL,
INT_PROP_1 INT NULL,
INT_PROP_2 INT NULL,
LONG_PROP_1 BIGINT NULL,
LONG_PROP_2 BIGINT NULL,
DEC_PROP_1 NUMERIC(13,4) NULL,
DEC_PROP_2 NUMERIC(13,4) NULL,
BOOL_PROP_1 BOOLEAN NULL,
BOOL_PROP_2 BOOLEAN NULL,
TIME_ZONE_ID VARCHAR(80) NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_BLOB_TRIGGERS (
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
BLOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_CALENDARS (
SCHED_NAME VARCHAR(60) NOT NULL,
CALENDAR_NAME VARCHAR(60) NOT NULL,
CALENDAR BLOB NOT NULL,
PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
ENGINE=InnoDB;
CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
SCHED_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
ENGINE=InnoDB;
CREATE TABLE QRTZ_FIRED_TRIGGERS (
SCHED_NAME VARCHAR(60) NOT NULL,
ENTRY_ID VARCHAR(140) NOT NULL,
TRIGGER_NAME VARCHAR(60) NOT NULL,
TRIGGER_GROUP VARCHAR(60) NOT NULL,
INSTANCE_NAME VARCHAR(60) NOT NULL,
FIRED_TIME BIGINT(19) NOT NULL,
SCHED_TIME BIGINT(19) NOT NULL,
PRIORITY INTEGER NOT NULL,
STATE VARCHAR(16) NOT NULL,
JOB_NAME VARCHAR(60) NULL,
JOB_GROUP VARCHAR(60) NULL,
IS_NONCONCURRENT BOOLEAN NULL,
REQUESTS_RECOVERY BOOLEAN NULL,
PRIMARY KEY (SCHED_NAME,ENTRY_ID))
ENGINE=InnoDB;
CREATE TABLE QRTZ_SCHEDULER_STATE (
SCHED_NAME VARCHAR(60) NOT NULL,
INSTANCE_NAME VARCHAR(60) NOT NULL,
LAST_CHECKIN_TIME BIGINT(19) NOT NULL,
CHECKIN_INTERVAL BIGINT(19) NOT NULL,
PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
ENGINE=InnoDB;
CREATE TABLE QRTZ_LOCKS (
SCHED_NAME VARCHAR(60) NOT NULL,
LOCK_NAME VARCHAR(40) NOT NULL,
PRIMARY KEY (SCHED_NAME,LOCK_NAME))
ENGINE=InnoDB;
CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
commit;
192.168.8.116:8080/ebx-bishop/data/carry
原先的云端指向:47.103.61.198:5002/ebx-bishop/data/carry
sudo mkdir -p /var/www/znzm
sudo chown dingding:dingding /var/www/znzm
sudo chmod -R 777 /var/www/znzm
Program
中的代码注释,发布网站
192.168.8.116
dingding
teche123
22
appsettings
中有关配置
192.168.8.116
cloudgo:0,
shixugo:0
dotnet DD.Local.Web.dll
sudo apt install dotnet-sdk-3.0
dotnet --list-sdks
teche
数据库照明
techeusr
数据库Program
中的种子数据部分注释掉
管理员:13800000000 TecheFwd2018
设备工作人员:shebei 888888
https://exmail.qq.com/login
darren@ddingsafe.com
TecheDing2019
insert into t values ('2019-07-15 00:00:00', 10);
insert into t values ('2019-07-15 01:00:00', 20);
http://192.168.8.116:6020/rest/sql
show databases;
network:
version: 2
renderer: NetworkManager
ethernets:
ens33:
dhcp4: no
dhcp6: no
addresses: [192.168.8.116]
gateway4: 192.168.8.1
nameservers:
addresses: [114.114.114.114, 8.8.8.8]
“TDegnine”: {
"DataSource": "http://127.0.0.1:6020/rest/sql",
"Username": "root",
"Password": "taosdata",
"Database": "rlq_huaian_7_10",
"PlanInterval": 5000
},
- 总部网站
1380000000
DrrnFwd2018
http://localhost:5000/SuperAdmin
- 创建数据库,这样SuperTable控制器才不会报错
taos create database rlq_huaian_7_10; use rlq_huaian_7_10;
drop database rlq_huaian_7_10;
create database rlq_huaian_7_10 KEEP 1095;
- 运行网站
- 创建超级表
- 确认超级表:show stables;
- 创建电量子表 187ED5314E0C
dl_187ED5314E0C_0_h dl_187ED5314E0C_0_d dl_187ED5314E0C_0_m dl_187ED5314E0C_1_h dl_187ED5314E0C_1_d dl_187ED5314E0C_1_m
- 把时序shixugo打开,重新开网站
# 远程准备
- 地址: 192.168.18.54
- 内网地址:
IP:192.168.10.36 路由:192.168.10.254 DNS:114.114.114.114
- 远程蓝屏
mkdir Downloads sudo wget http://www.c-nergy.be/downloads/install-xrdp-3.0.zip sudo unzip install-xrdp-3.0.zip sudo chmod 777 Install-xrdp-3.0.sh sudo ./Install-xrdp-3.0.sh sudo shutdown -r now
# 调通程序
- 确定ip: ifconfig -a
局域网: 192.168.8.116 255.255.255.0
公网: 192.168.10.36
网卡名称: enp3s0
- 查找局域网内的模块
sudo arp-scan -I enp3s0 --localnet 发现没有模块
- 安装dhcp
安装:sudo apt install isc-dhcp-server 配置文件:/etc/dhcp/dhcpd.conf 赋予权限:sudo chmod 666 chdpd.conf 配置:
default-lease-time 600;
max-lease-time 7200;
INTERFACESv4="enp3s0";
subnet 192.168.8.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.8.10 192.168.8.254;
option routers 192.168.8.1;
option sunet-mask 255.255.255.0;
option domain-name-servers 192.168.8.1 //不一定需要
}
sudo systemctl stop isc-dhcp-server sudo systemctl start isc-dhcp-server sudo systemctl status isc-dhcp-server
- 查找局域网内的模块
sudo arp-scan -I enp3s0 --localnet 发现没有模块
- 局域网内有VLAN
/etc/netplan
石教授配置
- 确认服务器指向
192.168.8.1
/etc/netplan/中的配置
network: version: 2 renderer: NetworkManager ethernets:
ens33:
dhcp4: false
addresses: [192.168.8.1/24]
192.168.8.1:8080/ebx-bishop/data/carry
- 更改模块地址
sudo arp-scan -I enp3s0 --localnet 192.168.8.11 无法登陆远程桌面 sudo apt-get install w3m w3m 192.168.8.11:82 无法浏览 14 15 20 23 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 总共19个模块
- 删除数据库中原先的记录
select * from KaiGuan select * from KaiGuanWarning select * from warningHistories select * from GongLvTongJi SET FOREIGN_KEY_CHECKS=0; truncate table GongLvTongJi; truncate table warningHistories; truncate table KaiGuanWarning; truncate table KaiGuan; SET FOREIGN_KEY_CHECKS=1;
- 删除Redis数据库测试数据
- 修改appsettings
192.168.8.1 shixugo=0 ubuntu无法打开目录
- 启动网站:var/www/znzm,dotnet DD.Local.Web.dll
- 打开网站:192.168.8.1:8080
- 查看缓存数据,确认所有线路是否都在
- 登录网站:13800000000 TecheFwd2018
- 添加项目楼层区域电箱
select * from DianXiang select * from QuYu select * from Project select * from LouCeng
SET FOREIGN_KEY_CHECKS=0; truncate table DianXiang; truncate table QuYu; truncate table LouCeng; SET FOREIGN_KEY_CHECKS=1; 准备图片
研发楼 2层
2层强电间北墙
2层北箱
187ED531FBC4
2层强电间西墙
2层西箱
187ED53191AC
3层
3层强电间北墙
3层北箱
187ED53201DC
4层
4层强电间北墙
4层北箱
187ED531E260
5层
5层强电间北墙
5层北箱
187ED5325394
6层
6层强电间北墙
6层北箱
187ED5323694
6层强电间西墙
6层西箱
187ED531700C
7层
7层强电间北墙
7层北箱
187ED5318C48
8层
8层强电间北墙
8层北箱
187ED531E9F8
9层
9层强电间北墙
9层北箱
187ED531E5FC
10层
10层强电间东墙
10层东箱
187ED5314324
13层
13层强电间东墙
13层东箱
187ED531FF98
15层
15层强电间东墙
15层东箱
187ED531E9CC
- 添加开关
/KaiGuan/SelectMac 187ED531E9CC为什么没有显示,缓存中存在,获取实时数据的时候忽略了,因为是380的模块 把该部分代码逻辑取消
- 把开关的可视化缓存先删除
- 可视化界面,控制开关
- 常见时序数据库电量子表,根据每个模块
187ED531FBC4 187ED53191AC 187ED53201DC 187ED531E260 187ED5325394 187ED5323694 187ED531700C 187ED5318C48 187ED531E9F8 187ED531E5FC 187ED5314324 187ED531FF98 187ED531E9CC
describe dl_187ed531fbc4_0_h describe dl_187ed531fbc4_0_d describe dl_187ed531fbc4_0_m describe dl_187ed531fbc4_1_h describe dl_187ed531fbc4_1_d describe dl_187ed531fbc4_1_m
- 关闭网站,把shixugo=1,开启网站
# 登录闪退的问题
systemctl stop gdm.service
systemctl restart gdm.service
sudo dpkg-reconfigure gdm3
sudo reboot
```