nodejs 监控linux,linuxServerMonitoring
linux服務器監控平臺
技術:nodejs vue java mongodb springboot linux shell
linux服務器監控項目,前后端分離vue+springboot+mongodb
:
1、啟動前臺:
使用命令:
A 先安裝nodejs
并配置好環境變量
B 先控制臺cmd命令切換到項目目錄:
CD db-service-monitoring
C 第一次運行要安裝依賴庫:
npm install
D 后執行:
npm run dev
E 前臺配置后臺請求地址
在文件:db-service-monitoring\src\axios\axiosUrl.js
/**
配置全局使用的請求地址url
11.24.201.68
192.168.0.5
*/
export default {
rootDirectory: function () { // 請求接口的根路徑
return 'http://192.168.0.26:9999'
},
修改訪問地址和端口號:
打開文件db-service-monitoring\config\index.js
host: '192.168.0.26', // can be overwritten by process.env.HOST
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
F 啟動后顯示如下信息
DONE Compiled successfully in 16239ms 16:44:38
I Your application is running here: http://localhost:8083
2、后臺啟動類
A 配置文件中修改mongodb數據庫連接
B 運行單元測試 初始化數據
service-monitoring\src\test\java\com\example\demo\DemoApplicationTests.java
手動打開mongodb新建一個集合
Collection('userEntity')
并新增一條用戶:
{
"_id" : NumberLong(4),
"userName" : "qiweb",
"passWord" : "qiweb",
"_class" : "com.example.demo.UserEntity"
}
C 運行啟動類
com.example.DemoApplication
3、linux客戶端腳本
存放在linux-install-shell
4、運行效果圖
5、發布項目到linux服務器
前臺編譯
cmd到db-service-monitoring執行
npm run build
得到dist就是編譯后的前臺系統文件
后臺編譯
mvn clean package
獲得一個war包
技術討論QQ微信 908701702
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的nodejs 监控linux,linuxServerMonitoring的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: qt解析html的数据,windows下
- 下一篇: 小米笔记本Pro 2022用上手机同款技