Centos安装mongodb
来源:互联网 发布:mac系统cs6破解补丁 编辑:程序博客网 时间:2024/05/04 23:09
2、解压下载的mongodb的tar包
解压之后主要的运行脚本都在bin目录中,建立软链接:ln -s /usr/soft/mongodb/bin/* /usr/local/bin。这样就可以直接使用mongo的各种命令
3、运行mongo
建立数据文件夹db、日志文件夹logs、配置文件夹conf
建立三个脚本文件:startMongo.sh、stopMongo.sh、mongoStat.sh
(1)startMongo.sh 启动mongo脚本
/usr/soft/mongodb/bin/mongod -f /usr/soft/mongodb/conf/mongodb_27021.conf --jour nal
(2)stopMongo.sh 停止mongo脚本
/usr/soft/mongodb/bin/mongod -f /usr/soft/mongodb/conf/mongodb_27021.conf --shut
down
(3)mongoStat.sh 每隔10秒钟查看一次mongo状态
./mongostat --port 27021 10
4、附上mongodb_27021.conf的配置内容
# mongo.conf
#where to log
logpath=/usr/soft/mongodb/logs/mongo_27021.log
logappend=true
# fork and run in background
fork = true
port = 27021
# dbpath=/var/lib/mongo
dbpath=/usr/soft/mongodb/db/
# Disables write-ahead journaling
# Enables periodic logging of CPU utilization and I/O wait
#cpu = true
# Turn on/off security. Off is currently the default
noauth = true
#auth = true
# Verbose logging output.
#verbose = true
# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck = true
# Enable db quota management
#quota = true
# Set oplogging level where n is
# 0=off (default)
# 1=W
# 2=R
# 3=both
# 7=W+some reads
# Ignore query hints
#nohints = true
# Disable the HTTP interface (Defaults to localhost:27018).
#nohttpinterface = true
# Turns off server-side scripting. This will result in greatly limited
# functionality
#noscripting = true
# Turns off table scans. Any query that would do a table scan fails.
#notablescan = true
# Disable data file preallocation.
#noprealloc = true
# Specify .ns file size for new databases.
# nssize =
# Accout token for Mongo monitoring server.
#mms-token =
# Server name for Mongo monitoring server.
#mms-name =
# Ping interval for Mongo monitoring server.
#mms-interval =
# Replication Options
# in replicated mongo databases, specify here whether this is a slave or master
#slave = true
#source = master.example.com
# Slave only: specify a single database to replicate
#only = master.example.com
# or
#master = true
#source = slave.example.com
#rest = true
- CentOS 6.3 安装MongoDB
- CentOS 安装MongoDB
- centos安装mongodb
- CentOS下安装MongoDB
- MongoDB安装-CentOS
- centos 安装MongoDB
- CentOS 安装使用MongoDB
- CentOS 编译安装 MongoDB
- centos安装mongodb
- centos 6.5 安装Mongodb
- centos安装mongodb
- centos安装mongodb
- centos安装mongodb
- CentOs下MongoDB安装
- Centos安装mongodb
- centos 64 安装mongodb
- CentOS 安装 MongoDB
- CentOS下安装mongodb
- 机器学习实战——k-近邻算法(KNN)
- 关于Sqlite的一些基本语句使用
- ios 指定返回的跳转页面
- jQuery取select框中的值
- Android动画 Animation
- Centos安装mongodb
- poj1743:Musical Theme(后缀数组)
- XUtils改造以添加drawable支持
- mysql存储过程详解(2)
- iOS开发~CocoaPods使用详细说明
- poj2527——Polynomial Remains(多项式相除)
- 自然语言中的重要概念——熵(Entropy)
- Windows安装及运行mongodb
- 浏览器-服务器间消息推送之 web-socket-js 学习笔记 一