中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

elk 安裝與所遇問題

發布時間:2020-07-31 03:07:35 來源:網絡 閱讀:7973 作者:wks97 欄目:系統運維

系統centos6.7

1,安裝jdk-1.8.0

    

yum install java-1.8.0-openjdk

2,下載elasticsearch-2.4.3.tar.gz并安裝

tar zxvf elasticsearch-2.4.3.tar.gz -C /opt
vi /opt/elasticsearch-2.4.3/conf/elasticsearch.yml

添加配置

network.host: 0.0.0.0#server綁定本地服務器內外網ip
http.cors.enabled: true
http.cors.allow-origin: "*"

3,啟動

報錯

penJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.

at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:94)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:160)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)

Refer to the log for complete error details.

[root@vultr elasticsearch]# su es bin/elasticsearch

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

[2016-12-29 08:56:59,510][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.plugins' (/opt/elasticsearch/plugins)

Likely root cause: java.nio.file.AccessDeniedException: /opt/elasticsearch/plugins

at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)

at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)

at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)

at java.nio.file.Files.createDirectory(Files.java:674)

at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)

at java.nio.file.Files.createDirectories(Files.java:767)

at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:337)

at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)

at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:246)

at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)

at org.elasticsearch.bootstrap.Security.configure(Security.java:118)

at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)

Refer to the log for complete error details.

原因:1,新版本不允許用root啟動,2,軟件目錄沒相應的權限

解決:

groupadd es
useradd -g es es
passwd es

重新啟動:

su es -c /opt/elasticsearch-2.4.3/bin/elasticsearch -Xmx2g -Xms2g -
Des.index.storage.type=memory –d > /dev/null 2>&1 &”

#因為我用的是虛擬機,內存比較小,所以啟動看實際情況 -Xmx2g 是最大內存 -Xms2g 是最小內存 -d 是后臺運行
#我的運行命令是
su es -c /opt/elasticsearch/bin/elasticsearch –d > /dev/null 2>&1 &

安裝插件:elasticsearch-head(是集群前段顯示頁面)

切換到bin目錄下 執行

./plugin install  mobz/elasticsearch-head

頁面展示:http://localhost/_plugin/head

測試:

curl http://localhost:9200 出現一個json 數據表明啟動成功,如下

{

    "status": 200,

    "name": "Omen",

    "version": {

        "number": "1.1.1",

        "build_hash": "f1585f096d3f3985e73456debdc1a0745f512bbc",

        "build_timestamp": "2014-04-16T14:27:12Z",

        "build_snapshot": false,

        "lucene_version": "4.7"

    },

    "tagline": "You Know, for Search"

}

安裝插件:elasticsearch-kopf

執行命令:

./plugin install lmenezes/elasticsearch-kopf

頁面展示:http://localhost/_plugin/bigdesk/


4,安裝kibana 

tar zxvf kibana-4.6.3-linux-x86_64.tar.gz -C /opt

修改配置

因為和elasticsearch 在同一臺服務器上,所以只需要修改elasticsearch的鏈接地址

elasticsearch_url: http://localhost:9200

啟動

bin/kibana -p 5601 > /dev/null 2>&1 &

意思是以5601端口啟動

然后以http://ip:5601訪問就可以了

向AI問一下細節
推薦閱讀:
  1. 初學ELK
  2. ELK-elasticsearch

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

郯城县| 新蔡县| 阳高县| 周至县| 吉木萨尔县| 岳普湖县| 孝感市| 渝北区| 滁州市| 巴里| 金堂县| 沙河市| 颍上县| 黔南| 财经| 婺源县| 阳山县| 阿合奇县| 庆元县| 哈密市| 广平县| 航空| 广丰县| 皋兰县| 古交市| 孝义市| 张家口市| 灯塔市| 大宁县| 周至县| 昆明市| 潜江市| 铜陵市| 页游| 宜州市| 梨树县| 呈贡县| 华安县| 南溪县| 清苑县| 缙云县|