-
Notifications
You must be signed in to change notification settings - Fork 312
/
setup-aarch64-node.sh
executable file
·73 lines (63 loc) · 1.48 KB
/
setup-aarch64-node.sh
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
#!/bin/bash
set -exuo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
env EXTRA_NFS_ARGS=",ro" "${DIR}/setup-common.sh"
apt-get -y update
apt-get -y install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get install -y \
binutils-multiarch \
bison \
bzip2 \
cgroup-tools \
curl \
dos2unix \
file \
flex \
g++ \
gawk \
gcc \
gnat \
jq \
libapparmor-dev \
libdatetime-perl \
libelf-dev \
libgmp3-dev \
libnl-route-3-dev \
libprotobuf-dev \
libwww-perl \
linux-libc-dev \
make \
nfs-common \
nginx \
patch \
pkg-config \
protobuf-compiler \
python-is-python3 \
python3-pip \
python3-venv \
python3.8 \
s3cmd \
subversion \
texinfo \
unzip \
wget \
xz-utils
pushd /tmp
git clone --recursive --branch ce https://github.com/compiler-explorer/nsjail.git
cd nsjail
make "-j$(nproc)"
cp nsjail /usr/local/bin/nsjail
popd
pushd /opt
# node.js
TARGET_NODE_VERSION=v20.15.0
echo "Installing node ${TARGET_NODE_VERSION}"
curl -sL "https://nodejs.org/dist/${TARGET_NODE_VERSION}/node-${TARGET_NODE_VERSION}-linux-arm64.tar.xz" | tar xJf - && mv node-${TARGET_NODE_VERSION}-linux-arm64 node
popd
cp nginx/nginx.conf /etc/nginx/nginx.conf
systemctl restart nginx
cp /infra/init/compiler-explorer.service /lib/systemd/system/compiler-explorer.service
systemctl daemon-reload
systemctl enable compiler-explorer
adduser --system --group ce