Elasticsearch 监控7

2022-02-10 20:27:59 浏览数 (1)

开启nginx服务

代码语言:javascript复制
[root@es_node nginx]# sbin/nginx  -t -c conf/nginx.conf
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@es_node nginx]# sbin/nginx  -c conf/nginx.conf
[root@es_node nginx]# ps faux | grep nginx 
root      4629  0.0  0.0 103308   832 pts/0    S    22:18   0:00          _ grep nginx
root      4623  0.0  0.0  46320  1172 ?        Ss   22:17   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
nginx     4624  0.0  0.0  46688  1836 ?        S    22:17   0:00  _ nginx: worker process        
[root@es_node nginx]# 

进行访问

https://ip:2443/_plugin/head/

此ip为边界服务器的ip

因为这是使用的自签名证书,所以访问过程中会提示此证书不可信,是否继续,我们要选择继续

选择继续后,提示输入密码,就是前面设定的基本认证密码

Chrome也是一样

认证通过后就可以看到管理界面


命令汇总

  • /data/ES/bin/plugin install mobz/elasticsearch-head
  • /data/ES/bin/plugin -l
  • ll /data/ES/plugins/
  • chown -R bhuser.bhuser /data/ES/plugins/head/
  • wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
  • md5sum tengine-2.1.2.tar.gz
  • tar -zxvf tengine-2.1.2.tar.gz
  • cd tengine-2.1.2
  • ./configure
  • make
  • make install
  • mkdir cert
  • cd cert/
  • openssl genrsa -out es.key 2048
  • openssl req -new -key es.key -out es.csr
  • openssl x509 -req -days 365 -in es.csr -signkey es.key -out es.crt
  • chmod 600 *
  • useradd nginx
  • grep nginx /etc/passwd
  • chown -R nginx.nginx /usr/local/nginx/
  • mkdir pass
  • cd pass/
  • perl -e 'print crypt(espass,espass)'
  • cat es.passwd
  • vim nginx.conf
  • grep -v "#" nginx.conf | grep -v "^$"
  • iptables -L -nv | grep 443
  • vim /etc/sysconfig/iptables
  • /etc/init.d/iptables reload
  • grep 443 /etc/sysconfig/iptables
  • /etc/init.d/iptables reload
  • iptables -L -nv -t nat | grep 443
  • sbin/nginx -t -c conf/nginx.conf
  • sbin/nginx -c conf/nginx.conf

原文地址

0 人点赞