https://www.keycloak.org/getting-started/getting-started-zip
- Download the latest released keycloak-12.0.4 as it on our Downloads folder
- Extracting Keycloak .tar file
bboy:~$ pwd
/home/bboy
bboy:~$ cd /opt/
bboy:/opt$ sudo tar -xzf /home/bboy/Downloads/keycloak-12.0.4.tar.gz
- Add some needed environmental variables namely;
- export JBOSS_HOME=/opt/keycloak-12.0.4
- export JAVA=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java
- Open new terminal window and follow the commands below;
bboy:~$ cd /usr/lib/jvm/
bboy:/usr/lib/jvm$ sudo nano /etc/bash.bashrc
- Add below entries at end of the file
export JBOSS_HOME=/opt/keycloak-12.0.4
export JAVA=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java
- Close and save by; Ctrl+X > Y > Enter
- Apply the changes
bboy:/usr/lib/jvm$ source /etc/bash.bashrc
- Run Keycloak
bboy:/usr/lib/jvm$ cd /opt/keycloak-12.0.4/
bboy:/opt/keycloak-12.0.4$ bin/standalone.sh
- Add user to Keycloak (uadmin:upassword1)
bboy:/opt/keycloak-12.0.4$ bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : uadmin
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
- The password should be different from the username
- The password should not be one of the following restricted values {root, admin, administrator}
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : upassword1
WFLYDM0102: Password should have at least 1 non-alphanumeric symbol.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : upassword1
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: admin
About to add user 'uadmin' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'uadmin' to file '/opt/keycloak-12.0.4/standalone/configuration/mgmt-users.properties'
Added user 'uadmin' to file '/opt/keycloak-12.0.4/domain/configuration/mgmt-users.properties'
Added user 'uadmin' with groups admin to file '/opt/keycloak-12.0.4/standalone/configuration/mgmt-groups.properties'
Added user 'uadmin' with groups admin to file '/opt/keycloak-12.0.4/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="dXBhc3N3b3JkMQ==" />
bboy:/opt/keycloak-12.0.4$
Installing as default user on /home/<YOUR_USER>/ESB
Add user, overwrite if existing
Running keycloak