![]() Now check that MongoDB has been started on port 27017 with the netstat command. Save and exit Reload System Service sudo service mongod restart In this file you will see a a line like thisĮxecStart=/usr/bin/mongod - config /etc/nfĮxecStart=/usr/bin/mongod - auth - config /etc/nf Start MongoDB and add it as a service to be started at boot time sudo systemctl daemon-reloadĬonfigure MongoDB username and password export LC_ALL=Cĭb.createUser()Įxit out of mongo client using Ctrl+C Enable mongodb authentication sudo vim /lib/systemd/system/rvice Lets first install MongoDB on Ubuntu 20.04. Only the metadata is stored and doesnt store the logs data. Installing MongoDB sudo apt-get install -y mongodb-org -allow-unauthenticated Graylog uses MongoDB to store the configuration data such as streams, alerts, users, settings, etc. Replace 3.4 with the version you want for mongo Update the repository sudo apt-get update Importing the Public Key sudo apt-key adv -keyserver hkp://:80 -recv 7F0CEB10Ĭreate source list file MongoDB echo "deb "$(lsb_release -sc)"/mongodb-org/3.4 multiverse" | sudo tee /etc/apt//mongodb-org-3.4.list ![]() As you might have noticed, the MongoDB server by default, starts listening on TCP port 27017 on all interfaces. I will try to set up MongoDb server on EC2. We downloaded a precompiled binary package and started the mongod server using the most basic command line parameter -dbpath so that it uses a customized directory, /data/db for storing databases.
0 Comments
Leave a Reply. |