Skip to content

Commit 173bc72

Browse files
tremor021MickLesk
andauthored
Neo4j: Add Java dependency (#3871)
* Add Java dependency * update * Update neo4j-install.sh * Update neo4j.sh * update --------- Co-authored-by: CanbiZ <[email protected]>
1 parent 54b794d commit 173bc72

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed

ct/neo4j.sh

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,30 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
header_info
24-
check_container_storage
25-
check_container_resources
26-
if [[ ! -d /etc/neo4j ]]; then
27-
msg_error "No ${APP} Installation Found!"
28-
exit
29-
fi
30-
msg_info "Updating ${APP}"
31-
$STD apt-get update
32-
$STD apt-get -y upgrade
33-
msg_ok "Updated Successfully"
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /etc/neo4j ]]; then
27+
msg_error "No ${APP} Installation Found!"
3428
exit
29+
fi
30+
if ! dpkg -l | grep -q temurin-21-jre; then
31+
msg_info "Installing Adoptium JDK"
32+
$STD apt-get install -y \
33+
gnupg2 \
34+
lsb-release
35+
mkdir -p /etc/apt/keyrings
36+
curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg
37+
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" >/etc/apt/sources.list.d/adoptium.list
38+
$STD apt-get update
39+
$STD apt-get install -y temurin-21-jre
40+
msg_ok "Adoptium JDK installed"
41+
fi
42+
msg_info "Updating ${APP}"
43+
$STD apt-get update
44+
$STD apt-get -y upgrade
45+
msg_ok "Updated Successfully"
46+
exit
3547
}
3648

3749
start
@@ -41,4 +53,4 @@ description
4153
msg_ok "Completed Successfully!\n"
4254
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
4355
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
44-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7474${CL}"
56+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7474${CL}"

install/neo4j-install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,22 @@ network_check
1515
update_os
1616

1717
msg_info "Installing Dependencies"
18-
$STD apt-get install -y gpg
18+
$STD apt-get install -y \
19+
gnupg2 \
20+
lsb-release
1921
msg_ok "Installed Dependencies"
2022

23+
msg_info "Setting up Adoptium Repository"
24+
mkdir -p /etc/apt/keyrings
25+
curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg
26+
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" >/etc/apt/sources.list.d/adoptium.list
27+
msg_ok "Set up Adoptium Repository"
28+
2129
msg_info "Installing Neo4j (patience)"
2230
curl -fsSL "https://debian.neo4j.com/neotechnology.gpg.key" | gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
2331
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' >/etc/apt/sources.list.d/neo4j.list
2432
$STD apt-get update
33+
$STD apt-get install -y temurin-21-jre
2534
$STD apt-get install -y neo4j
2635
sed -i '/server.default_listen_address/s/^#//' /etc/neo4j/neo4j.conf
2736
systemctl enable -q --now neo4j

0 commit comments

Comments
 (0)