cerebro is an open source (MIT license) elasticsearch web management tool Scala, Play Framework, AngularJS and Bootstrap build. It requires Java 1.8 or later to run.
1, install JAVA environment
tar -xzvf jdk-8u121-linux-x64.tar.gz -C /data
Configuration Environment
/ Etc / profile file to add
export JAVA_HOME=/data/jdk1.8.0_121 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
File Reload
source /etc/profile
2, install Cerebro
Download plugin
https://github.com/lmenezes/cerebro/releases/download/v0.8.3/cerebro-0.8.3.zip unzip cerebro-0.8.3.zip
Profile application.conf
= the hosts [ { Host = " http://10.10.18.10:9200 " #es Renyiyitai cluster name = " es_cluster_name " }, ]
Configuration management supervisor cerebro
Installation supervisor
pip install supervisor
echo_supervisord_conf > /data/supervisor/supervisord.conf
Modify the file: /data/supervisor/supervisord.conf
[include] files = /data/supervisor/conf.d/*.ini
Creating cerebro ini file /data/supervisor/conf.d/cerebro.ini
[program:cerebro] command=/data/cerebro/cerebro-0.8.3/bin/cerebro -Dhttp.port=1234 -Dhttp.address=127.0.0.1 directory=/data/cerebro/cerebro-0.8.3/ autostart=true autorestart=true numprocs=1 priority=1 ;startsecs=1 startretries=3 stopasgroup=true killasgroup=true stdout_logfile= / data / brain / brain 0.8 . 3 / logs / supervisord_cerebro_out.log stderr_logfile = / data / brain / brain 0.8 . 3 /logs/supervisord_cerebro_err.log
Start supervisord Service
/usr/bin/supervisord -c /data/supervisor/supervisord.conf
The installation is complete
3, using nginx reverse proxy to do Cerebro
Ready http basic authentication file
echo "admin:`openssl passwd 111111`" >> /etc/nginx/passwd.db
nginx configuration file
server { listen 35601; server_name 10.10.18.10; access_log /data/www/logs/nginx_log/access/cerebro_access.log main ; error_log /data/www/logs/nginx_log/error/cerebro_error.log ; location /{ auth_basic "Protect cerebro"; auth_basic_user_file /etc/nginx/passwd.db; proxy_pass http://127.0.0.1:1234; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 15; proxy_send_timeout 30; proxy_read_timeout 30; proxy_redirect off; proxy_buffering off; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
Start nginx server
Use a browser to access the service Cerebro