mapped_pages | sub | escape | navigation_title | applies_to | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
\ |
Install with RPM package |
|
The RPM package for {{es}} can be downloaded from our website or from our RPM repository. It can be used to install {{es}} on any RPM-based system such as OpenSuSE, SLES, Centos, Red Hat, and Oracle Enterprise.
::::{note} RPM install is not supported on distributions with old versions of RPM, such as SLES 11 and CentOS 5. Please see Install {{es}} from archive on Linux or MacOS instead. ::::
:::{include} _snippets/trial.md :::
:::{include} _snippets/es-releases.md :::
:::{include} _snippets/java-version.md :::
:::{include} _snippets/prereqs.md :::
:::{include} _snippets/pgp-key.md :::
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
You have several options for installing the {{es}} RPM package:
Create a file called elasticsearch.repo
in the /etc/yum.repos.d/
directory for RedHat based distributions, or in the /etc/zypp/repos.d/
directory for OpenSuSE based distributions, containing:
[elasticsearch]
name={{es}} repository for 9.x packages
baseurl=https://artifacts.elastic.co/packages/9.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
And your repository is ready for use. You can now install {{es}} with one of the following commands:
sudo yum install --enablerepo=elasticsearch elasticsearch <1>
sudo dnf install --enablerepo=elasticsearch elasticsearch <2>
sudo zypper modifyrepo --enable elasticsearch && \
sudo zypper install elasticsearch; \
sudo zypper modifyrepo --disable elasticsearch <3>
- Use
yum
on CentOS and older Red Hat based distributions. - Use
dnf
on Fedora and other newer Red Hat distributions. - Use
zypper
on OpenSUSE based distributions.
-
Download and install the RPM for {{es}} {{stack-version}} with the following commands:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-x86_64.rpm wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{stack-version}}-x86_64.rpm.sha512 shasum -a 512 -c elasticsearch-{{stack-version}}-x86_64.rpm.sha512 <1> sudo rpm --install elasticsearch-{{stack-version}}-x86_64.rpm
- Compares the SHA of the downloaded RPM and the published checksum, which should output
elasticsearch-<version>-x86_64.rpm: OK
.
:::{include} _snippets/skip-set-kernel-params.md :::
- Compares the SHA of the downloaded RPM and the published checksum, which should output
-
Copy the terminal output from the install command to a local file. In particular, you’ll need the password for the built-in
elastic
superuser account. The output also contains the commands to enable {{es}} to run as a service.
:::{include} _snippets/node-connectivity.md :::
:::{include} _snippets/first-node.md :::
:::{include} _snippets/join-existing-cluster.md :::
:::{include} _snippets/enable-auto-indices.md :::
:::{include} _snippets/systemd.md :::
:::{include} _snippets/systemd-startup.md :::
:::{include} _snippets/systemd-journal.md :::
:::{include} _snippets/systemd-startup-timeout.md :::
:::{include} _snippets/auto-security-config-rpm-deb.md :::
:::{include} _snippets/reset-superuser-rpm-deb.md :::
:::{include} _snippets/pw-env-var.md :::
:::{include} _snippets/check-es-running.md :::
If you are deploying a multi-node cluster, then the elasticsearch-reconfigure-node
tool adds all existing nodes to each newly enrolled node's discovery.seed_hosts
setting. However, you need to go back to all of the nodes in the cluster and edit them so each node in the cluster can restart and rejoin the cluster as expected.
:::{note}
Because the initial node in the cluster is bootstrapped as a single-node cluster, it won't have discovery.seed_hosts
configured. This setting is mandatory for multi-node clusters and must be added manually to the first node.
:::
:::{include} _snippets/clean-up-multinode.md :::
:::{include} _snippets/etc-elasticsearch.md :::
:::{include} _snippets/connect-clients.md :::
:::{include} _snippets/ca-fingerprint.md :::
:::{include} _snippets/ca-cert.md :::
The RPM places config files, logs, and the data directory in the appropriate locations for an RPM-based system:
Type | Description | Default Location | Setting |
---|---|---|---|
home | {{es}} home directory or $ES_HOME |
/usr/share/elasticsearch |
|
bin | Binary scripts including elasticsearch to start a node and elasticsearch-plugin to install plugins |
/usr/share/elasticsearch/bin |
|
conf | Configuration files including elasticsearch.yml |
/etc/elasticsearch |
ES_PATH_CONF |
conf | Environment variables including heap size, file descriptors. | /etc/sysconfig/elasticsearch |
|
conf | Generated TLS keys and certificates for the transport and http layer. | /etc/elasticsearch/certs |
|
data | The location of the data files of each index / shard allocated on the node. | /var/lib/elasticsearch |
path.data |
jdk | The bundled Java Development Kit used to run {{es}}. Can be overridden by setting the ES_JAVA_HOME environment variable in /etc/sysconfig/elasticsearch . |
/usr/share/elasticsearch/jdk |
|
logs | Log files location. | /var/log/elasticsearch |
path.logs |
plugins | Plugin files location. Each plugin will be contained in a subdirectory. | /usr/share/elasticsearch/plugins |
|
repo | Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here. | Not configured | path.repo |
:::{include} _snippets/install-next-steps.md :::