-
-
Save truongtpa/22915764dbbcd4774276cdfe27df58c8 to your computer and use it in GitHub Desktop.
Simple bash install script to install Keycloak 13 on Ubuntu 21.04 as a service (updated June, 2021)
This file contains hidden or 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/13.0.1/keycloak-13.0.1.tar.gz | |
| tar -xvf keycloak-13.0.1.tar.gz | |
| mv keycloak-13.0.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/ | |
| wget https://raw.githubusercontent.com/ajhs-legal/helpful-resources/master/keycloak/launch.sh | |
| chown keycloak: /opt/keycloak/bin/launch.sh | |
| cd /etc/systemd/system/ | |
| wget https://raw.githubusercontent.com/ajhs-legal/helpful-resources/master/keycloak/keycloak.service | |
| chown keycloak: /opt/keycloak/bin/launch.sh | |
| chmod 777 -R /opt/keycloak | |
| systemctl daemon-reload | |
| systemctl enable --now keycloak |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment