• 6安装nginx

    6.1安装nginx

      安装 pcre,zlib,openssl,nginx

    6.2生成web访问用户密码

htpasswd –c –b /usr/local/nginx/conf/passwd/kibana.passwd user pass123

    6.3 配置代理转发

vim /usr/local/nginx/conf/nginx.conf
#在配置文件末尾追加如下配置
#kibana
server {
listen ;
root /usr/local/nginx/html;
auth_basic "Kibana Auth";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd; location / {
proxy_pass http://192.168.1.1:5601;
proxy_redirect off;
} error_page /.html;
location = /40x.html {
} error_page /50x.html;
location = /50x.html {
} }
#cerebro
server {
listen ;
root /usr/local/nginx/html;
auth_basic "Kibana Auth";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd; location / {
proxy_pass http://192.168.1.1:9109;
proxy_redirect off;
} error_page /.html;
location = /40x.html {
} error_page /50x.html;
location = /50x.html {
} }
#bigdesk
server {
listen
root /usr/local/nginx/html;
auth_basic "Kibana Auth";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd; location / {
proxy_pass http://192.168.1.1:9106;
proxy_redirect off;
} error_page /.html;
location = /40x.html {
} error_page /50x.html;
location = /50x.html {
} }
#head
server {
listen ;
root /usr/local/nginx/html;
auth_basic "Kibana Auth";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd; location / {
proxy_pass http://192.168.1.1:9107;
proxy_redirect off;
} error_page /.html;
location = /40x.html {
} error_page /50x.html;
location = /50x.html {
} }
#es-sql
server {
listen ;
root /usr/local/nginx/html;
auth_basic "Kibana Auth";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd; location / {
proxy_pass http://192.168.1.1:9108;
proxy_redirect off;
} error_page /.html;
location = /40x.html {
} error_page /50x.html;
location = /50x.html {
} }

    6.4配置首页

    由于每个插件的端口都不同,不方便访问。自己做了一个首页来访问插件。

    修改index.html

vim /usr/local/nginx/html/index.html
<!DOCTYPE html>
<html>
<head>
<title>Elastic-Plugins</title>
<style>
body {
width: 35em;
margin: auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome!</h1> <p>
<a href="http://10.16.29.202:8890">kibana</a>.<br/>
<p>
<a href="http://10.16.29.202:8889">cerebro</a>.<br/>
<p>
<a href="http://10.16.29.202:8888">es-sql</a>.<br/>
<p>
<a href="http://10.16.29.202:8887">head</a>.<br/>
<p>
<a href="http://10.16.29.202:8886">bigdesk</a>.<br/>
<p>
<a href="http://10.16.29.202:8885">HQ</a>.<br/>
</body>
</html>

    6.5启动nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 

    6.6访问nginx主页,使用插件。密码验证:用户user密码pass123

    6.7安装遇到问题:

      Nginx: error while loading shared libraries: libpcre.so.1解决

      解决办法:

        http://blog.csdn.net/ystyaoshengting/article/details/50504746

      问题分析:

        在redhat 64位机器上, nginx可能读取的pcre文件为/lib64/libpcre.so.1文件.

        所以需要在/lib64/下建立软连接:

ln -s /usr/local/lib/libpcre.so. /lib64/  
  • 7x-pack破解

    7.1创建LicenseVerifier.java文件

package org.elasticsearch.license;
import java.nio.*;
import java.util.*;
import java.security.*;
import org.elasticsearch.common.xcontent.*;
import org.apache.lucene.util.*;
import org.elasticsearch.common.io.*;
import java.io.*;
public class LicenseVerifier
{
public static boolean verifyLicense(final License license, final byte[] encryptedPublicKeyData) {
return true;
}
public static boolean verifyLicense(final License license) {
return true;
}
}

  7.2编译LicenseVerifier.class

javac -cp "/home/ilog/elasticsearch-6.1.3/lib/elasticsearch-6.1.3.jar:/home/ilog/elasticsearch-6.1.3/lib/lucene-core-7.1.0.jar:/home/ilog/elasticsearch-6.1.3/plugins/x-pack/x-pack-6.1.3.jar" LicenseVerifier.java

  7.3重新打包x-pack- 6.1.3.jar

  解压x-pack/x-pack-6.1.3.jar包,替换jar包中的LicenseVerifier.class文件,重新打包

#创建temp-dir临时目录,解压jar包到临时目录
mkdir temp-jar
cp /home/ilog/elasticsearch-6.1./plugins/x-pack/x-pack-6.1..jar temp-jar
cd temp-jar
jar -xvf x-pack-6.1..jar
rm -rf x-pack-6.1..jar
#拷贝自己创建的class文件到org/elasticsearch/license/目录
cp LicenseVerifier.class org/elasticsearch/license/
#重新打包
jar -cvf x-pack-6.1..jar ./*
#将jar包覆盖到原目录
cp x-pack-6.1.3.jar /home/ilog/elasticsearch-6.1.3/plugins/x-pack/x-pack-6.1.3.jar

  7.4重启elastic和kibana

bin/elasticsearch -d
bin/kibana &

  7.5创建license文件,并上传(白金版,license到2050年)

vim platimum.json
{"license":{"uid":"e77971c5-c37e-42c8-b622-c22a9f9ee51c","type":"platinum","issue_date_in_millis":,"expiry_date_in_millis":,"max_nodes":,"issued_to":"user123","issuer":"Web Form","signature":"abcdef","start_date_in_millis":}}

  7.6登录kibana上传license页面,上传license文件。

  license上传地址:http://192.168.1.1:5601/app/kibana#/management/elasticsearch/license_management/upload_license

  • 8生产环境没有互联网如何安装elastic插件

   遇到的问题:安装npm,grunt需要联网,x-pack安装需要联网。其他都可以离线安装。

   解决问题前提条件:有可以上网的测试机器。在测试环境上按以上步骤安装完所有插件

   解决办法:

    8.1在测试环境安装x-pack后,打包安装x-pack后的elastic目录,放到生产环境使用即可

    8.2在测试环境安装node后,打包整个node目录,拷贝到生产环境,配置环境变量,即可使用node和grunt来启动essql和head

最新文章

  1. yii使用createCommand()增删改查
  2. python中的yield
  3. iOS打开手机QQ与指定用户聊天界面
  4. C 产生随机码
  5. 浅谈Struts2(一)
  6. thinkphp URL规则、URL伪静态、URL路由、URL重写、URL生成(十五)
  7. Nginx + Apache 反向代理
  8. Weex系列一、构建Weex工程
  9. appium执行iOS测试脚本并发问题
  10. Spring Cloud学习笔记-008
  11. 关键字-this
  12. Linux命令之sftp - 安全文件传输命令行工具
  13. [PHP] 算法-根据前序和中序遍历结果重建二叉树的PHP实现
  14. diff 命令实用
  15. 再论FreeRTOS中的configTOTAL_HEAP_SIZE
  16. hiho1514 偶像的条件 lower_bound
  17. PhantomJS + Selenium webdriver 总结-元素定位
  18. async/await 实现协程
  19. iOS AudioSession详解 Category选择 听筒扬声器切换
  20. zoj 3649 lca与倍增dp

热门文章

  1. springboot的log4j配置与logback配置
  2. HandlerMethodArgumentResolver(二):Map参数类型和固定参数类型【享学Spring MVC】
  3. Python利用切片操作,实现一个trim()函数,去除字符串首尾的空格,注意不要调用str的strip()方法:
  4. UVA 10395 素数筛
  5. linux 7忘记密码找回
  6. ECMAScript---数据类型的分类
  7. Nginx入门(一):在centos上安装nginx
  8. 深度好文,springboot启动原理详细分析
  9. 表单模糊查询的三种简单方式(springboot-h2-mybatis)
  10. Git 忽略某些文件提交