Created
October 5, 2018 04:46
-
-
Save sarjarapu/7fc39c6c86b9dc26394f897cf196e3d4 to your computer and use it in GitHub Desktop.
A bash script to configure environment variables and set permissions for the folders
This file contains hidden or 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
sudo klist -k /var/lib/mongo/private/mon01.keytab | |
# Keytab name: FILE:/var/lib/mongo/private/mon01.keytab | |
# KVNO Principal | |
# ---- ------------------------------------------ | |
# 2 mongodb/[email protected] | |
# Set the keytab file location in environment variable | |
echo "KRB5_KTNAME=/var/lib/mongo/private/mon01.keytab" | sudo tee /etc/sysconfig/mongod | |
# Change the folder ownership to mongod | |
sudo chown -R mongod:mongod /var/lib/mongo/private | |
sudo systemctl start mongod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment