Skip to content

Commit 16a7a04

Browse files
authored
Disable repo configuration for rpm based systems (#49893)
This commit changes the recommended repository file for rpm based systems to be disabled by default. This is a safer practice so upgrades of the system do no accidentally upgrade elasticsearch itself. closes #30660
1 parent 0f51bc2 commit 16a7a04

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

docs/reference/setup/install/rpm.asciidoc

+16-7
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ ifeval::["{release-state}"=="released"]
4848

4949
["source","sh",subs="attributes,callouts"]
5050
--------------------------------------------------
51-
[elasticsearch-{major-version}]
51+
[elasticsearch]
5252
name=Elasticsearch repository for {major-version} packages
5353
baseurl=https://artifacts.elastic.co/packages/{major-version}/yum
5454
gpgcheck=1
5555
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
56-
enabled=1
56+
enabled=0
5757
autorefresh=1
5858
type=rpm-md
5959
--------------------------------------------------
@@ -64,12 +64,12 @@ ifeval::["{release-state}"=="prerelease"]
6464

6565
["source","sh",subs="attributes,callouts"]
6666
--------------------------------------------------
67-
[elasticsearch-{major-version}]
67+
[elasticsearch]
6868
name=Elasticsearch repository for {major-version} packages
6969
baseurl=https://artifacts.elastic.co/packages/{major-version}-prerelease/yum
7070
gpgcheck=1
7171
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
72-
enabled=1
72+
enabled=0
7373
autorefresh=1
7474
type=rpm-md
7575
--------------------------------------------------
@@ -80,14 +80,23 @@ And your repository is ready for use. You can now install Elasticsearch with one
8080

8181
[source,sh]
8282
--------------------------------------------------
83-
sudo yum install elasticsearch <1>
84-
sudo dnf install elasticsearch <2>
85-
sudo zypper install elasticsearch <3>
83+
sudo yum install --enablerepo=elasticsearch elasticsearch <1>
84+
sudo dnf install --enablerepo=elasticsearch elasticsearch <2>
85+
sudo zypper modifyrepo --enable elasticsearch && \
86+
sudo zypper install elasticsearch; \
87+
sudo zypper modifyrepo --disable elasticsearch <3>
8688
--------------------------------------------------
8789
<1> Use `yum` on CentOS and older Red Hat based distributions.
8890
<2> Use `dnf` on Fedora and other newer Red Hat distributions.
8991
<3> Use `zypper` on OpenSUSE based distributions
9092

93+
[NOTE]
94+
==================================================
95+
96+
The configured repository is disabled by default. This eliminates the possibility of accidentally
97+
upgrading `elasticsearch` when upgrading the rest of the system. Each install or upgrade command
98+
must explicitly enable the repository as indicated in the sample commands above.
99+
91100
endif::[]
92101
93102
ifeval::["{release-state}"!="unreleased"]

0 commit comments

Comments
 (0)