Generate mongod conf for tarball installtion

0 votes

Hi There,

I have installed mongodb using tgz package on centos 7.5. While starting up the mongodb i have mentioned custom location for dbpath and logpath along with --fork option. Now i want to generate mongodb.conf file from mongodb console because i dont see mongodb.conf file in /etc/mongodb.conf or dbpath or where extracted tar package or in /usr/local/etc/ location. Could you suggest here how to generate mongodb.conf file auto from mongo console.

command used to start mongodb - mongod --dbpath --logpath --fork

May 23, 2020 in Database by Kailas
• 120 points

recategorized May 25, 2020 by Gitika 1,137 views

1 answer to this question.

0 votes

Hi,@kailas,

To run a mangod process as a daemon (i.e.fork), and write its output to a log file, use the --fork and --logpath options. You must create the log directory; however, mangod will create the log file if it does not exist.

The following command starts mongod as a daemon and records log output to /var/log/mongodb/mongod.log.

mongod --fork --logpath /var/log/mongodb/mongod.log

I hope this will be helpful

To know more about Mongodb, it's recommended to join Mongodb Certification today.

answered May 26, 2020 by Gitika
• 65,770 points

Related Questions In Database

0 votes
1 answer

How to generate the statement CREATE TABLE for an existing table in postgreSQL?

Generate table creation statement for an existing ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
6,622 views
0 votes
1 answer

Using Real Time flume Data for Analysis

By using MorphlineSolrSink we can extract, transform ...READ MORE

answered Jul 17, 2018 in Database by kurt_cobain
• 9,350 points
780 views
0 votes
1 answer

Which one is suitable for real time big database- Primary Key or Unique Index?

What is a unique index? A unique index ...READ MORE

answered Oct 12, 2018 in Database by Frankie
• 9,830 points
1,877 views
0 votes
1 answer

Which operator is used in the query for pattern matching?

LIKE operator is used for pattern matching, ...READ MORE

answered Oct 15, 2018 in Database by DataKing99
• 8,250 points
23,789 views
0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
10,193 views
0 votes
1 answer

Hadoop MapReduce vs MongoDB MapReduce

Hadoop vs MongoDB MR: 1) Hadoop's MR can ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
1,415 views
0 votes
1 answer

How can we send data from MongoDB to Hadoop?

The MongoDB Connector for Hadoop reads data ...READ MORE

answered Mar 27, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,107 views
0 votes
0 answers

How can I add a connection between Mongodb and Tableau

What I want? Parse the XML to JSON ...READ MORE

May 18, 2018 in Tableau by ghost
• 1,790 points
780 views
0 votes
2 answers

How do I integrate Kdb+ and hadoop?

 kdb+ could be installed on every Hadoop ...READ MORE

answered Aug 6, 2018 in Big Data Hadoop by Abhi
• 3,720 points
1,734 views
0 votes
1 answer

How to design data warehouse for support whole business?

Hi, @There, So here are a few steps ...READ MORE

answered Jun 1, 2020 in Database by Gitika
• 65,770 points
1,047 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP