Skip to content

Commit f832d42

Browse files
authored
Update the steps for adding the neo4j repo to the apt manager (#2740)
1 parent 0ef5bcd commit f832d42

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

modules/ROOT/pages/installation/linux/debian.adoc

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,33 +77,45 @@ sudo update-java-alternatives --jre --set <java17name>
7777
[[debian-installation]]
7878
== Installation
7979

80+
To install Neo4j using the Debian package manager `apt`, you need to add the Neo4j repository to your system's list of package sources, and then install the desired Neo4j package.
81+
The Debian package is available from https://debian.neo4j.com.
8082

8183
[[debian-add-repository]]
8284
=== Add the repository
8385

84-
The Debian package is available from https://debian.neo4j.com.
86+
Run the following commands as a sudo user to add the Neo4j repository to the package manager:
8587

86-
. To use the repository for generally available versions of Neo4j, run:
88+
. Create the keyrings directory for the Neo4j GPG key if it does not already exist:
8789
+
88-
[source, shell]
90+
[source,bash]
8991
----
90-
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
91-
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
92-
sudo apt-get update
92+
sudo mkdir -p /etc/apt/keyrings
93+
----
94+
95+
. Download and install the Neo4j GPG key:
96+
+
97+
[source,bash]
9398
----
99+
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg > /dev/null
100+
----
101+
. Ensure the key file is world-readable:
94102
+
95-
To avoid the risk of the `apt` package manager accidentally forcing a database upgrade, different major and minor releases of Neo4j are also available separately inside the repository.
96-
To install Neo4j this way, specify the major and minor version required, in place of `latest`.
103+
[source,bash]
104+
----
105+
sudo chmod a+r /etc/apt/keyrings/neotechnology.gpg
106+
----
107+
. Add the Neo4j APT repository:
97108
+
98-
The following method for production or business-critical installations is recommended:
109+
[source,bash]
110+
----
111+
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable 5.26' | sudo -a tee /etc/apt/sources.list.d/neo4j.list > /dev/null
112+
----
113+
. Update package lists:
99114
+
100-
[source, shell, subs="attributes"]
115+
[source,bash]
101116
----
102-
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
103-
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable {neo4j-version}' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
104117
sudo apt-get update
105118
----
106-
107119
. Once the repository has been added to `apt`, you can verify which Neo4j versions are available by running:
108120
+
109121
[source, shell]

0 commit comments

Comments
 (0)