(3) Install elastic6.1.3 and plug-in Kibana,x-pack,essql,head,bigdesk,cerebro,ik

Source: Internet
Author: User
Tags auth pack unpack kibana

    • 6 Installing Nginx

6.1 Installing Nginx

Installing Pcre,zlib,openssl,nginx

6.2 Generate Web Access user password

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

6.3 Configuring Proxy forwarding

vim/usr/local/nginx/conf/nginx.conf# Add the following configuration at the end of the configuration file #kibanaserver {Listen8890; 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_page404/404. html; Location= /40x.html {} error_page - 502 503 504/50x.html; Location= /50x.html {}} #cerebroserver {listen8889; 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_page404/404. html; Location= /40x.html {} error_page - 502 503 504/50x.html; Location= /50x.html {}} #bigdeskserver {listen8886Root/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_page404/404. html; Location= /40x.html {} error_page - 502 503 504/50x.html; Location= /50x.html {}}#HeadServer {Listen8887; 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_page404/404. html; Location= /40x.html {} error_page - 502 503 504/50x.html; Location= /50x.html {}} #es-SQL Server {Listen8888; 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_page404/404. html; Location= /40x.html {} error_page - 502 503 504/50x.html; Location= /50x.html {}}

6.4 Configuration Homepage

Because each plug-in has different ports, it is not easy to access. I made a homepage to access the plugin.

Modify Index.html

Vim/usr/local/nginx/html/index.html

<! DOCTYPE html>Head><title>Elastic-Plugins</title><style>body {width:35em; Margin:0Auto; Font-family:tahoma, Verdana, Arial, sans-serif; }</style></Head><body>"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>

6.5 Start Nginx

6.6 Visit Nginx homepage, use plugin. Password Authentication: User Password pass123

6.7 Installation encountered a problem:

Nginx:error while loading shared libraries:libpcre.so.1 solution

Workaround:

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

Problem Analysis:

On the Redhat 64-bit machine, nginx may read the Pcre file as a/lib64/libpcre.so.1 file.

Therefore, a soft connection needs to be established under/lib64/:

Ln -s/usr/local/lib/libpcre.so. 1 /lib64/  

    • 7x-pack hack

7.1 Creating a Licenseverifier.java file

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, finalbyte[] encryptedpublickeydata) {returntrue; public static Boolean Verifylicense (final License License) {returntrue; }    }

7.2 Compiling 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 Repackaging X-pack-6.1.3.jar

Unpack the X-pack/x-pack-6.1.3.jar package, replace the Licenseverifier.class file in the jar package, repackage

#创建temp-dir Temp directory, unpack jar package to temp directory
mkdirtemp-JarCP/home/ilog/elasticsearch-6.1.3/plugins/x-pack/x-pack-6.1.3. Jar temp-JARCD Temp-Jarjar-XVF x-pack-6.1.3. JarRM-RF x-pack-6.1.3. jar# copy the class file you created to org/elasticsearch/license/CatalogueCPLicenseverifier.class org/elasticsearch/license/#重新打包jar-CVF x-pack-6.1.3. 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 Restarting elastic and Kibana

Bin/elasticsearch-dbin/kibana &

7.5 Create the license file and upload it (Platinum version, license to 2050)

Vim platimum.json{"License":{"UID":"e77971c5-c37e-42c8-b622-c22a9f9ee51c","type":"Platinum","Issue_date_in_millis":1520899200000,"Expiry_date_in_millis":2524579200999,"Max_nodes": -,"issued_to":"user123","Issuer":"Web Form","Signature":"abcdef","Start_date_in_millis":1520899200000}}

7.6 Login Kibana Upload license page, upload license file.

License Upload address: http://192.168.1.1:5601/app/kibana#/management/elasticsearch/license_management/upload_license

    • 8 production environment No internet How to install the elastic plugin

Problems encountered: Installing Npm,grunt requires networking, X-pack installation requires networking. All others can be installed offline.

Problem-Solving Prerequisites: There are test machines that can access the Internet. Install all plugins on the test environment by following the steps above

Workaround:

8.1 After installing X-pack in the test environment, pack and install the X-pack elastic directory and put it into production environment.

8.2 After installing node in the test environment, package the entire node directory, copy to the production environment, configure environment variables, then use node and grunt to start Essql and head

(3) Install elastic6.1.3 and plug-in Kibana,x-pack,essql,head,bigdesk,cerebro,ik

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.