JITSI on ARM64 (Amazon Graviton2 / aarch64)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JITSI et al. uses Java but there's no escaping a CPU-arch specific library for *coding video. You get the x86 one by default, | |
so it needs to be recompiled. | |
Seen lots of instructions out there that look complicated and are longer, change a bunch of extra settings, etc. | |
For AWS ARM64, much of that cruft is not needed. This is pretty simple. | |
As of 7/2/21, these are the *default* instructions for installing JITSI (Ubuntu LTS 20.04): | |
---- | |
sudo -s # be root | |
sed -i -e 's/#DefaultLimitNOFILE.*$/DefaultLimitNOFILE=65000/' -e 's/#DefaultLimitNPROC.*$/DefaultLimitNPROC=65000/' -e 's/#DefaultTasksMax.*$/DefaultTasksMax=65000/' /etc/systemd/system.conf | |
systemctl daemon-reload | |
curl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg' | |
echo 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null | |
apt update | |
apt install -y jitsi-meet | |
- choose your fully-qualified hostname | |
- choose self-signed | |
/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh | |
- put in your email address | |
- make sure the fully-qualified hostname exists in DNS, Lets Encrypt plans to connect back to it to verify | |
--- | |
Now you have a running JITSI, but the native library it's using for *coding is x86, so we just need to recompile | |
for aarch64: | |
----- | |
sudo -s # be root | |
systemctl stop prosody jitsi-videobridge2 jicofo | |
apt install -y automake autoconf build-essential libtool git maven m4 | |
apt install -y openjdk-8-jdk-headless | |
update-alternatives --config java # pick openjdk-8 - the one just installed | |
cd /tmp | |
git clone https://github.com/sctplab/usrsctp | |
git clone https://github.com/jitsi/jitsi-sctp | |
mv ./usrsctp ./jitsi-sctp/usrsctp/ | |
cd ./jitsi-sctp | |
mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests | |
cp jniwrapper/native/target/libjnisctp-linux-aarch64.so ./jniwrapper/native/src/main/resources/lib/linux/libjnisctp.so | |
mvn package | |
rm /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-* | |
cp ./jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar | |
chown jvb:jitsi /usr/share/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar | |
systemctl start prosody jitsi-videobridge2 jicofo | |
---- | |
And that's it! Pretty simple. | |
If you were doing this for some other ARM64 architecture (not Amazon's), you'd just swap the `libjnisctp-linux-aarch64.so` | |
above with `libjnisctp-linux-arm64.so` or whatever the `arch` command would resolve to, and it should work. | |
For other ARM64 platforms that have system resource constraints (like Raspberry Pi), yeah you'll have to adjust parameters | |
so Java is not so greedy with RAM/etc. You can google those instructions pretty easily. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment