惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 天纯蓝

go错误总结(27条) GO语言最主的特性 解决“Comparison method violates its general contract!” Centos7 Mysql5.7主从服务器配置 maven buid 导出项目依赖的jar包问题 [数据库]漫谈ElasticSearch关于ES性能调优几件必须知道的事(转) MongoDB 聚合管道(Aggregation Pipeline) mongodb分布式查询 MongoDB JAVA API Filters mongodb.conf配置文件详解 Elasticsearch-2.3.x填坑之路 CentOS VMware 下SSH配置方法详解 15个nosql数据库 MySql 优化 Elasticsearch 相关名词理解 Elasticsearch集群中处理大型日志流的几个常用概念 ES配置文件参考与参数详解 Java连接Elasticsearch集群 Linux下Tomcat的启动、关闭、杀死进程
mongodb安装配置
天纯蓝 · 2016-05-24 · via 博客园 - 天纯蓝

1、解压安装文件
tar zxf mongodb-linux-x86_64-rhel62-3.2.5.tgz

2、移动文件夹
mv mongodb-linux-x86_64-rhel62-3.2.5/* /usr/local/mongodb

3、创建数据库文件夹
cd data
mkdr db

4、服务器防火墙开端口

编辑配置
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 27017 -j ACCEPT

最后重启防火墙使配置生效
/etc/init.d/iptables restart

5、新建配置文件,/usr/local/mongodb/mongodb.conf,内容如下:

# 数据库文件位置
dbpath=/data/db/

# 日志文件位置
logpath=/usr/local/mongodb/logs/mongodb.log

# 控制 mongod 进程将其pid 文件放置到的位置
pidfilepath=/usr/local/mongodb/mongodb.pid

# 修改数据目录存储模式,每个数据库的文件存储在DBPATH指定目录的不同的文件夹中。使用此选项,可以配置的MongoDB将数据存储在不同的磁盘设备上,以提高写入吞吐量或磁盘容量。
directoryperdb=true

# 以追加方式写入日志
logappend=true

# 副本集配置
# replSet=NDES

# 绑定IP
bind_ip=192.168.1.188

# 端口 默认27017
port=27017

# 指定的复制操作日志(OPLOG)的最大大小
oplogSize=10000

# 启用后台模式
fork=true

# 来禁用预分配的数据文件,会缩短启动时间,但在正常操作过程中,可能会导致性能显著下降。
# noprealloc=true


5、mongodb启动停止
停止
/usr/local/mongodb/bin/mongo 127.0.0.1:27017/admin --eval "db.shutdownServer()"
启动
/usr/local/mongodb/bin/mongod -f /usr/local/mongodb/mongodb.conf

ps -ef|grep mongod