This is a quick and dirty automated install process for MongoDB on RHEL on s390x (IBM Z & LinuxONE) servers. It's needed because mongodb-enterprise is not included in the OS base repository. Hope it helps!
- This is running directly on a Red Hat Enterprise Linux (RHEL) server (tested on RHEL 8.10 & 9.6). You can run it from a remote controller, or against multiple servers, you'd just need to make some changes to the
inventory.inifile. - You have passwordless sudo access.
- This is not a production server. This is an opinionated install, so if there's actual important workload on the server you're installing to, make sure this won't mess things up for you.
sudo -i
Will only install if you don't have it already
command -v git >/dev/null 2>&1 && echo "git already installed" || sudo dnf install -y git
git clone https://github.com/jacobemery/mongodb.git
cd mongodb
Will only install pre-reqs if you don't have them already
./setup.sh
To install MongoDB Enterprise with Ansible with defaults:
ansible-playbook install.yml
Optionally, specify the desired major.minor version (default version is 8.2), i.e.
ansible-playbook install.yml -e version=8.0
Optionally, to get more output, (helpful for debugging) add -v for verbosity, more Vs = more output, i.e.
ansible-playbook install.yml -vvv
To uninstall:
ansible-playbook uninstall.yml