Percona MongoDB 试用

运行环境:centos7.2
# yum -y install numactl
--下载RPM软件使用rpm安装:
# rpm -ivh Percona-Server-MongoDB-36-*.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:Percona-Server-MongoDB-36-shell-3################################# [ 20%]
   2:Percona-Server-MongoDB-36-server-################################# [ 40%]
 * To start the service, configure your engine and start mongod
 ** WARNING: Access control is not enabled for the database.
 ** Read and write access to data and configuration is unrestricted.
 ** To fix this please use /usr/bin/percona-server-mongodb-enable-auth.sh 
   3:Percona-Server-MongoDB-36-tools-3################################# [ 60%]
   4:Percona-Server-MongoDB-36-mongos-################################# [ 80%]
   5:Percona-Server-MongoDB-36-3.6.6-1################################# [100%]

# /usr/bin/percona-server-mongodb-enable-auth.sh
We have detected authentication is not enabled.
Would you like help creating your first user?
Please note that mongodb service could be restarted during this action
Would you like to proceed?(Y/n)Y
Redirecting to /bin/systemctl start  mongod.service
Percona Server for MongoDB shell version v3.6.6-1.4
connecting to: mongodb://localhost:27017/admin
Percona Server for MongoDB server version: v3.6.6-1.4
Successfully added user: { "user" : "dba", "roles" : [ "root" ] }
bye
User has been created successfully!
User:dba
Password:Mcy8vl50aWleF3fqG0JkQzyXwkR9C6gx
Redirecting to /bin/systemctl stop  mongod.service
Redirecting to /bin/systemctl start  mongod.service


# systemctl status mongod
● mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-10-15 16:12:24 CST; 3min 44s ago
  Process: 639381 ExecStart=/usr/bin/env bash -c ${NUMACTL} /usr/bin/mongod ${OPTIONS} > ${STDOUT} 2> ${STDERR} (code=exited, status=0/SUCCESS)
  Process: 639359 ExecStartPre=/usr/bin/percona-server-mongodb-helper.sh (code=exited, status=0/SUCCESS)
 Main PID: 639384 (mongod)
   Memory: 138.3M
   CGroup: /system.slice/mongod.service
           └─639384 /usr/bin/mongod -f /etc/mongod.conf

Oct 15 16:12:23 k8s-ceph-node-75-102 systemd[1]: Starting High-performance, schema-free document-oriented database...
Oct 15 16:12:24 k8s-ceph-node-75-102 systemd[1]: Started High-performance, schema-free document-oriented database.
--启动、关闭、重启数据库:
$ sudo service mongod start
$ sudo service mongod status
$ sudo service mongod stop
$ sudo service mongod restart
--自动启动:
$ systemctl enable mongod
--卸载数据库:
$ sudo service mongod stop
$ sudo yum remove Percona-Server-MongoDB*
$ rm -rf /var/lib/mongodb
$ rm -f /etc/mongod.cnf

--Percona 版本的mongoDB支持如下存储引擎:
#  engine: mmapv1
#  engine: rocksdb
#  engine: wiredTiger
#  engine: inMemory

--percona版本的mongodb支持热备份:hot backup.

 

你可能感兴趣的:(MongoDB)