<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # RPM安裝方式 Elasticsearch的RPM軟件包可以從[我們的網站下載](#install-rpm)或從[我們的APT倉庫](#rpm-repo)安裝。它可以用于任何基于RPM的系統上安裝Elasticsearch,如OpenSuse、SLES、Centos、Red Hat與企業級Oracle。 > 注意 > > RPM包不支持老的RPM平臺,譬如SLES 11與CentOS 5,這些平臺請采用[.zip或.tar.gz文件的安裝方式](Installing_Elasticsearch/Install_Elasticsearch_with_.zip_or_.tar.gz.md)。 > > 注意 > > Elasticsearch需要Java 8或更高版本。可以使用[Oracle官方發布](http://www.oracle.com/technetwork/java/javase/downloads/index.html)或開源版本的[OpenJDK](http://openjdk.java.net/)。 Elasticsearch的最新穩定版本可以在[Elasticsearch下載](https://www.elastic.co/downloads/elasticsearch)頁面獲取。其它版本可以在上[之前的下載頁面](https://www.elastic.co/downloads/past-releases)找到。 ## 導入Elasticsearch PGP Key Elasticsearch的所有包都采用如下指紋與簽名Key進行簽名(PGP key [D88E42B4](https://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4),可從[https://pgp.mit.edu](https://pgp.mit.edu/)): ``` 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4 ``` 下載并安裝該公用簽名密鑰: ``` rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch ``` ## 從RPM倉庫中安裝 在基于RedHat的平臺中請在`/etc/yum.repos.d/`文件夾下創建一個`elasticsearch.repo`文件,在基于OpenSuse的平臺中請在`/etc/zypp/repos.d/`文件夾下創建一個`elasticsearch.repo`文件,內容如下: ``` [elasticsearch-6.x] name=Elasticsearch repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md ``` 你的倉庫就準備好了,你可以采用下面的命令來安裝它: ``` sudo yum install elasticsearch #① sudo dnf install elasticsearch #② sudo zypper install elasticsearch #③ ``` ① 在CentOS與老的Red Hat發行版本中使用`yum`指令 ② 在Fedora與新的Red Hat發行版本中使用`dnf`指令 ③ 在OpenSuse的發行版本中使用`zypper`指令 ## 手動下載并安裝RPM軟件包 Elasticsearch的6.0.0版本RPM安裝包可以通過如下指令從網站下載與安裝: ``` wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.rpm wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.rpm.sha512 shasum -a 512 -c elasticsearch-6.0.0.rpm.sha512 ① sudo rpm --install elasticsearch-6.0.0.rpm ``` ① Compares the SHA of the downloaded RPM and the published checksum, which should output?`elasticsearch-{version}.rpm: OK`. > 注意 > > On systemd-based distributions, the installation scripts will attempt to set kernel parameters (e.g.,?`vm.max_map_count`); you can skip this by masking the systemd-sysctl.service unit. ## `SysV init` vs `systemd` Elasticsearch不是在安裝后自動啟動。如何啟動和停止Elasticsearch取決于你的系統是否使用的`SysV init`或`system`(較新發行版中使用)。你可以說這是一個用來運行以下命令: ``` ps -p 1 ``` ## 通過`SysV init`啟動Elasticsearch 使用`chkconfig`命令來配置Elasticsearch在系統啟動時自動啟動: ``` sudo chkconfig --add elasticsearch ``` Elasticsearch可以通過`service`命令來啟動與停止: ``` sudo -i service elasticsearch start sudo -i service elasticsearch stop ``` 任何原因的Elasticsearch啟動失敗,都會將原因打印到控制套。日志文件可以在`/var/log/elasticsearch/`中找到。 ## 通過`systemd`啟動Elasticsearch 要配置Elasticsearch在系統啟動時自動啟動,運行以下命令: ``` sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service ``` Elasticsearch可以通過service命令來啟動與停止: ``` sudo systemctl start elasticsearch.service sudo systemctl stop elasticsearch.service ``` 無論Elasticsearch是否成功沒有啟動, 這些命令不提供反饋。相反,該信息將被寫入位于`/var/log/elasticsearch/`的日志文件中。 默認情況下,Elasticsearch服務的信息不記錄在信息`systemd` 的`journal`日志中。若要啟用`journalctl`日志記錄,在`elasticsearch.service`文件的`ExecStart`命令行中必須刪除`--quiet`選項。 當`systemd`啟用了日志記錄,日志信息的使用可用`journalctl`命令: `tail`查看`journal`: ``` sudo journalctl -f ``` 要列出`journal`中elasticsearch服務的日志條目: ``` sudo journalctl --unit elasticsearch ``` 要列出指定時間之后的列出`journal`中elasticsearch服務的日志條目: ``` sudo journalctl --unit elasticsearch --since "2016-10-30 18:17:16" ``` 更多的`journalctl`操作手冊,請參考:<https://www.freedesktop.org/software/systemd/man/journalctl.html>。 ## 檢查Elasticsearch運行 您可以在已運行的Elasticsearch節點上,發送一個HTTP請求測試`localhost`的`9200`端口: ``` GET / ``` 返回的消息應該是這樣的: ``` { "name" : "Cp8oag6", "cluster_name" : "elasticsearch", "cluster_uuid" : "AT69_T_DTp-1qgIJlatQqA", "version" : { "number" : "6.0.0", "build_hash" : "f27399d", "build_date" : "2016-03-30T09:51:41.449Z", "build_snapshot" : false, "lucene_version" : "7.0.1", "minimum_wire_compatibility_version" : "1.2.3", "minimum_index_compatibility_version" : "1.2.3" }, "tagline" : "You Know, for Search" } ``` ## 配置Elasticsearch Elasticsearch defaults to using?`/etc/elasticsearch`?for runtime configuration. The ownership of this directory and all files in this directory are set to`root:elasticsearch`?on package installation and the directory has the?`setgid`?flag set so that any files and subdirectories created under?`/etc/elasticsearch`?are created with this ownership as well (e.g., if a keystore is created using the[keystore tool](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/secure-settings.html "Secure Settings")). It is expected that this be maintained so that the Elasticsearch process can read the files under this directory via the group permissions. Elasticsearch loads its configuration from the`/etc/elasticsearch/elasticsearch.yml`?file by default. The format of this config file is explained in?[*Configuring Elasticsearch*](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/settings.html "Configuring Elasticsearch"). RPM軟件包也有一個系統配置文件(`/etc/sysconfig/elasticsearch`),它允許你設置以下參數: * JAVA\_HOME自定義java路徑。 * MAX\_OPEN\_FILES最大的打開文件數,默認最大數量`65536`。 * MAX\_LOCKED\_MEMORY最大鎖定內存大小。你使用`bootstrap.memory_lock`的`elasticsearch.yml`選項將被設置為`unlimited`。 * MAX\_MAP\_COUNT進程的內存映射區域最大數量。如果你使用`mmapfs`的索引存儲類型,確保此項設置為高值。欲了解更多信息,請查看[Linux內核文件](https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt)查看相關的`max_map_count`。這是在啟動elasticsearch之前通過`sysctl`設置的,默認為262144。 * ES_PATH_CONF配置文件目錄(其中必須包括`elasticsearch.yml`和`log4j2.properties`文件),默認為`/etc/elasticsearch`。 * ES\_JAVA\_OPTS任何額外的JVM系統屬性,你可能要應用。 * RESTART\_ON\_UPGRADE配置在安裝包升級后重啟,默認為`false`。這意味著你將在安裝包后需要手動重新啟動您的elasticsearch實例。這樣做的原因是為了保證,在群集升級時不會連續的重新分配分片導致高網絡流量、并降低群集的響應時間。 > 注意 > > 使用systemd部署需要配置`systemd`的系統資源限制,而不是通過`/etc/sysconfig/elasticsearch`文件。更多信息請參見:[系統設置](../Important_System_Configuration/Configuring_system_settings.md#systemd)。 ## RPM目錄結構 RPM包中配置文件、日志和數據目錄在RPM-based系統中對應的位置: * home Elasticsearch主目錄或 $ES\_HOME/usr/share/elasticsearch * bin 二進制腳本,包括啟動節點的`elasticsearch`、安裝插件的`elasticsearch-plugin`/usr/share/elasticsearch/bin * conf 配置文件,包括`lasticsearch.yml`/etc/elasticsearch path.conf * conf 環境變量,包括heap大小、文件操作符/etc/sysconfig/elasticsearch * data 節點上分配的各索引/分片的數據文件的目錄,可以配置多個位置。/var/lib/elasticsearch path.data * logs 日志文件的位置。/var/log/elasticsearchpath.logs * plugins 插件的位置。每一個插件將被包含在一個子目錄。/usr/share/elasticsearch/plugins * repo 共享文件系統存儲庫位置。可以容納多個位置。文件系統存儲庫可以放在這里指定的任意目錄中的任何子目錄。未配置path.repo ## 下一步 現在,您搭建了一個測試環境Elasticsearch。開始更深入的研究或投入生產使用Elasticsearch之前,你需要做一些額外的配置: - 了解如何[配置Elasticsearch](../Configuring_Elasticsearch.md)。 - 配置[重要的Elasticsearch設置](../Important_Elasticsearch_configuration.md)。 - 配置[重要的系統設置](../Important_System_Configuration.md)。 > my note > > `/etc/sysconfig/elasticsearch` 文件的配置 > journalctl 查看日志 > 注意elasticsearch的目錄權限
                  <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>

                              哎呀哎呀视频在线观看