搭建es运行环境
系统基于centos 7.4
1.monit运行
前提:内网环境不能用yum Centos7.4
1.解压安装
tar -xzvf monit-5.26.0.tar.gz -C /usr/local/
cd /usr/local/monit-5.26.0
./configure --without-zlib --without-pam --without-ssl --without-largefile
make
make install
cp monitrc /etc/monitrc
mkdir /etc/monit.d
2.配置文件vi /etc/monitrc
set daemon 60
#set log syslog
set logfile /var/log/monit.log
set httpd port 2812 and
use address 172.20.10.11
allow 0.0.0.0/0.0.0.0
allow admin:monit
#with ssl { # enable SSL/TLS and set path to server certificate
# pemfile: /etc/ssl/certs/monit.pem
#}
include /etc/monit.d/*
3.安装服务
cp /usr/local/monit-5.26.0/system/startup/monit.service /usr/lib/systemd/system/monit.service
monit.service 原文如下
-------------------------------------start----------
# This file is systemd template for monit service. To
# register monit with systemd, place the monit.service file
# to the /lib/systemd/system/ directory and then start it
# using systemctl (see bellow).
#
# Enable monit to start on boot:
# systemctl enable monit.service
#
# Start monit immediately:
# systemctl start monit.service
#
# Stop monit:
# systemctl stop monit.service
#
# Status:
# systemctl status monit.service
[Unit]
Description=Pro-active monitoring utility for unix systems
After=network.target
Documentation=man:monit(1) https://mmonit.com/wiki/Monit/HowTo
[Service]
Type=simple
KillMode=process
ExecStart=/usr/local/bin/monit -I -c ${prefix}/etc/monitrc
ExecStop=/usr/local/bin/monit -c ${prefix}/etc/monitrc quit
ExecReload=/usr/local/bin/monit -c ${prefix}/etc/monitrc reload
Restart=on-abnormal
StandardOutput=null
[Install]
WantedBy=multi-user.target
-------------------------------------end----------
systemctl enable monit
reboot
4.脚本运行
注意三点,1.全路径,
2.全路径,
3.全路径------这三点是耗时一天的成果---------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端