如何仅在MongoDB上监听localhost

编程入门 行业动态 更新时间:2024-10-25 17:27:32
本文介绍了如何仅在MongoDB上监听localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

MongoDB建议处理安全性的简单方法是运行考虑到在这样的配置中,必须确保只有受信任的计算机才能访问数据库TCP端口."

MongoDB Suggests that the easy way to handle security is to run it in a trusted environment, given that, "in such a configuration, one must be sure only trusted machines can access database TCP ports."

执行此操作的最佳方法是什么? mongodb是否有一种方法只能本地监听本地主机?

What would be the best approach for doing this? Is there a way for mongodb to natively only listen to localhost?

我正在使用ubuntu 10.10

I'm using ubuntu 10.10

推荐答案

将以下行添加到mongodb.conf:

bind_ip = 127.0.0.1

如@Josh Rickard在评论中所述:不要忘记在更新配置文件后重新启动该过程:

As @Josh Rickard stated in comments: don't forget to restart the process after updating the config file:

service mongodb restart

更多推荐

如何仅在MongoDB上监听localhost

本文发布于:2023-07-15 01:57:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1108348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:MongoDB   localhost

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!