鼎鼎知识库
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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