Created
November 4, 2019 16:45
-
-
Save zonggen/a6a32de187eea2b9b60bded7db5bbc63 to your computer and use it in GitHub Desktop.
script to install mongodb and mongodb-compass
This file contains 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 | |
set -exo pipefail | |
# first install mongodb | |
# https://tecadmin.net/install-mongodb-on-fedora/ | |
cat > /etc/yum.repos.d/mongodb.repo <<EOF | |
[Mongodb] | |
name=MongoDB Repository | |
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/ | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc | |
EOF | |
sudo dnf install -y mongodb-org | |
sudo systemctl enable mongod.service | |
sudo systemctl start mongod.servicez | |
# then install mongodb-compass (GUI) | |
# supports fedora 29,30 | |
wget https://downloads.mongodb.com/compass/mongodb-compass-1.14.5.x86_64.rpm | |
dfn install ./mongodb-compass-1.14.5.x86_64.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment