Tumgik
#mongdb
deletedg1rl · 9 months
Text
30 December 2023
two main goals for next year :
work for an MNC
get promoted here
today i need to
finish mongdb cert
watch atleast 1 mongo db video
come up with a topic for presentation
call two ppl from work and talk to them
tomorrow:
give one mock presentation
learn mongodb/django
3 notes · View notes
computingpostcom · 2 years
Text
In this guide we will perform an installation of MongoDB 5.0 on CentOS 8/7 & RHEL 8/7. MongoDB is a general-purpose, object-oriented, simple, and dynamic NoSQL database server used in developing modern dynamic apps. This implies that data objects are stored as separate documents in a collection unlike in traditional relational databases where rows and columns are used. MongoDB is written in C++ for massive scalability and flexibility which offers easy querying and indexing for developers. MongoDB offers both Community and Enterprise editions. The Community Edition is free for download while the Enterprise Edition is part of the Mongo Enterprise Advanced subscription. The Enterprise version has more features such as LDAP, Kerberos support, on-disk encryption, and auditing. Also, it includes comprehensive support for MongoDB development. MongoDB is available for Windows, macOS, and Linux Operating Systems and is supported by both 32 and 64-bit architectures. MongoDB 5.0 is the latest release version released on July 13, 2021. It has the following new features: Live Resharding Native time-series features for efficiently storing sequences of measurements over a period of time Multi cloud-security tools The Versioned API future-proofs your applications. Serverless database on MongoDB Atlas Seamless data redistribution Install MongoDB 5.0 on CentOS 8/7 & RHEL 8/7 Linux systems In this guide, we will walk through the installation of MongoDB 5.0 on CentOS 8/7 & RHEL 8/7 using the below steps. Step 1: Configure MongoDB YUM repository on CentOS 8/7 & RHEL 8/7 We need to create a /etc/yum.repos.d/mongodb-org-5.0.repo file to enable us install MongoDB 5.0 using the yum command. sudo tee /etc/yum.repos.d/mongodb-org-5.0.repo While in the shell, there are a number of activities you can do such as: 1. Create a User and Add Role in MongoDB Here we will create a user and give them admin roles. We will create and use the db “admin“ use admin db.createUser( user: "mongouser", pwd: passwordPrompt(), // or cleartext password roles: [ role: "userAdminAnyDatabase", db: "admin" , "readWriteAnyDatabase" ] ) Set the password for the user. Now exit the shell using. > exit bye Then login to the created user now. mongo -u mongouser -p --authenticationDatabase admin Enter the set password above and proceed. 2. List databases in MongDB To list existing databases use the command: > show dbs admin 0.000GB config 0.000GB local 0.000GB 3. Create a database in MongoDB. A new database in MongoDB is created by simply switching to a non-existing database and specify the name of the database. Let’s create a database named mongotestdb. use admin Sample Output: > use admin switched to db admin > 4. Create a collection in MongoDB With the database created, we can now add data to it. Below, we are creating a table for the user details. db.userdetails.insertOne( F_Name: "fist name", L_NAME: "last name", ID_NO: "12345", AGE: "49", TEL: "+254654671" ) Show the created table/collection show collections Sample Output: > show collections system.users system.version userdetails > 5. Create a User with read and write privileges. To create a user with read and write privileges in MongoDB use the syntax in the below commands: use testdatabase db.createUser( user: 'testuser', pwd: 'P@ssWord', roles: [ role: 'readWrite', db: 'testdatabase' ] ); Change MongoDB default Path on CentOS 8/7 & RHEL 8/7. MongoDB stores its data in the default path in /var/lib/mongo. You can set MongoDB to store data in a custom path as shown below. First, stop the service: sudo systemctl stop mongod.service Then create a new custom path to use to store MongoDB data. sudo mkdir -p /data/mongo Set the owner of the directory to mongod as below. sudo chown -R mongod:mongod /data/mongo Then modify /etc/mongod.conf to accommodate the new directories.
sudo vi /etc/mongod.conf Edit the paths in the file as below. path: /data/log/mongodb/mongod.log #where to write logging data. dbPath: /data/mongo #Where and how to store data. pidFilePath: /data/mongodb/mongod.pid # location of pidfile Configure SELinux and its enforcing mode since the path has been changed. Without configuring SELinux, it will not allow MongoDB to access /sys/fs/cgroup. First, install checkpolicy. sudo yum install checkpolicy ####OR### sudo yum install policycoreutils-python Create a new check policy with the information as below. cat > mongodb_cgroup_memory.te
0 notes
insightfultechie · 4 years
Video
youtube
SQL vs NoSQL - Correct Clear and Concise Explanation along with Types of NoSQL Databases
Welcome to my video on SQL Vs. NoSQL databases. In this video, I'm trying to provide a correct, clear, and concise information about both SQL and NoSQL databases and how they are different from each other. I've also cleared some of the misconception people have about SQL and NoSQL databases. Apart from this, I've also talked about Different types of NoSQL databases and how each one of them is different from  the existing one. Hope this video will help. #SQL #NoSQL #databases #software #redis #mongodb #cassandar #neo4j #dynamoDB
5 notes · View notes
cloud2help-blog · 5 years
Link
Tumblr media
0 notes
Link
When you are implementing several technologies, deciding on the right technological stack for your business is not an easy task. By enhancing your technological infrastructure, it always puts you in minor setbacks. However, you are required to do quite often, and you cannot escape that. There are various database architectures and software solutions available, and you are not aware on every one of them, so you can’t figure out which solution to go for and why.
So, in this article, we’ll brief you about the two technology stacks to choose from for your ongoing business. But before you start comparing the differences of each technology stack, you need to understand the attribution and feasibility of stack which is very crucial in development as well as product solutions.
Here are a few aspects you need to take care before choosing the right stack for your project :
1 – Know your project requirement
2 – Shift to Agile model
3 – Go beyond your project requirements for better user experience
4 – Experience and knowledge of development team
5 – Flexibility and Scalability of the team
6 – The cost of development
Let us try to understand the differences which will make you easier to decide the correct technology stack for your project.
Introducing LAMP Stack development
LAMP stands for Linux, Apache, MySQL, and PHP, Perl or Python. It is one of the earliest stacks in web development and well suited for dynamic websites and web applications. It is still implemented as it offers great substitute to commercial Software packages.
As LAMP stack is opensource it allows developers to avoid vendor lock-in and develop for the web without having to spend much towards their development. For many years, it has been a compelling solution to develop enterprise level web apps with advanced customisation and flexibility. LAMP interacts with end users and source can be altered to suit the specific needs of the developer.
Benefits of LAMP Stack Development :
1 – Easy to Deploy :
The deployment factor of web application is tough especially when the programming language cannot easily be integrated with database and server. However, in LAMP no such issues occurs as it implements PHP which makes it feasible to expand LAMP web apps.
2 – Cost Factor :
As every level in LAMP stack is open-source, a project can be completed with minimum development and hardware costs.Moreover, there are other opensource projects available in LAMP stack such as Joomla, Drupal, OS Commerce, so you can choose a suitable option and deploy a project based on your requirements. This brings the project cost further low.
3 – Platform independent :
LAMP code works on wide range of operating systems and therefore it is platform independent. LAMP works on Windows, Linux, Android, and iOS easily.
Introducing MEAN Stack development :
MEAN Stack is a collection of Javascript-based software stack applied for building dynamic websites and web applications. MEAN is an acronym where M is MongoDB, E for Express.js, A for Angular JS, and N for Node.js. It is a free and open source stack designed to provide developers with a fast and organized technique of creating rapid prototypes of MEAN based web technologies.
One of the major advantages is the same Javascript language that runs on every tier of applications.
Benefits of MEAN Stack development :
1 – High Flexibility :
MEAN stack enables efficient development of isomorphic code as it implements Javascript all through. For instance, if you develop a code in Node.js and later if you plan to move your code to AngularJS you can easily do it without altering anything within the code.
MongDB itself enhances the flexibility of MEAN stack.It is a rigid database layer with automatic sharing and full cluster suport functionalities.Hence, you can host your project on cloud.
2 – Advantage of JSON :
MEAN stack development can be beneficial for with JSON. When you choose Angular JS or MongoDB it allows seamless data distribution between the layers. The data can be imported with the help of codes from MySQL server and process it.MEAN stack uses similar formats each time so when reformatting, it saves time. It also supports external APIs, so that you can choose to work with them when needed.
3 – Rapid MVP development :
A lot of frameworks, libraries, & reusable modules are available within the stack which increases the speed of development. With ready-made solutions, one just not only saves time but also makes the development less laborious.MEAN stack also offers a robust foundation to build scalable software products.
Comparison of LAMP Stack and MEAN Stack
Performance :
The database of stack is most responsible for performance and speed.With MySQL database, the app frequently suffers from high transaction loads bringing down the loading speed and overall performance.
In contrast to MEAN stack MongoDB is incredibly fast by trading off consistency it enhances the performance.MEAN stack is an ideal choice when a project can afford data loss once for achieving speed and flexibility.
Databases :
MySQL, the database layer of LAMP stack is a conventional database system which lacks optimization for fast-paced app development with quick response rate and flexibility.
MEAN stack allows you to work on a single non-relational database – MongoDB. It does not store data in tables rather it features a document-based query model. Nowadays developers prefer MongoDB in comparison to relational databases to accelerate and secure data easily.
Front-end and Back-end Development :
With LAMP stack you need to hire javascript developers for building Frontend apps while for backend you need PHP or Perl developers. In addition to this LAMP stack comes with various layers of navigation to access different configuration files and to use different syntax while programming.This makes the development complex and slower.
In case of MEAN stack development, you just need a Javascript developer for programming both frontend and backend as its all Javascript across the stack.
Scalability :
LAMP stack involves MySQL database with lot of requests and high concurrency rate the performance of MySQL slows down. With lower input and output ratio it performs better but when the ratio is scaled up the performance becomes sluggish.
In the other hand, MEAN stack has superb advantages with respect to scaling of performance with number of inputs growing up.As the rate of concurrency increases, the stack is able to scale up the database, frontend and backend.Apart from this, MongoDB provides support to auto-failover and auto-sharding to distribute the data uniformly with automatic rearranging. This aids in scaling up the performance as the number of requests rises.
EndNote :
Your game changing ideas need top-notch execution. It’s essential to indulge yourself with partners who will deliver a great product according to your requirements that results in significant ROI. Many enterprises realised that LAMP stack is not flexible enough to serve their purposes, so they are gradually moving towards MEAN stack and its high time you should too.
Deciding the right technology stack between LAMP and MEAN stack development is crucial to achieve your desired results.At the end, software built on right technology results in better performance, easier integration, faster development and increased satisfaction of your clients.
Well, you’re just one step away. Fortunesoft IT Innovations specializes in providing MEAN Stack development services. Contact us to discuss your project today!
0 notes
un-enfant-immature · 4 years
Text
HashiCorp to offer managed versions of its developer tools starting with Consul
HashiCorp is well known in the developer community for offering a slew of open source tools to help build and manage modern applications. Today the company announced a new cloud platform and plans to eventually offer managed versions of those tools, starting with Consul a tool for connecting and securing services across platforms.
HashiCorp CEO Dave McJannet says that the pandemic has accelerated demand for cloud infrastructure, and he sees a growing role for his company in helping to build cloud native applications. The company offers open source and commercial versions of several popular tools including Terraform, Consul, Vault and Packer among others. These can run on premises or in the cloud, but McJannet says customers have been hankering for SaaS versions of these tools.
“Our customers have told us that it’s a huge challenge running a central shared service like Consul. It requires them to keep it up and running, and they have asked for something they can consume from us where we manage it for them,” McJannet told TechCrunch.
The company has been offering a managed version of Terraform for some time, but it has been quietly working on a cloud platform that could allow it to plug in each of the company’s products over time and offer managed services of all the products.
“What we are announcing today is what we call the HashiCorp Cloud Platform, and you can think of it as just a common chassis to allow us to run our products on any cloud. The first of those products that we’re making available is Consul on Amazon,” he said.
By offering the company’s products as a set of cloud services, it will lower the barrier to entry for customers who want to use their tooling, but don’t have the resources to run and manage on their own. That could potentially increase the company revenue over time. As McJannet pointed out it’s a lot like what MongDB did with its managed Atlas database service, but for a wider set of products.
Last Fall, HashiCorp announced a $175 million investment on an impressive $5 billion valuation. It has 1000 employees and is continuing to hire as demand for its product continues through the pandemic. McJannet was not discussing specific customer numbers, but said the customer count has doubled over the last year. As it builds out the new cloud services, and introduces more customers to its products, there’s a good chance that number will keep growing.
HashiCorp soars above $5B valuation in new $175M venture round
0 notes
prevajconsultants · 7 years
Text
RT @anquantarbuile: The M121 @MongoDB aggregation course was a great help during this project, especially the module on $graphlookup. Highly recommended to anyone using MongDB. #dataviz #datascience #vgdatasci https://t.co/HZViP0h7Y1
The M121 @MongoDB aggregation course was a great help during this project, especially the module on $graphlookup. Highly recommended to anyone using MongDB. #dataviz #datascience #vgdatasci https://t.co/HZViP0h7Y1
— James Nagle (@anquantarbuile) December 4, 2017
MongoDB
0 notes
lhk3337-blog · 5 years
Text
Read
Front end : react ,view
backend : Node.js python
유튜브 클론
에어비엔비 클론
멤버십 리액트 js
Log In / Sign Up : 회원가입 및 기본 로그인 및 소셜 로그인
express.js를 이용해서 node.js
LIst : 전체 책 리스트를 작은 썸네일 이미지와 함께 보여줌
Search : 책 이름 저자 이름 키워드등으로 검색가능
Detail Page : 책 세부 소개 페이지 책 이미지 이름 저자명 요약 및 평점
Add New : 책 이미지, 이름, 저자명, 요약 등을 유저가 새롭게 추가 가능
Rate or Revie : 유저들이 책에 대한 5점 평점 혹은 후기를 남길 수 있음
Want to Read : 유저들이 읽고 싶은 책을 따로 골라서 별도 리스트를 생성하여 보관할 수 있음
Profile Page : 개별 프로필 페이지, 업ㄹ호드한 책, 작성한 후기등을 볼 수 있음
expressJS : 26
MongDB : 13
Webpack : 4
styling : 3
User Authentication like a Boss : 13
Relationships and Route Protection : 5
Custom video Player : 7
Recording Video with Javascript : 3
API + AJAX : 6
0 notes
ericvanderburg · 5 years
Text
Installing MySQL, PostgreSQL And MongDB Using Docker
http://dlvr.it/RNNX4B
0 notes
jennifersnyderca90 · 8 years
Text
Extortionists Wipe Thousands of Databases, Victims Who Pay Up Get Stiffed
Tens of thousands of personal and possibly proprietary databases that were left accessible to the public online have just been wiped from the Internet, replaced with ransom notes demanding payment for the return of the files. Adding insult to injury, it appears that virtually none of the victims have paid the ransom have gotten their files back because multiple fraudsters are now wise to the extortion attempts and are competing to replace each other’s ransom notes.
At the eye of this developing data destruction maelstrom is an online database platform called MongoDB. Tens of thousands of organizations use MongoDB to store data, but it is easy to misconfigure and leave the database exposed online. Those misconfigurations typically allow anyone to browse the databases, download them, or even write over them and delete them.
Shodan, a specialized search engine designed to find things that probably won’t be picked up by Google, lists the number of open, remotely accessible MongDB databases available as of Jan. 10, 2017.
This blog has featured several stories over the years about companies accidentally publishing user data via incorrectly configured MongoDB databases. In March 2016, for example, KrebsOnSecurity broke the news that Verizon Enterprise Solutions managed to leak the contact information on some 1.5 million customers because of a publicly accessible MongoDB installation.
Point is, this is a known problem, and almost once a week some security researcher is Tweeting that he’s discovered another huge open MongoDB database. There are simple queries that anyone can run via search engines like Shodan that will point to all of the open MongoDB databases out there at any given time. For example, the latest query via Shodan (see image above) shows that there are more than 52,000 publicly accessible MongoDB databases on the Internet right now. The largest share of open MongoDB databases are here in the United States.
Normally, when one runs a query on Shodan to list all available MongoDB databases, what one gets in return is a list of variously-named databases, and many databases with default filenames like “local.”
But when researcher Niall Merrigan ran that same query earlier this week, he noticed that far too many of the database listings returned by the query had names like “readme,” “readnow,” “encrypted” and “readplease.” Inside each of these databases is exactly one file: a database file that includes a contact email address and/or a bitcoin address and a payment demand.
Merrigan, a solutions architect for French consulting giant Cap Gemini, has been helping victims on his personal time. Merrigan said it seems clear that multiple actors are wise to the scam because if you wait a few minutes after running the Shodan query and then re-run the query, you’ll find the same Internet addresses that showed up in the database listings from the previous query, but you’ll also notice that many now have a different database title and a new ransom note.
Merrigan and another researcher Victor Gevers are maintaining a public Google Drive document (read-only) that is tracking the various victims and ransom demands. Merrigan said it appears that at least 29,000 MongoDB databases that were previously published online are now erased. Worse, hardly anyone who’s paid the ransom demands has yet received their files back.
A screen shot of the Google Drive document that Merrigan is maintaining to track the various ransom campaigns. This tab lists victims by industry. As we can see, many have paid the ransom but none have reported receiving their files back.
“It’s like the kidnappers keep delivering the ransom notes, but you don’t know who has the actual original data,” Merrigan said. “That’s why we’re tracking the notes, so that if we see the [databases] are being exfiltrated by the thieves, we can know the guys who should actually get paid if they want to get their data back.”
For now, Merrigan is advising victims not to pay the ransom. He encouraged those inclined to do so anyway to demand “proof of life” from the extortionists — i.e., request that they share one or two of the deleted files to prove that they can restore the entire cache.
Merrigan said the attackers appear to be following the plan of attack. Use Shodan to scan for open MongoDB databases, connect using anonymous access, and then list all available databases. The attacker may or may not download the data before deleting it, leaving in its place a single database file with the extortionists contact and payment info and ransom note.
Merrigan said it’s unclear what prompted this explosion in extortion attacks on MongoDB users, but he suspects someone developed a “method” for extorting others that was either shared, sold or leaked to other ne’er-do-wells, who then began competing to scam each other — leaving victims in the lurch.
“It’s like the early 1800s gold rush in the United States, everyone is just going west at the same time,” Merrigan said. “The problem is, everyone was sold the same map.”
Zach Wikholm, a research developer at New York City-based security firm Flashpoint said he’s confirmed that at least 20,000 databases have been deleted — possibly permanently.
“You’re looking at over 20,000 databases that have gone from being useful to being encrypted and held for ransom,” Wikholm said. “I’m not sure the Internet as a whole has ever experienced anything like this at one time. The fact that we can pull down the number of databases that have been compromised and are still compromised is not a good sign. It means that most victims are unaware what has happened, or they’re not sure how it’s happened or what to do about it.”
Normally, I don’t have great timing, but yesterday’s posts on Immutable Truths About Data Breaches seems almost prescient given this developing attack. Truth 1: “If you connect it to the Internet, someone will try to hack it.” Truth 2: “If what you put on the Internet has value, someone will invest time and effort to steal it.” Truth 3: “Organizations and individuals unwilling to spend a small fraction of what those assets are worth to secure them against cybercrooks can expect to eventually be relieved of said assets.”
H/T to Graham Cluley for a heads-up on this situation.
from https://krebsonsecurity.com/2017/01/extortionists-wipe-thousands-of-databases-victims-who-pay-up-get-stiffed/
0 notes
amberdscott2 · 8 years
Text
Extortionists Wipe Thousands of Databases, Victims Who Pay Up Get Stiffed
Tens of thousands of personal and possibly proprietary databases that were left accessible to the public online have just been wiped from the Internet, replaced with ransom notes demanding payment for the return of the files. Adding insult to injury, it appears that virtually none of the victims have paid the ransom have gotten their files back because multiple fraudsters are now wise to the extortion attempts and are competing to replace each other’s ransom notes.
At the eye of this developing data destruction maelstrom is an online database platform called MongoDB. Tens of thousands of organizations use MongoDB to store data, but it is easy to misconfigure and leave the database exposed online. Those misconfigurations typically allow anyone to browse the databases, download them, or even write over them and delete them.
Shodan, a specialized search engine designed to find things that probably won’t be picked up by Google, lists the number of open, remotely accessible MongDB databases available as of Jan. 10, 2017.
This blog has featured several stories over the years about companies accidentally publishing user data via incorrectly configured MongoDB databases. In March 2016, for example, KrebsOnSecurity broke the news that Verizon Enterprise Solutions managed to leak the contact information on some 1.5 million customers because of a publicly accessible MongoDB installation.
Point is, this is a known problem, and almost once a week some security researcher is Tweeting that he’s discovered another huge open MongoDB database. There are simple queries that anyone can run via search engines like Shodan that will point to all of the open MongoDB databases out there at any given time. For example, the latest query via Shodan (see image above) shows that there are more than 52,000 publicly accessible MongoDB databases on the Internet right now. The largest share of open MongoDB databases are here in the United States.
Normally, when one runs a query on Shodan to list all available MongoDB databases, what one gets in return is a list of variously-named databases, and many databases with default filenames like “local.”
But when researcher Niall Merrigan ran that same query earlier this week, he noticed that far too many of the database listings returned by the query had names like “readme,” “readnow,” “encrypted” and “readplease.” Inside each of these databases is exactly one file: a database file that includes a contact email address and/or a bitcoin address and a payment demand.
Merrigan, a solutions architect for French consulting giant Cap Gemini, has been helping victims on his personal time. Merrigan said it seems clear that multiple actors are wise to the scam because if you wait a few minutes after running the Shodan query and then re-run the query, you’ll find the same Internet addresses that showed up in the database listings from the previous query, but you’ll also notice that many now have a different database title and a new ransom note.
Merrigan and another researcher Victor Gevers are maintaining a public Google Drive document (read-only) that is tracking the various victims and ransom demands. Merrigan said it appears that at least 29,000 MongoDB databases that were previously published online are now erased. Worse, hardly anyone who’s paid the ransom demands has yet received their files back.
A screen shot of the Google Drive document that Merrigan is maintaining to track the various ransom campaigns. This tab lists victims by industry. As we can see, many have paid the ransom but none have reported receiving their files back.
“It’s like the kidnappers keep delivering the ransom notes, but you don’t know who has the actual original data,” Merrigan said. “That’s why we’re tracking the notes, so that if we see the [databases] are being exfiltrated by the thieves, we can know the guys who should actually get paid if they want to get their data back.”
For now, Merrigan is advising victims not to pay the ransom. He encouraged those inclined to do so anyway to demand “proof of life” from the extortionists — i.e., request that they share one or two of the deleted files to prove that they can restore the entire cache.
Merrigan said the attackers appear to be following the plan of attack. Use Shodan to scan for open MongoDB databases, connect using anonymous access, and then list all available databases. The attacker may or may not download the data before deleting it, leaving in its place a single database file with the extortionists contact and payment info and ransom note.
Merrigan said it’s unclear what prompted this explosion in extortion attacks on MongoDB users, but he suspects someone developed a “method” for extorting others that was either shared, sold or leaked to other ne’er-do-wells, who then began competing to scam each other — leaving victims in the lurch.
“It’s like the early 1800s gold rush in the United States, everyone is just going west at the same time,” Merrigan said. “The problem is, everyone was sold the same map.”
Zach Wikholm, a research developer at New York City-based security firm Flashpoint said he’s confirmed that at least 20,000 databases have been deleted — possibly permanently.
“You’re looking at over 20,000 databases that have gone from being useful to being encrypted and held for ransom,” Wikholm said. “I’m not sure the Internet as a whole has ever experienced anything like this at one time. The fact that we can pull down the number of databases that have been compromised and are still compromised is not a good sign. It means that most victims are unaware what has happened, or they’re not sure how it’s happened or what to do about it.”
Normally, I don’t have great timing, but yesterday’s posts on Immutable Truths About Data Breaches seems almost prescient given this developing attack. Truth 1: “If you connect it to the Internet, someone will try to hack it.” Truth 2: “If what you put on the Internet has value, someone will invest time and effort to steal it.” Truth 3: “Organizations and individuals unwilling to spend a small fraction of what those assets are worth to secure them against cybercrooks can expect to eventually be relieved of said assets.”
H/T to Graham Cluley for a heads-up on this situation.
from Amber Scott Technology News https://krebsonsecurity.com/2017/01/extortionists-wipe-thousands-of-databases-victims-who-pay-up-get-stiffed/
0 notes
evaisse · 10 years
Link
0 notes
hengkiardo-blog · 11 years
Text
Start mongodb as a service OS X
Stick this file in ~/Library/LaunchAgents/org.mongodb.mongod.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.mongodb.mongod</string> <key>ProgramArguments</key> <array> <string>/usr/local/Cellar/mongodb/2.4.3-x86_64/bin/mongod</string> <string>run</string> <string>--config</string> <string>/usr/local/Cellar/mongodb/2.4.3-x86_64/mongod.conf</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>UserName</key> <string>{your_username}</string> <key>WorkingDirectory</key> <string>/usr/local</string> <key>StandardErrorPath</key> <string>/usr/local/var/log/mongodb/output.log</string> <key>StandardOutPath</key> <string>/usr/local/var/log/mongodb/output.log</string> </dict> </plist>
Make sure to change instances of '{your_username}' to your username and any paths to be appropriate. After that
launchctl load ~/Library/LaunchAgents/org.mongodb.mongod.plist To add the file to the launchd service, and then you can run
launchctl start org.mongodb.mongod This plist is taken from Homebrew, which is a fairly useful Mac tool for getting and managing packages like MongoDB. Also, if you aren't using a mongodb config file, remove these lines:
--config /usr/local/Cellar/mongodb/2.4.3-x86_64/mongod.conf
As MongoDB will require that config file to start up. Also you can add alias to your ~/.bash_profile to start/stop mongod service
alias mongostart="launchctl start org.mongodb.mongod" alias mongostop="launchctl stop org.mongodb.mongod"
0 notes