<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## **安裝配置JDK8** Elastic 需要 Java 8 環境。如果你的機器還沒安裝 Java,必須先安裝Java環境。 1. 下載并解壓 ``` [root@node1 ~]# tar -zxvf jdk-8u112-linux-x64.tar.gz -C /opt ``` 2. 編輯環境變量 vi /etc/profile.d/custom.sh ``` [root@cyj ~]# vi /etc/profile.d/custom.sh [root@cyj ~]# cat /etc/profile.d/custom.sh #!/bin/bash #java path export JAVA_HOME=/opt/jdk1.8.0_112 export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib ``` 3. 生效 ``` [root@cyj ~]# source /etc/profile.d/custom.sh ``` 4. 查看JDK版本 ``` [root@cyj ~]# java -version java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode) ``` ## **創建用戶** 從5.0開始,ElasticSearch 安全級別提高了,不允許采用root帳號啟動,所以我們要添加一個用戶。 1. 創建elastic 用戶組 ``` [root@cyj ~]# groupadd elastic ``` 2. 創建用戶es ``` [root@cyj ~]# useradd es [root@cyj ~]# passwd es Changing password for user es. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. ``` 3. 將es用戶添加到elastic 組 ``` [root@cyj~]# usermod -G bigdata es ``` 4. 設置sudo權限 ``` [root@cyj~]# visudo ``` 找到root ALL=(ALL) ALL一行,添加es用戶,如下。 ``` ## Allow root to run any commands anywhere root ALL=(ALL) ALL es ALL=(ALL) ALL ``` 5. 切換用戶 ``` [root@cyj~]# su es [es@cyj root]$ cd [es@cyj~]$ ``` ## **ElasticSearch 6.x 軟件包下載** 1. ElasticSearch官網 https://www.elastic.co/cn/downloads ![](images/微信圖片_20181009120137.png) 2. 下載ElasticSearch https://www.elastic.co/downloads/elasticsearch ``` [es@cyj~]$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.tar.gz ``` 3. 解壓縮 ``` [es@cyj~]$ tar -zxvf elasticsearch-6.4.2.tar.gz ``` 4. 修改目錄權限 更改elasticsearch-6.4.2文件夾以及內部文件的所屬用戶為es, 用戶組組為bigdata,-R表示逐級(N層目錄) ``` [es@cyj~]$ sudo chown -R es:elastic /elasticsearch-6.4.2 [es@cyj~]$ ll /elasticsearch-6.4.2 total 220 drwxr-xr-x 2 es bigdata 4096 Jan 6 08:35 bin drwxr-xr-x 2 es bigdata 75 Dec 17 15:24 config drwxr-xr-x 2 es bigdata 4096 Dec 17 15:24 lib -rw-r--r-- 1 es bigdata 11358 Dec 17 15:22 LICENSE.txt drwxr-xr-x 15 es bigdata 272 Dec 17 15:24 modules -rw-r--r-- 1 es bigdata 191887 Dec 17 15:24 NOTICE.txt drwxr-xr-x 2 es bigdata 6 Dec 17 15:24 plugins -rw-r--r-- 1 es bigdata 9326 Dec 17 15:22 README.textile ``` ## **ElasticSearch 配置** 1. 修改elasticsearch.yml文件 ``` [es@cyj elasticsearch-6.4.2]$ vi config/elasticsearch.yml ``` 修改network.host和http.port(設置ip地址以及端口號) ``` # Set the bind address to a specific IP (IPv4 or IPv6): # network.host: xxx.xxx.xxx.xxx # # Set a custom port for HTTP: # http.port: 9200 ``` 2. 修改/etc/sysctl.conf 切換到root用戶 ``` [root@cyj elasticsearch-6.4.2]# vi /etc/sysctl.conf ``` 添加內容如下: ``` vm.max_map_count=262144 ``` 用命令sysctl -p 生效 ``` [root@cyj ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 vm.max_map_count = 262144 [root@cyj ~]# ``` 3. 修改文件/etc/security/limits.conf ``` [root@cyj logs]# vi /etc/security/limits.conf ``` 添加如下內容: ``` * hard nofile 65536 * soft nofile 65536 * soft nproc 2048 * hard nproc 4096 # End of file ``` 4. ElasticSearch啟動與停止 elasticsearch不能直接以root身份啟動,必須切換回es用戶啟動 ``` [es@cyj elasticsearch]$ ./bin/elasticsearch ``` 注:后臺啟動加 -d 5. 查詢進程 ``` [elsearch@cyj elasticsearch]$ lsof -i:9200 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 2429 elsearch 196u IPv4 22910313 0t0 TCP 172.16.0.14:wap-wsp (LISTEN) ``` 6. 驗證 ``` [elsearch@cyj elasticsearch]$ curl http://xxxx.xxxx.xxxx.xxx:9200 { "name" : "master", "cluster_name" : "jiqun", "cluster_uuid" : "7b6GqaWyRsS8938Z8F7Exg", "version" : { "number" : "6.4.0", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "595516e", "build_date" : "2018-08-17T23:18:47.308994Z", "build_snapshot" : false, "lucene_version" : "7.4.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看