一.安裝mysql
//登錄mysql
mysql -uroot -p -P 3306
//初始化數(shù)據(jù)庫
mysql -uroot -p -P 3306 < 監(jiān)控端部署/sql/n9e_hbs.sql
mysql -uroot -p -P 3306 < 監(jiān)控端部署/sql/n9e_mon.sql
mysql -uroot -p -P 3306 < 監(jiān)控端部署/sql/n9e_uic.sql
二.安裝redis
//安裝redis 配置文件默認(rèn)密碼為空 如果redis有密碼需要修改配置文件
三.安裝nginx
//安裝nginx,修改nginx.conf
//配置轉(zhuǎn)發(fā) 監(jiān)聽本機(jī)ip
server_name 172.17.74.39 fengjie124.qicp.vip 172.17.74.46;
index index.php index.html index.htm default.php default.htm default.html;
//反向代理靜態(tài)文件
root /監(jiān)控端部署/pub;
location /api/portal
{
proxy_pass http://127.0.0.1:5800;
}
location /api/index
{
proxy_pass http://172.17.74.46:5830;
}
location /api/transfer
{
proxy_pass http://172.17.74.46:5810;
}
location /api/collector
{
proxy_pass http://127.0.0.1:2058;
}
//重載配置文件
nginx -t
nginx -s reload
四.修改配置文件
//修改judge.yml
redis:
addrs:
- 127.0.0.1:6379 #端口 地址
db: 0
pass: "" #密碼
# timeout:
# conn: 500
# read: 3000
# write: 3000
#修改monapi.yml
#修改同上
//修改mysql.yml
#修改每個(gè)addr的登陸賬號(hào)密碼
uic:
addr: "root:aicvs2017@tcp(127.0.0.1:3306)/n9e_uic?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
max: 16
idle: 4
debug: false
mon:
addr: "root:aicvs2017@tcp(127.0.0.1:3306)/n9e_mon?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
max: 16
idle: 4
debug: false
hbs:
addr: "root:aicvs2017@tcp(127.0.0.1:3306)/n9e_hbs?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
max: 16
idle: 4
debug: false
#修改mail-sender.yml
redis:
addr: "127.0.0.1:6379"
pass: "" #密碼
idle: 5
db: 0
timeout:
conn: 500
read: 3000
write: 3000
smtp:
host: "smtp.163.com" //郵件主機(jī)
port: 25
user: "fengjie124work@163.com" //賬號(hào)
pass: "IJKHJKDXFKHANZQR" //密碼
insecureSkipVerify: true
五.修改服務(wù)啟動(dòng)文件信息
//修改n9e-collector.service
ExecStart=/監(jiān)控端部署/n9e-collector
WorkingDirectory=/監(jiān)控端部署
#每個(gè)文件同理
六.啟動(dòng)模塊
//使用腳本啟動(dòng)所有模塊
./control start all
#檢測模塊是否正常啟動(dòng) 一共6個(gè)模塊
./control status
//使用服務(wù)啟動(dòng)
//拷貝 etc/sevice下的所有.service文件到 /use/lib/systemd/system
//然后設(shè)置開機(jī)啟動(dòng)
//systemctl enable *.service & systemctl start *.service
//查看和監(jiān)控有關(guān)的服務(wù)啟動(dòng)列表
systemctl list-unit-files | grep -E "n9e|sender|mysql|redis|nginx"
重啟系統(tǒng)檢測服務(wù)是否正常啟動(dòng)
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。