Deploying GreenRadius on Oracle Linux 7.x
Prerequisites
- A target machine running Oracle Linux 7.5 or greater
- The update package for GreenRADIUS v4.4.6.6
- The update package for the latest version of GreenRADIUS
- The zip file containing:
- The
docker-compose.yml
file for GreenRADIUS with appropriate patches for RHEL/OEL - The
docker-compose.override.yml
file - The
timezone_handle_for_docker_on_CentOS.sh
file
- The
Deployment Instructions
- Log in with a user that has sudo access
- Run
sudo yum update
- Run
sudo yum-config-manager --enable *addons
- Run
cd /etc/yum.repos.d/
- Run
sudo wget http://yum.oracle.com/public-yum-ol7.repo
- Run
sudo yum-config-manager --enable *addons
- Run
sudo yum update
- Run
sudo yum install docker-engine
- Run
sudo systemctl start docker
- Run
sudo systemctl enable docker
- Run
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- Run
sudo chmod +x /usr/local/bin/docker-compose
- Run
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- Run
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- Run
sudo yum install incron
- Run
sudo yum install unzip
- Run
sudo yum install net-tools
- Run
sudo useradd -d /home/gradmin -m -G wheel -s /bin/bash gradmin
- Run
sudo passwd gradmin
and set the password forgradmin
appropriately - Run
sudo chmod -R 750 /home/gradmin
- Run
sudo chown -R gradmin:gradmin /home/gradmin
- Run
sudo mkdir /home/gradmin/grs-docker-compose
- As root, edit the
/etc/selinux/config
file and disable SELinux - Run
sudo service firewalld stop
- Run
sudo systemctl disable firewalld
- Reboot and login as
gradmin
- Copy the 4.4.6.6 update package to /tmp/
- Copy the
docker-compose.yml
anddocker-compose.override.yml
files to /home/gradmin/grs-docker-compose, and thetimezone_handle_for_docker_on_CentOS.sh
file to /home/gradmin - Run
sudo unzip /tmp/GreenRADIUS_xxxx_Update.zip -d /tmp/
- Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/images.tgz -C /tmp/
- Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/others.tgz -C /tmp/
- Run
sudo mkdir -p /opt/grs/scripts
- Run
sudo cp /tmp/others/vm_incron_scripts/* /opt/grs/scripts/
- Run
cd /opt/grs/scripts && sudo chown root:root *.sh && sudo chmod 511 freeradius_restart.sh get_host_info.sh incron_script.sh openldap_cmd_template_3.sh openldap_restart.sh openldap_update_ca_certificates.sh rsyslog_restart.sh && cd -
- Run
sudo bash -c "echo 'gradmin ALL=(root) NOPASSWD:/opt/grs/scripts/get_host_info.sh , /opt/grs/scripts/incron_script.sh , /opt/grs/scripts/rsyslog_restart.sh , /opt/grs/scripts/freeradius_restart.sh , /opt/grs/scripts/openldap_restart.sh , /opt/grs/scripts/openldap_update_ca_certificates.sh , /opt/grs/scripts/openldap_cmd_template_3.sh' > /etc/sudoers.d/grs"
- Run
sudo mkdir -p /opt/grs/host-comm/request
- Run
sudo mkdir -p /opt/grs/host-comm/response
- Run
sudo chown -R gradmin:gradmin /opt/grs/host-comm
- Run
sudo bash -c "echo 'gradmin' > /etc/incron.allow"
- Run
sudo bash -c "echo '/opt/grs/host-comm/request IN_CLOSE_WRITE sudo /opt/grs/scripts/incron_script.sh \$#' > /var/spool/incron/gradmin"
- Run
sudo systemctl enable incrond
- Run
sudo service incrond restart
- Run
sudo docker load -i /tmp/images/greenradius_4466_init_image
- Run
sudo docker load -i /tmp/images/greenradius_4466_main_image
- Run
sudo docker load -i /tmp/images/greenradius_4466_openldap_image
- Run
sudo docker load -i /tmp/images/greenradius_4466_postgres_image
- Run
sudo docker load -i /tmp/images/greenradius_4466_rsyslog_image
- Run
sudo docker load -i /tmp/images/greenradius_4466_freeradius_image
- Run
sudo chmod -R 750 /home/gradmin
- Run
sudo chown -R gradmin:gradmin /home/gradmin
- Run
sudo timedatectl set-timezone UTC
- Run
sudo sh /home/gradmin/timezone_handle_for_docker_on_CentOS.sh
- Run
cd /home/gradmin/grs-docker-compose
. - Run
sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
- Verify that a GreenRADIUS 4.4.6.6 instance is accessible via the web. You should be able to visit
https://<ip address of instance>/admin
in your browser and via the login page for the web administration console. - Run
sudo docker-compose down
- Copy the latest update package for GreenRADIUS into the /tmp/ directory
- Run
sudo unzip /tmp/GreenRADIUS_xxxx_Update.zip -d /tmp/
(where "xxxx" is the version number of the GreenRADIUS update package) - Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/images.tgz -C /tmp/
- Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/others.tgz -C /tmp/
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_init_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_main_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_openldap_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_postgres_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_rsyslog_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_freeradius_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_grs_auth_app_image
- Edit
/home/gradmin/grs-docker-compose/docker-compose.yml
and replace every occurrence of "4466" with the version for your latest version of GreenRADIUS (e.g. "4499" for v4.4.9.9) - Run
cd /home/gradmin/grs-docker-compose
- Run
sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
- Confirm that the latest GreenRADIUS version is accessible via your browser at the same URL as before.
On future startups, you will need to run sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
from the grs-docker-compose
directory, as shown above, to launch the containers.
To apply subsequent updates
- Copy the update package to the
/tmp
directory. - Log in as
gradmin
. - Run
sudo yum update
- Run
sudo unzip /tmp/GreenRADIUS_xxxx_Update.zip -d /tmp/
. Note that in this command and below,xxxx
should be replaced with the current version number. - Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/images.tgz -C /tmp/
- Run
sudo tar -xvzf /tmp/GreenRADIUS_xxxx_Update/others.tgz -C /tmp/
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_init_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_main_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_openldap_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_postgres_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_rsyslog_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_freeradius_image
- Run
sudo docker load -i /tmp/images/greenradius_xxxx_grs_auth_app_image
- Run
cd /home/gradmin/grs-docker-compose
- Run
sudo docker-compose down
- Run
sudo cp /tmp/others/docker-compose.yml /home/gradmin/grs-docker-compose/
- Run
cd /home/gradmin/grs-docker-compose
- Run
sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
Updated 2023-09-06
© 2024 Green Rocket Security Inc. All rights reserved.
© 2024 Green Rocket Security Inc. All rights reserved.