This repository was archived by the owner on May 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
94 lines (71 loc) · 3.05 KB
/
setup.sh
File metadata and controls
94 lines (71 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# chmod +x setup.sh to activate script
# RUN THIS SCRIPT INSIDE PROJECT DIRECTORY
# exit script whenever something fails
set -e
# ====================================================================================
sudo mkdir -p /usr/local/share/keyrings && \
sudo curl --proto "=https" --tlsv1.2 -sSf \
-o /usr/local/share/keyrings/edgedb-keyring.gpg \
https://packages.edgedb.com/keys/edgedb-keyring.gpg
echo deb [signed-by=/usr/local/share/keyrings/edgedb-keyring.gpg] \
https://packages.edgedb.com/apt \
$(grep "VERSION_CODENAME=" /etc/os-release | cut -d= -f2) main \
| sudo tee /etc/apt/sources.list.d/edgedb.list
if [ $(lsb_release -cs) = "noble" ]; then
# replace `noble` with `jammy`
sed -i "s/noble/jammy/g" /etc/apt/sources.list.d/edgedb.list
# download `libicu70`
wget "http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb"
# install `libicu70`
apt install ./libicu70_70.1-2_amd64.deb -y
# remove `libicu70`
rm libicu70_70.1-2_amd64.deb
fi
apt update && apt install edgedb-5 -y
systemctl enable --now edgedb-server-5
echo ""
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ EdgeDB installed and service enabled +"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""
# ====================================================================================
case $(uname -sm) in
"Darwin x86_64") target="x86_64-apple-darwin" ;;
"Darwin arm64") target="aarch64-apple-darwin" ;;
"Linux aarch64") target="aarch64-unknown-linux-gnu" ;;
*) target="x86_64-unknown-linux-gnu" ;;
esac
deno_uri="https://github.com/denoland/deno/releases/latest/download/deno-${target}.zip"
deno_directory="/home/edgedb/bin"
deno_exe="$deno_directory/deno"
if [ ! -d "$deno_directory" ]; then
mkdir -p "$deno_directory"
fi
curl --fail --location --progress-bar --output "$deno_exe.zip" "$deno_uri"
if command -v unzip >/dev/null; then
unzip -d "$deno_directory" -o "$deno_exe.zip"
else
apt install unzip -y
unzip -d "$deno_directory" -o "$deno_exe.zip"
fi
chmod +x "$deno_exe"
rm "$deno_exe.zip"
echo ""
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ Deno was installed successfully to $deno_exe +"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""
# ====================================================================================
echo ""
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ NEXT STEPS +"
echo "++ add password to EdgeDB +"
echo "++ link instance +"
echo "++ activate service file for API +"
echo "++ etc +"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""
# via https://github.com/edgedb/edgedb/issues/7364#issuecomment-2120913558
# via https://deno.land/x/install@v0.1.9/install.sh
# via https://docs.edgedb.com/guides/deployment/bare_metal#set-a-password