Last active
July 11, 2024 02:06
-
-
Save alexjsteffen/7dd91fc05d6f773490d11556ed1e8c34 to your computer and use it in GitHub Desktop.
Simple bash install script to install Keycloak 21 on Ubuntu (updated May, 2023, work in progress)
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
#/bin/bash | |
apt update | |
apt upgrade -y | |
apt install -y software-properties-common curl wget nano sudo openjdk-11-jdk gnupg2 build-essential git mercurial | |
cd /opt | |
wget https://github.com/keycloak/keycloak/releases/download/21.1.1/keycloak-21.1.1.tar.gz | |
tar -xvf keycloak-21.1.1.tar.gz | |
mv keycloak-21.1.1 keycloak | |
groupadd keycloak | |
useradd -r -g keycloak -d /opt/keycloak -s /sbin/nologin keycloak | |
chown -R keycloak: keycloak | |
chmod o+x /opt/keycloak/bin/ | |
cd /etc/ | |
mkdir /etc/keycloak | |
cp /opt/keycloak/docs/contrib/scripts/systemd/wildfly.conf /etc/keycloak/keycloak.conf | |
cd /opt/keycloak/bin/ | |
cd /etc/systemd/system/ | |
## NEEDS UPDATING wget https://raw.githubusercontent.com/ajhs-legal/helpful-resources/master/keycloak/keycloak.service | |
chmod 777 -R /opt/keycloak | |
systemctl daemon-reload | |
systemctl enable --now keycloak |
Update to KC 9.0.2
Update to Keycloak 13. Boy it's been a while.
Major Update. Have not verified working and need to rework .service. May look at over forks for inspiration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been tested and verified on an Ubuntu 18.04.1 LXC container on Proxmox. I was fed up from reinstalling it far too many times so I hope this is helpful @keycloak