简体   繁体   中英

connect remotely to mongoDB server

I have installed MongoDB on a fresh Centos7 server. I have installed MongoDB accroding to this tutrial: https://www.liquidweb.com/kb/how-to-install-mongodb-on-centos-7/

The installation was completed succsessfully, when I write mongo on the shell this is the output:

[root@centos-512mb-nyc3-01 ~]# mongo

MongoDB shell version: 2.6.12

connecting to: test

Server has startup warnings:

2016-12-31T18:37:11.734+0000 [initandlisten]

2016-12-31T18:37:11.734+0000 [initandlisten] ** WARNING: Readahead for /var/lib/mongo is set to 4096KB

2016-12-31T18:37:11.734+0000 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less

2016-12-31T18:37:11.734+0000 [initandlisten] ** http://dochub.mongodb.org/core/readahead .

I want to connect remotly to mongo via RoboMongo or NodeJS app. but when I have tried mongo mongodb://138.197.80.108/ I get network unreachable.

There is something that I need to do to connect remotly to mongo?

Thanks :)

BTW - I havn't set any password\\user\u003c/i>

I have bind machine's IP address according to: https://www.mkyong.com/mongodb/mongodb-allow-remote-access/

and added port 27017 to the fire wall tables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM