鼎鼎知识库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2020淮安安装.md 17KB

пре 4 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. # 准备工作
  2. - 查看系统信息
  3. ```
  4. ctl+alt+t
  5. 查看内核,gcc和Ubuntu的版本号:cat /proc/version(18.04)
  6. 内核版本和系统多少位:uname -a
  7. ```
  8. - 明确局域网地址:192.168.8.116
  9. - 用户名和密码:dingding teche123
  10. # 安装运行时
  11. - 下载Microsoft针对于Ubuntu 18.04的Packging Signing Key:sudo wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
  12. - 安装Microsoft packaging signing key: sudo dpkg -i packages-microsoft-prod.deb
  13. - 在apt中增加repository: sudo add-apt-repository universe
  14. - 支持HTTPs: sudo apt install apt-transport-https
  15. - 更新apt: sudo apt update
  16. - 安装运行时:sudo apt install -y dotnet-runtime-3.0
  17. - 查看运行时: dotnet --list-runtimes
  18. # 安装MySQL 5.7
  19. - 确认当前目录:pwd(/home/dingding)
  20. - 创建目录:sudo mkdir tmp
  21. - 进入目录:cd tmp
  22. - sudo apt install curl
  23. - 下载deb文件: sudo curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
  24. - 查看是否下载:ls
  25. - 安装:sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
  26. ```
  27. Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
  28. 不理会
  29. ```
  30. - sudo apt-get update
  31. - sudo apt-get install mysql-server,输入root密码:teche123
  32. - mysql -u root -p
  33. - 创建用户:CREATE USER 'dd'@'%' IDENTIFIED BY 'dd@123';
  34. - 授权用户:GRANT ALL PRIVILEGES ON *.* TO 'dd'@'%';
  35. - 让授权生效:FLUSH PRIVILEGES;
  36. - 退出MySQL: exit;
  37. - 来到根目录: cd ~
  38. - 来到配置文件目录: /etc/mysql/mysql.d
  39. - 修改文件的权限:sudo chmod 666 mysqld.cnf
  40. - 修改配置文件:bind-address=0.0.0.0
  41. - 查看状态:sudo systemctl status mysql
  42. - 重启服务:sudo systemctl restart mysql
  43. - 测试是否可以连接到服务器上的MySQL
  44. ```
  45. ping 192.168.8.116
  46. mysql -u root -h 192.168.8.116 -p
  47. 报错:没有对192.168.8.113的访问权限
  48. 查看ufw的状态:sudo ufw status
  49. sudo ufw status verbose
  50. 其实用dd登录即可
  51. ```
  52. # 安装Redis
  53. - 更新软件:suo apt update
  54. - sudo apt install redis-server
  55. - 来到目录:/etc/redis
  56. ```
  57. 没有打开文件的权限
  58. sudo chmod 777 redis.conf
  59. ```
  60. - 修改redis.conf
  61. ```
  62. protected-mode:no
  63. # bind 127.0.0.1
  64. requirepass teche123
  65. ```
  66. - sudo systemctl status redis
  67. - sudo systemctl stop redis
  68. - sudo systemctl enable redis(无效)
  69. - sudo systemctl start redis
  70. - 在服务器客户端登录
  71. ```
  72. redis-cli
  73. auth teche123
  74. ping
  75. set test "ok"
  76. get test
  77. exit
  78. ```
  79. - 用客户端软件登录
  80. ```
  81. 192.168.8.116L6379
  82. teche123
  83. ```
  84. # 准备
  85. - 连接MySQL数据库:192.168.8.109 3306 dd dd@123
  86. - Redis数据库:127.0.0.1 teche123
  87. - 让模块和服务器在一个局域网
  88. - 查看网卡名称:ifconfig enp3s0
  89. - 安装arp-scan:sudo apt-get install arp-scan
  90. - 查看局域网内ip,确定模块的ip
  91. ```
  92. sudo arp-scan -I enp3s0 --localnet
  93. 模块地址:192.168.8.106
  94. ```
  95. - 登录模块187ED5314E0C
  96. ```
  97. 192.168.8.106:82
  98. root abc123
  99. ```
  100. # 创建主数据库teche
  101. ```
  102. 数据库名:teche
  103. 字符集:utf8mb4--UTF-8 Unicode
  104. 排序规则:utf8mbs_general_ci
  105. ```
  106. # 创建用户数据库techeusr
  107. ```
  108. 数据库名:techeusr
  109. 字符集:utf8mb4--UTF-8 Unicode
  110. 排序规则:utf8mbs_general_ci
  111. ```
  112. # 创建定时任务数据库quartznet
  113. - 创建数据库
  114. ```
  115. 数据库名:quartznet
  116. 字符集:utf8mb4--UTF-8 Unicode
  117. 排序规则:utf8mbs_general_ci
  118. ```
  119. - 执行语句
  120. ```
  121. # By: Ron Cordell - roncordell
  122. # 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.
  123. # make sure you have UTF-8 collaction for best .NET interoperability
  124. # CREATE DATABASE quartznet CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  125. DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
  126. DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
  127. DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
  128. DROP TABLE IF EXISTS QRTZ_LOCKS;
  129. DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
  130. DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
  131. DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
  132. DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
  133. DROP TABLE IF EXISTS QRTZ_TRIGGERS;
  134. DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
  135. DROP TABLE IF EXISTS QRTZ_CALENDARS;
  136. CREATE TABLE QRTZ_JOB_DETAILS(
  137. SCHED_NAME VARCHAR(60) NOT NULL,
  138. JOB_NAME VARCHAR(60) NOT NULL,
  139. JOB_GROUP VARCHAR(60) NOT NULL,
  140. DESCRIPTION VARCHAR(250) NULL,
  141. JOB_CLASS_NAME VARCHAR(250) NOT NULL,
  142. IS_DURABLE BOOLEAN NOT NULL,
  143. IS_NONCONCURRENT BOOLEAN NOT NULL,
  144. IS_UPDATE_DATA BOOLEAN NOT NULL,
  145. REQUESTS_RECOVERY BOOLEAN NOT NULL,
  146. JOB_DATA BLOB NULL,
  147. PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
  148. ENGINE=InnoDB;
  149. CREATE TABLE QRTZ_TRIGGERS (
  150. SCHED_NAME VARCHAR(60) NOT NULL,
  151. TRIGGER_NAME VARCHAR(60) NOT NULL,
  152. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  153. JOB_NAME VARCHAR(60) NOT NULL,
  154. JOB_GROUP VARCHAR(60) NOT NULL,
  155. DESCRIPTION VARCHAR(250) NULL,
  156. NEXT_FIRE_TIME BIGINT(19) NULL,
  157. PREV_FIRE_TIME BIGINT(19) NULL,
  158. PRIORITY INTEGER NULL,
  159. TRIGGER_STATE VARCHAR(16) NOT NULL,
  160. TRIGGER_TYPE VARCHAR(8) NOT NULL,
  161. START_TIME BIGINT(19) NOT NULL,
  162. END_TIME BIGINT(19) NULL,
  163. CALENDAR_NAME VARCHAR(60) NULL,
  164. MISFIRE_INSTR SMALLINT(2) NULL,
  165. JOB_DATA BLOB NULL,
  166. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  167. FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
  168. REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
  169. ENGINE=InnoDB;
  170. CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
  171. SCHED_NAME VARCHAR(60) NOT NULL,
  172. TRIGGER_NAME VARCHAR(60) NOT NULL,
  173. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  174. REPEAT_COUNT BIGINT(7) NOT NULL,
  175. REPEAT_INTERVAL BIGINT(12) NOT NULL,
  176. TIMES_TRIGGERED BIGINT(10) NOT NULL,
  177. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  178. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  179. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  180. ENGINE=InnoDB;
  181. CREATE TABLE QRTZ_CRON_TRIGGERS (
  182. SCHED_NAME VARCHAR(60) NOT NULL,
  183. TRIGGER_NAME VARCHAR(60) NOT NULL,
  184. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  185. CRON_EXPRESSION VARCHAR(120) NOT NULL,
  186. TIME_ZONE_ID VARCHAR(80),
  187. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  188. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  189. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  190. ENGINE=InnoDB;
  191. CREATE TABLE QRTZ_SIMPROP_TRIGGERS
  192. (
  193. SCHED_NAME VARCHAR(60) NOT NULL,
  194. TRIGGER_NAME VARCHAR(60) NOT NULL,
  195. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  196. STR_PROP_1 VARCHAR(512) NULL,
  197. STR_PROP_2 VARCHAR(512) NULL,
  198. STR_PROP_3 VARCHAR(512) NULL,
  199. INT_PROP_1 INT NULL,
  200. INT_PROP_2 INT NULL,
  201. LONG_PROP_1 BIGINT NULL,
  202. LONG_PROP_2 BIGINT NULL,
  203. DEC_PROP_1 NUMERIC(13,4) NULL,
  204. DEC_PROP_2 NUMERIC(13,4) NULL,
  205. BOOL_PROP_1 BOOLEAN NULL,
  206. BOOL_PROP_2 BOOLEAN NULL,
  207. TIME_ZONE_ID VARCHAR(80) NULL,
  208. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  209. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  210. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  211. ENGINE=InnoDB;
  212. CREATE TABLE QRTZ_BLOB_TRIGGERS (
  213. SCHED_NAME VARCHAR(60) NOT NULL,
  214. TRIGGER_NAME VARCHAR(60) NOT NULL,
  215. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  216. BLOB_DATA BLOB NULL,
  217. PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
  218. INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
  219. FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
  220. REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
  221. ENGINE=InnoDB;
  222. CREATE TABLE QRTZ_CALENDARS (
  223. SCHED_NAME VARCHAR(60) NOT NULL,
  224. CALENDAR_NAME VARCHAR(60) NOT NULL,
  225. CALENDAR BLOB NOT NULL,
  226. PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
  227. ENGINE=InnoDB;
  228. CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
  229. SCHED_NAME VARCHAR(60) NOT NULL,
  230. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  231. PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
  232. ENGINE=InnoDB;
  233. CREATE TABLE QRTZ_FIRED_TRIGGERS (
  234. SCHED_NAME VARCHAR(60) NOT NULL,
  235. ENTRY_ID VARCHAR(140) NOT NULL,
  236. TRIGGER_NAME VARCHAR(60) NOT NULL,
  237. TRIGGER_GROUP VARCHAR(60) NOT NULL,
  238. INSTANCE_NAME VARCHAR(60) NOT NULL,
  239. FIRED_TIME BIGINT(19) NOT NULL,
  240. SCHED_TIME BIGINT(19) NOT NULL,
  241. PRIORITY INTEGER NOT NULL,
  242. STATE VARCHAR(16) NOT NULL,
  243. JOB_NAME VARCHAR(60) NULL,
  244. JOB_GROUP VARCHAR(60) NULL,
  245. IS_NONCONCURRENT BOOLEAN NULL,
  246. REQUESTS_RECOVERY BOOLEAN NULL,
  247. PRIMARY KEY (SCHED_NAME,ENTRY_ID))
  248. ENGINE=InnoDB;
  249. CREATE TABLE QRTZ_SCHEDULER_STATE (
  250. SCHED_NAME VARCHAR(60) NOT NULL,
  251. INSTANCE_NAME VARCHAR(60) NOT NULL,
  252. LAST_CHECKIN_TIME BIGINT(19) NOT NULL,
  253. CHECKIN_INTERVAL BIGINT(19) NOT NULL,
  254. PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
  255. ENGINE=InnoDB;
  256. CREATE TABLE QRTZ_LOCKS (
  257. SCHED_NAME VARCHAR(60) NOT NULL,
  258. LOCK_NAME VARCHAR(40) NOT NULL,
  259. PRIMARY KEY (SCHED_NAME,LOCK_NAME))
  260. ENGINE=InnoDB;
  261. CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
  262. CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
  263. CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  264. CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
  265. CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
  266. CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
  267. CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
  268. CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  269. CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
  270. CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
  271. CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
  272. CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
  273. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
  274. CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
  275. CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
  276. CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
  277. CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
  278. CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
  279. CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
  280. CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
  281. commit;
  282. ```
  283. # 搭建网站,服务器指向
  284. - 修改模块的服务器指向:`192.168.8.116:8080/ebx-bishop/data/carry`
  285. ```
  286. 原先的云端指向:47.103.61.198:5002/ebx-bishop/data/carry
  287. ```
  288. - 通过软件重启模块
  289. - 创建目录:`sudo mkdir -p /var/www/znzm`
  290. - 为登录用户配权限:`sudo chown dingding:dingding /var/www/znzm`
  291. - 给目录分配权限:`sudo chmod -R 777 /var/www/znzm`
  292. - 取消`Program`中的代码注释,发布网站
  293. - 使用FileZilla连接服务端
  294. ```
  295. 192.168.8.116
  296. dingding
  297. teche123
  298. 22
  299. ```
  300. - 上传,并修改`appsettings`中有关配置
  301. ```
  302. 192.168.8.116
  303. cloudgo:0,
  304. shixugo:0
  305. ```
  306. - 运行网站
  307. ```
  308. dotnet DD.Local.Web.dll
  309. sudo apt install dotnet-sdk-3.0
  310. dotnet --list-sdks
  311. ```
  312. - 浏览网站:http://192.168.8.116:8080/
  313. - 确认`teche`数据库
  314. - 在'kaiguanapplication'中增加一条记录,名称为`照明`
  315. - 确认`techeusr`数据库
  316. - 关闭网站,把`Program`中的种子数据部分注释掉
  317. - 网站默认账号
  318. ```
  319. 管理员:13800000000 TecheFwd2018
  320. 设备工作人员:shebei 888888
  321. ```
  322. - 管理员分配菜单权限
  323. - 创建项目楼层区域电箱
  324. - 查看缓存数据库
  325. - 添加开关
  326. - 测试可视化
  327. # 安装TDengine
  328. - 邮箱准备
  329. ```
  330. https://exmail.qq.com/login
  331. darren@ddingsafe.com
  332. TecheDing2019
  333. ```
  334. - https://www.taosdata.com/cn/
  335. - 下载到服务器
  336. - sudo dpkg -i TDengine-server-1.6.6.1-Linux-x64.deb
  337. - 确认是否存在systemd: sudo which systemd
  338. - 启动:sudo systemctl start taosd
  339. - 查询:sudo systemctl status taosd
  340. - taos(版本号:1.6.6.1)
  341. - 退出:exit;
  342. - 明确Ip的方式:taos -h 127.0.0.1
  343. - 创建数据库:create database test;
  344. - 展示数据库:show databases;
  345. - 进入数据库:use test;
  346. - 创建表:create table t (ts timestamp, speed int);
  347. - 插入数据
  348. ```
  349. insert into t values ('2019-07-15 00:00:00', 10);
  350. insert into t values ('2019-07-15 01:00:00', 20);
  351. ```
  352. - 展示表数据:select * from t;
  353. - 确认在postman中是否可以连通
  354. ```
  355. http://192.168.8.116:6020/rest/sql
  356. show databases;
  357. ```
  358. # 固定IP
  359. - 确定网卡名称:ifconfig -a
  360. - /etc/netplan
  361. ```
  362. network:
  363. version: 2
  364. renderer: NetworkManager
  365. ethernets:
  366. ens33:
  367. dhcp4: no
  368. dhcp6: no
  369. addresses: [192.168.8.116]
  370. gateway4: 192.168.8.1
  371. nameservers:
  372. addresses: [114.114.114.114, 8.8.8.8]
  373. ```
  374. - sudo netplan apply
  375. - ifconfig -a
  376. # 项目有关TDEngine配置
  377. - appsettings.json
  378. ```
  379. "shixugo": "1",
  380. "TDegnine": {
  381. "DataSource": "http://127.0.0.1:6020/rest/sql",
  382. "Username": "root",
  383. "Password": "taosdata",
  384. "Database": "rlq_huaian_7_10",
  385. "PlanInterval": 5000
  386. },
  387. ```
  388. - 总部网站
  389. ```
  390. 13800000000
  391. DrrnFwd2018
  392. http://localhost:5000/SuperAdmin
  393. ```
  394. - 创建数据库,这样SuperTable控制器才不会报错
  395. ```
  396. taos
  397. create database rlq_huaian_7_10;
  398. use rlq_huaian_7_10;
  399. drop database rlq_huaian_7_10;
  400. create database rlq_huaian_7_10 KEEP 1095;
  401. ```
  402. - 运行网站
  403. - 创建超级表
  404. - 确认超级表:show stables;
  405. - 创建电量子表 187ED5314E0C
  406. ```
  407. dl_187ED5314E0C_0_h
  408. dl_187ED5314E0C_0_d
  409. dl_187ED5314E0C_0_m
  410. dl_187ED5314E0C_1_h
  411. dl_187ED5314E0C_1_d
  412. dl_187ED5314E0C_1_m
  413. ```
  414. - 把时序shixugo打开,重新开网站
  415. # 远程准备
  416. - 地址: 192.168.18.54
  417. - 内网地址:
  418. ```
  419. IP:192.168.10.36
  420. 路由:192.168.10.254
  421. DNS:114.114.114.114
  422. ```
  423. - 远程蓝屏
  424. ```
  425. mkdir Downloads
  426. sudo wget http://www.c-nergy.be/downloads/install-xrdp-3.0.zip
  427. sudo unzip install-xrdp-3.0.zip
  428. sudo chmod 777 Install-xrdp-3.0.sh
  429. sudo ./Install-xrdp-3.0.sh
  430. sudo shutdown -r now
  431. ```
  432. # 调通程序
  433. - 确定ip: ifconfig -a
  434. ```
  435. 局域网:
  436. 192.168.8.116
  437. 255.255.255.0
  438. 公网:
  439. 192.168.10.36
  440. 网卡名称:
  441. enp3s0
  442. ```
  443. - 查找局域网内的模块
  444. ```
  445. sudo arp-scan -I enp3s0 --localnet
  446. 发现没有模块
  447. ```
  448. - 安装dhcp
  449. ```
  450. 安装:sudo apt install isc-dhcp-server
  451. 配置文件:/etc/dhcp/dhcpd.conf
  452. 赋予权限:sudo chmod 666 chdpd.conf
  453. 配置:
  454. default-lease-time 600;
  455. max-lease-time 7200;
  456. INTERFACESv4="enp3s0";
  457. subnet 192.168.8.0 netmask 255.255.255.0 {
  458. range dynamic-bootp 192.168.8.10 192.168.8.254;
  459. option routers 192.168.8.1;
  460. option sunet-mask 255.255.255.0;
  461. option domain-name-servers 192.168.8.1 //不一定需要
  462. }
  463. sudo systemctl stop isc-dhcp-server
  464. sudo systemctl start isc-dhcp-server
  465. sudo systemctl status isc-dhcp-server
  466. ```
  467. - 查找局域网内的模块
  468. ```
  469. sudo arp-scan -I enp3s0 --localnet
  470. 发现没有模块
  471. ```
  472. - 局域网内有VLAN
  473. ```
  474. /etc/netplan
  475. 石教授配置
  476. ```
  477. - 确认服务器指向
  478. ```
  479. 192.168.8.1
  480. /etc/netplan/中的配置
  481. network:
  482. version: 2
  483. renderer: NetworkManager
  484. ethernets:
  485. ens33:
  486. dhcp4: false
  487. addresses: [192.168.8.1/24]
  488. 192.168.8.1:8080/ebx-bishop/data/carry
  489. ```
  490. - 更改模块地址
  491. ```
  492. sudo arp-scan -I enp3s0 --localnet
  493. 192.168.8.11
  494. 无法登陆远程桌面
  495. sudo apt-get install w3m
  496. w3m 192.168.8.11:82 无法浏览
  497. 14
  498. 15
  499. 20
  500. 23
  501. 28
  502. 30
  503. 31
  504. 32
  505. 33
  506. 34
  507. 35
  508. 36
  509. 37
  510. 38
  511. 39
  512. 40
  513. 41
  514. 42
  515. 43
  516. 总共19个模块
  517. ```
  518. - 删除数据库中原先的记录
  519. ```
  520. select * from KaiGuan
  521. select * from KaiGuanWarning
  522. select * from warningHistories
  523. select * from GongLvTongJi
  524. SET FOREIGN_KEY_CHECKS=0;
  525. truncate table GongLvTongJi;
  526. truncate table warningHistories;
  527. truncate table KaiGuanWarning;
  528. truncate table KaiGuan;
  529. SET FOREIGN_KEY_CHECKS=1;
  530. ```
  531. - 删除Redis数据库测试数据
  532. - 修改appsettings
  533. ```
  534. 192.168.8.1
  535. shixugo=0
  536. ubuntu无法打开目录
  537. ```
  538. - 启动网站:var/www/znzm,dotnet DD.Local.Web.dll
  539. - 打开网站:192.168.8.1:8080
  540. - 查看缓存数据,确认所有线路是否都在
  541. - 登录网站:13800000000 TecheFwd2018
  542. - 添加项目楼层区域电箱
  543. ```
  544. select * from DianXiang
  545. select * from QuYu
  546. select * from Project
  547. select * from LouCeng
  548. SET FOREIGN_KEY_CHECKS=0;
  549. truncate table DianXiang;
  550. truncate table QuYu;
  551. truncate table LouCeng;
  552. SET FOREIGN_KEY_CHECKS=1;
  553. 准备图片
  554. 研发楼
  555. 2层
  556. 2层强电间北墙
  557. 2层北箱
  558. 187ED531FBC4
  559. 2层强电间西墙
  560. 2层西箱
  561. 187ED53191AC
  562. 3层
  563. 3层强电间北墙
  564. 3层北箱
  565. 187ED53201DC
  566. 4层
  567. 4层强电间北墙
  568. 4层北箱
  569. 187ED531E260
  570. 5层
  571. 5层强电间北墙
  572. 5层北箱
  573. 187ED5325394
  574. 6层
  575. 6层强电间北墙
  576. 6层北箱
  577. 187ED5323694
  578. 6层强电间西墙
  579. 6层西箱
  580. 187ED531700C
  581. 7层
  582. 7层强电间北墙
  583. 7层北箱
  584. 187ED5318C48
  585. 8层
  586. 8层强电间北墙
  587. 8层北箱
  588. 187ED531E9F8
  589. 9层
  590. 9层强电间北墙
  591. 9层北箱
  592. 187ED531E5FC
  593. 10层
  594. 10层强电间东墙
  595. 10层东箱
  596. 187ED5314324
  597. 13层
  598. 13层强电间东墙
  599. 13层东箱
  600. 187ED531FF98
  601. 15层
  602. 15层强电间东墙
  603. 15层东箱
  604. 187ED531E9CC
  605. ```
  606. - 添加开关
  607. ```
  608. /KaiGuan/SelectMac
  609. 187ED531E9CC为什么没有显示,缓存中存在,获取实时数据的时候忽略了,因为是380的模块
  610. 把该部分代码逻辑取消
  611. ```
  612. - 把开关的可视化缓存先删除
  613. - 可视化界面,控制开关
  614. - 常见时序数据库电量子表,根据每个模块
  615. ```
  616. 187ED531FBC4
  617. 187ED53191AC
  618. 187ED53201DC
  619. 187ED531E260
  620. 187ED5325394
  621. 187ED5323694
  622. 187ED531700C
  623. 187ED5318C48
  624. 187ED531E9F8
  625. 187ED531E5FC
  626. 187ED5314324
  627. 187ED531FF98
  628. 187ED531E9CC
  629. describe dl_187ed531fbc4_0_h
  630. describe dl_187ed531fbc4_0_d
  631. describe dl_187ed531fbc4_0_m
  632. describe dl_187ed531fbc4_1_h
  633. describe dl_187ed531fbc4_1_d
  634. describe dl_187ed531fbc4_1_m
  635. ```
  636. - 关闭网站,把shixugo=1,开启网站
  637. # 登录闪退的问题
  638. ```
  639. systemctl stop gdm.service
  640. systemctl restart gdm.service
  641. sudo dpkg-reconfigure gdm3
  642. sudo reboot
  643. ```