Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds debian based kali linux mongo db support #769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/install_mongo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Install MongoDB for the appropriate OS and version.
# Supports Ubuntu 14, 16, 18 and RHEL/CentOS 6.9
# Supports Ubuntu 14, 16, 18, RHEL/CentOS 6.9 and kali linux 2020.2

set -e
set -x
Expand All @@ -14,6 +14,8 @@ if [ -f /etc/debian_version ]; then
./install_mongodb_ub16.sh
elif [ "$(lsb_release -r -s)" == "18.04" ]; then
./install_mongodb_ub18.sh
elif [ "$(lsb_release -r -s)" == "2020.2" ]; then
./install_mongodb_debian.sh
else
echo -e "ERROR: Unknown OS\nExiting!"
exit -1
Expand Down
32 changes: 32 additions & 0 deletions scripts/install_mongodb_debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Install MongoDB for Debian kali linux 2020.2.

set -e
set -x

sudo apt-get install gnupg

wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
apt-get update
apt-get install -y mongodb-org

sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mongod.conf

cat > /etc/systemd/system/mongodb.service <<EOF
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target
EOF

systemctl start mongodb
systemctl status mongodb
systemctl enable mongodb