Ubuntu
tags:
- administration
- installation
- vm
- Ubuntu
This is a step-by-step guide for installation and uninstallation of Gluu Flex on Ubuntu Linux
#Prerequisites
- Ensure that the OS platform is one of the supported versions
- VM should meet VM system requirements
- Make sure that if
SELinuxis installed then it is put into permissive mode - If the server firewall is running, make sure you allow
https, which is needed for OpenID and FIDO.
sudo ufw allow https- Please obtain an SSA to trial Flex, after which you are issued a JWT that you can use during installation. SSA should be stored in a text file on an accessible path.
#Supported Versions
- Ubuntu 24.04
- Ubuntu 22.04
- Ubuntu 20.04
#Install the Package
Before you install, check the VM system requirements.
Download the GPG key zip file, unzip and import GPG key
wget https://github.com/GluuFederation/flex/files/11814579/automation-flex-public-gpg.zipunzip automation-flex-public-gpg.zip;sudo gpg --import automation-flex-public-gpg.asc;
#Ubuntu 24.04
Download the release package from the GitHub FLEX Releases
wget https://github.com/GluuFederation/flex/releases/download/v5.16.0/flex_5.16.0-stable.ubuntu24.04_amd64.deb -P /tmpVerify integrity of the downloaded package by verifying published sha256sum.
- Go to the Flex Project Releases page and copy the
sha256sumvalue for theflex_5.16.0-stable.ubuntu24.04_amd64.debfile: - Replace
paste-release-sha256sumin the command below with the actual checksum you copied from the release page, and run the following command:echo 'paste-release-sha256sum flex_5.16.0-stable.ubuntu24.04_amd64.deb ' | sed 's/^sha256://' > flex_5.16.0-stable.ubuntu24.04_amd64.deb .sha256sum && sha256sum -c flex_5.16.0-stable.ubuntu24.04_amd64.deb.sha256sum - Output similar to below should confirm the integrity of the downloaded package.
flex_5.16.0-stable.ubuntu24.04_amd64.deb: OK
Install the package
apt install -y /tmp/flex_5.16.0-stable.ubuntu24.04_amd64.deb#Ubuntu 22.04
Download the release package from the GitHub FLEX Releases
wget https://github.com/GluuFederation/flex/releases/download/v5.16.0/flex_5.16.0-stable.ubuntu22.04_amd64.deb -P /tmpVerify integrity of the downloaded package by verifying published sha256sum.
- Go to the Flex Project Releases page and copy the
sha256sumvalue for theflex_5.16.0-stable.ubuntu22.04_amd64.debfile: - Replace
paste-release-sha256sumin the command below with the actual checksum you copied from the release page, and run the following command:echo 'paste-release-sha256sum flex_5.16.0-stable.ubuntu22.04_amd64.deb ' | sed 's/^sha256://' > flex_5.16.0-stable.ubuntu22.04_amd64.deb .sha256sum && sha256sum -c flex_5.16.0-stable.ubuntu22.04_amd64.deb.sha256sum - Output similar to below should confirm the integrity of the downloaded package.
flex_5.16.0-stable.ubuntu22.04_amd64.deb: OK
Install the package
apt install -y /tmp/flex_5.16.0-stable.ubuntu22.04_amd64.deb#Ubuntu 20.04
Download the release package from the GitHub FLEX Releases
wget https://github.com/GluuFederation/flex/releases/download/v5.16.0/flex_5.16.0-stable.ubuntu20.04_amd64.deb -P /tmpVerify integrity of the downloaded package by verifying published sha256sum.
- Go to the Flex Project Releases page and copy the
sha256sumvalue for theflex_5.16.0-stable.ubuntu20.04_amd64.debfile: - Replace
paste-release-sha256sumin the command below with the actual checksum you copied from the release page, and run the following command:echo 'paste-release-sha256sum flex_5.16.0-stable.ubuntu20.04_amd64.deb ' | sed 's/^sha256://' > flex_5.16.0-stable.ubuntu20.04_amd64.deb .sha256sum && sha256sum -c flex_5.16.0-stable.ubuntu20.04_amd64.deb.sha256sum - Output similar to below should confirm the integrity of the downloaded package.
flex_5.16.0-stable.ubuntu20.04_amd64.deb: OK
Install the package
apt install -y /tmp/flex_5.16.0-stable.ubuntu22.04_amd64.deb#Run the setup script
Execute the setup script with command below:
sudo python3 /opt/jans/jans-setup/flex/flex-linux-setup/flex_setup.pyInstall Admin UI [Y/n]: y#Verify and Access the Installation
Verify that installation has been successful and all installed components are accessible using the steps below:
- Log in to Text User Interface (TUI)
/opt/jans/jans-cli/jans_cli_tui.pyTUI is a text-based configuration tool for Gluu Flex Server.
- Log into Admin-UI using URI below
https://FQDN/adminAfter successful installation of the Admin-UI component, we need to upload the required SSA input as a file path. This should be the SSA or file that was acquired as part of the prerequisite step.
When troubleshooting issues with Admin UI access, it's advisable to check the logs, refer to the FAQ, and review service dependencies for potential solutions.
- Access Casa using URI below
https://FQDN/jans-casa#Enabling HTTPS
To enable communication with Janssen Server over TLS (https) in a production environment, Janssen Server needs details about CA certificate.
#Uninstallation
Removing Flex is a two step process:
If you have not run the setup script, you can skip step 1 and just remove the package.
#Uninstall Gluu Flex
Use the command below to uninstall the Gluu Flex server
sudo python3 /opt/jans/jans-setup/flex/flex-linux-setup/flex_setup.py --remove-flexOutput:
sudo python3 /opt/jans/jans-setup/flex/flex-linux-setup/flex_setup.py --remove-flex
This process is irreversible.
Gluu Flex Components will be removed
Are you sure to uninstall Gluu Flex? [yes/N] yes
Profile was detected as jans.
Log Files:
/opt/jans/jans-setup/logs/flex-setup.log
/opt/jans/jans-setup/logs/flex-setup-error.log
Please wait while collecting properties...
Uninstalling Gluu Casa
- Deleting /etc/default/casa
- Deleting /etc/systemd/system/casa.service
- Removing casa directives from apache configuration
- Deleting /opt/jans/jetty/jans-auth/custom/libs/casa-config.jar
- Removing plugin /opt/jans/jetty/jans-auth/custom/libs/casa-config.jar from Jans Auth Configuration
- Deleting /opt/jans/python/libs/Casa.py
- Deleting /opt/jans/python/libs/casa-external_fido2.py
- Deleting /opt/jans/python/libs/casa-external_otp.py
- Deleting /opt/jans/python/libs/casa-external_super_gluu.py
- Deleting /opt/jans/python/libs/casa-external_twilio_sms.py
- Deleting casa client from db backend
- Deleting casa client scopes from db backend
- Deleting casa configuration from db backend
- Deleting script 3000-F75A from db backend
- Deleting /opt/jans/jetty/casa
Uninstalling Gluu Admin-UI
- Deleting Gluu Flex Admin UI Client 2001.e7989c7e-09b5-4e39-a7c9-a78017127cf0
- Removing Admin UI directives from apache configuration
- Deleting /opt/jans/jetty/jans-config-api/custom/libs/gluu-flex-admin-ui-plugin.jar
- Removing plugin /opt/jans/jetty/jans-config-api/custom/libs/gluu-flex-admin-ui-plugin.jar from Jans Config API Configuration
- Deleting /opt/jans/jetty/jans-config-api/custom/config/log4j2-adminui.xml
- Deleting /opt/jans/jetty/jans-config-api/custom/config/log4j2.xml
- Rewriting Jans CLI init file for plugins
- Deleting /var/www/html/admin
Disabling script A51E-76DA
Restarting Apache
Restarting Jans Auth
Restarting Janssen Config Api#Uninstall Janssen Packages
The command below removes and uninstall the jans package
python3 /opt/jans/jans-setup/install.py -uninstallOutput :
sudo python3 /opt/jans/jans-setup/install.py -uninstall
This process is irreversible.
You will lose all data related to Janssen Server.
Are you sure to uninstall Janssen Server? [yes/N] yes
Uninstalling Jannsen Server...
Removing /etc/default/jans-config-api
Stopping jans-config-api
Removing /etc/default/jans-auth
Stopping jans-auth
Removing /etc/default/jans-fido2
Stopping jans-fido2
Removing /etc/default/jans-scim
Stopping jans-scim
Removing /etc/default/jans-cache-refresh
Stopping jans-cache-refresh
Stopping OpenDj Server
Stopping Server...
[23/Jun/2023:09:10:27 +0000] category=BACKEND severity=NOTICE msgID=370 msg=The backend userRoot is now taken offline
[23/Jun/2023:09:10:28 +0000] category=BACKEND severity=NOTICE msgID=370 msg=The backend site is now taken offline
[23/Jun/2023:09:10:28 +0000] category=BACKEND severity=NOTICE msgID=370 msg=The backend metric is now taken offline
[23/Jun/2023:09:10:28 +0000] category=CORE severity=NOTICE msgID=203 msg=The Directory Server is now stopped
Executing rm -r -f /etc/certs
Executing rm -r -f /etc/jans
Executing rm -r -f /opt/jans
Executing rm -r -f /opt/amazon-corretto*
Executing rm -r -f /opt/jre
Executing rm -r -f /opt/node*
Executing rm -r -f /opt/jetty*
Executing rm -r -f /opt/jython*
Executing rm -r -f /opt/opendj
Executing rm -r -f /opt/dist
Removing /etc/apache2/sites-enabled/https_jans.conf
Removing /etc/apache2/sites-available/https_jans.conf#Remove Gluu Flex Packages:
List existing Gluu Flex packages with:
sudo apt list --installed | grep flexRemove packages:
sudo apt remove <package name>#Uninstalling Admin UI
To uninstall the Admin UI from your Flex installation, execute this command:
sudo python3 /opt/jans/jans-setup/flex/flex-linux-setup/flex_setup.py --remove-flex#Updating Admin UI
To update the Admin UI in an existing Flex installation, execute this command:
sudo python3 /opt/jans/jans-setup/flex/flex-linux-setup/flex_setup.py --update-admin-ui