Open victor-0807 opened 6 years ago
Cerebro是一款Elasticsearch监控工具 项目Github主页
useradd -s /sbin/nologin cerebro
mkdir /opt/cerebro;\ tar xf /tmp/cerebro-0.8.1.tgz -C /opt/cerebro;\ ln -s /opt/cerebro/cerebro-0.8.1 /opt/cerebro/current;\ chown -R cerebro. /opt/cerebro
mkdir /home/cerebro/data;\ chown -R cerebro. /home/cerebro;\ tee /opt/cerebro/current/conf/application.conf << 'EOF' secret="ki:s:[[@=Ag?QI`W2jMwkY:eqvrJ]JqoJyi2axj3ZvOv^/KavOT4ViJSv?6YY4[N" basePath="/" pidfile.path="/opt/cerebro/current/cerebro.pid" data.path="/home/cerebro/data/cerebro.db" es={ gzip=true } auth={ type: basic settings: { username="admin" password="Admin_2018" } } hosts=[ { host="http://192.168.1.141:9200" name="es_log" } ] EOF
tee /etc/systemd/system/cerebro.service << 'EOF' [Unit] Description=Cerebro After=network.target [Service] Type=folking PIDFile=/opt/cerebro/current/cerebro.pid User=cerebro Group=cerebro LimitNOFILE=65535 ExecStart=/opt/cerebro/current/bin/cerebro -Dconfig.file=/opt/cerebro/current/conf/application.conf Restart=on-failure WorkingDirectory=/opt/cerebro/current [Install] WantedBy=multi-user.target EOF
systemctl daemon-reload;\ systemctl enable cerebro;\ systemctl start cerebro;\ systemctl status cerebro
firewall-cmd --add-port=9000/tcp --permanent ;\ firewall-cmd --reload
默认端口为9000,若需要修改端口
tee -a /etc/systemd/system/cerebro.service << 'EOF' http = { port = "9000" address = "192.168.1.144" } EOF
简介
Cerebro是一款Elasticsearch监控工具 项目Github主页
创建用户
解压安装文件
更改配置
创建服务
启动
开启防火墙
访问
默认端口为9000,若需要修改端口