Skip to content

Instantly share code, notes, and snippets.

@nax3t
Last active July 21, 2020 08:16
Show Gist options
  • Save nax3t/c781791851bac04e399d2275405cead5 to your computer and use it in GitHub Desktop.
Save nax3t/c781791851bac04e399d2275405cead5 to your computer and use it in GitHub Desktop.
Code for https://youtu.be/b089GmAvUyQ MongoDB c9.io Install Instructions
killall mongod
sudo apt-get purge -y mongodb-org*
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo apt-get update
sudo apt-get install -y mongodb-org
rm -rf mongod
echo "mongod --dbpath=data --nojournal" > mongod
chmod a+x mongod
@pranav-x
Copy link

any help?

MongoDB shell version v3.6.10
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2019-02-13T01:34:03.653+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-02-13T01:34:03.653+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:263:13
@(connect):1:6
exception: connect failed
same problem
how did you solved it??
please help

@WillemVanGenechten
Copy link

is this the same when using visual studio code?
thanks a million

@jpredmon
Copy link

Not working for me in c9. I keep getting the "Unable to correct problems, you have held broken packages."

@nax3t
Copy link
Author

nax3t commented Feb 22, 2019

2019-02-13T01:34:03.653+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed

be sure to run ./mongod from ~ directory and leave it running before running node app.js

is this the same when using visual studio code?

installation instructions vary for operating system, see mongodb docs

Not working for me in c9. I keep getting the "Unable to correct problems, you have held broken packages."

I fixed it, you now have 4.0.6

@mvishnurana1
Copy link

any help?

MongoDB shell version v3.6.10
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2019-02-13T01:34:03.653+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-02-13T01:34:03.653+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:263:13
@(connect):1:6
exception: connect failed

I have the same issue as your how did you fix it?

@bjacobs4
Copy link

Is there a resource for going through this if using Git Bash,?

@Tze-Sien
Copy link

Tze-Sien commented Nov 6, 2019

Thanks! Works well for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment