Skip to content

Commit 72d9914

Browse files
jhr007clintongormley
authored andcommitted
Docs: Save debian repository to it's own sources.list file
Best to put repo definitions in a separate file from that of the core OS's sources.list. Closes #11953
1 parent 753376d commit 72d9914

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/reference/setup/repositories.asciidoc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Download and install the Public Signing Key:
2525
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
2626
--------------------------------------------------
2727

28-
Add the repository definition to your `/etc/apt/sources.list` file:
28+
Save the repository definition to `/etc/apt/sources.list.d/elasticsearch-{branch}.list`:
2929

3030
["source","sh",subs="attributes,callouts"]
3131
--------------------------------------------------
32-
echo "deb http://packages.elastic.co/elasticsearch/{branch}/debian stable main" | sudo tee -a /etc/apt/sources.list
32+
echo "deb http://packages.elastic.co/elasticsearch/{branch}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-{branch}.list
3333
--------------------------------------------------
3434

3535
[WARNING]
@@ -51,6 +51,17 @@ Run apt-get update and the repository is ready for use. You can install it with:
5151
sudo apt-get update && sudo apt-get install elasticsearch
5252
--------------------------------------------------
5353

54+
[WARNING]
55+
==================================================
56+
If two entries exist for the same Elasticsearch repository, you will see an error like this during `apt-get update`:
57+
58+
["literal",subs="attributes,callouts"]
59+
60+
Duplicate sources.list entry http://packages.elastic.co/elasticsearch/{branch}/debian/ ...`
61+
62+
Examine +/etc/apt/sources.list.d/elasticsearch-{branch}.list+ for the duplicate entry or locate the duplicate entry amongst the files in `/etc/apt/sources.list.d/` and the `/etc/apt/sources.list` file.
63+
==================================================
64+
5465
Configure Elasticsearch to automatically start during bootup. If your
5566
distribution is using SysV init, then you will need to run:
5667

0 commit comments

Comments
 (0)