Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

Netkiller NoSQL 手札

MongoDB, Redis, CouchBase, Cassandra, Hypertable...

Mr. Neo Chan, 陈景峯(BG7NYT)



中国广东省深圳市望海路半岛城邦三期
518067
+86 13113668890


文档始创于2012-11-16
, $Date: 2013-04-25 16:24:49 +0800 (Thu, 25 Apr 2013) $

电子书最近一次更新于 2023-10-08 22:01:45

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

http://www.netkiller.cn
http://netkiller.github.io
http://netkiller.sourceforge.net
微信公众号: netkiller
微信:13113668890 请注明“读者”
QQ:13721218 请注明“读者”
QQ群:128659835 请注明“读者”
知乎专栏 | 多维度架构

2017-02-13


致读者

Netkiller 系列手札 已经被 Github 收录,并备份保存在北极地下250米深的代码库中,备份会保留1000年。

Preserving open source software for future generations

The world is powered by open source software. It is a hidden cornerstone of modern civilization, and the shared heritage of all humanity.

The GitHub Arctic Code Vault is a data repository preserved in the Arctic World Archive (AWA), a very-long-term archival facility 250 meters deep in the permafrost of an Arctic mountain.

We are collaborating with the Bodleian Library in Oxford, the Bibliotheca Alexandrina in Egypt, and Stanford Libraries in California to store copies of 17,000 of GitHub’s most popular and most-depended-upon projects—open source’s “greatest hits”—in their archives, in museum-quality cases, to preserve them for future generations.

https://archiveprogram.github.com/arctic-vault/

目录

1. 自述
1.1. 写给读者
1.2. 作者简介
1.3. 如何获得文档
1.4. 打赏(Donations)
1.5. 联系方式
I. Redis
1. Redis 安装
1.1. CentOS 8 Stream
1.2. CentOS 7
1.3. CentOS 6
1.3.1. 主从同步
1.3.2. Sentinel
1.4. Ubuntu
1.5. Mac 安装 Redis
1.6. 源码编译安装
1.7.
1.8. Test Redis
2. /etc/redis.conf
2.1. 密码认证
2.2. maxmemory-policy TTL 过期策略配置
3. redis-cli - Command-line client to redis-server
3.1. 命令参数
3.1.1. password
3.1.2. raw
3.2. --latency Enter a special mode continuously sampling latency.
3.3. 清空指定数据库
3.4. auth
3.5. MONITOR
3.6. info
3.7. save/bgsave/lastsave
3.8. config
3.9. keys
3.10. 字符串操作
3.10.1. set/get/del
3.10.2. setnx
3.11. expire/ttl
3.12. 获取 key 类型
3.13. LIST 数据类型
3.14. set 无序字符集合
3.14.1. 查看元素是否存在
3.15. zset (有序集合)
3.16. HASH
3.17. Pub/Sub 订阅与发布
3.18. flushdb 清空 Redis 数据
4. redis-benchmark 测试工具
5. Redis Cluster
6. Redis 通信协议
6.1. 切换DB
6.2. 监控
7. Redis 开发
7.1. 消息订阅与发布
7.2. 选择数据库
8. 工具
8.1. 导出 / 导入
8.2. phpRedisAdmin
8.3. A fast, light-weight proxy for memcached and redis
9. FAQ
9.1. 清空数据库
9.2. (error) MISCONF Redis is configured to save RDB snapshots
9.3. You can't write against a read only replica.
9.4. MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
9.5.
II. MongoDB
10. Install 安装MongoDB
10.1. CentOS 8 Stream
10.2. MacOS 安装 MongoDB
10.3. 二进制tar包安装
10.4. Ubuntu MongoDB
10.5. CentOS 7 MongoDB
10.6. 从官网安装最新版本的 MongoDB 3.4
10.6.1. Server
10.6.2. Client
10.6.3. 工具
10.7. MongoDB + Hadoop
10.8. OSCM 一键安装 MongoDB 4.0.2
10.9. Replication
10.10. Drivers
10.10.1. Using MongoDB in PHP
11. MongoDB 管理
11.1. Security and Authentication
11.1.1. 超级管理员
11.1.2. 数据库访问用户
11.1.3. 数据库监控用户
11.1.4. 删除用户
11.1.5. 更新角色
11.2. 4.0早期旧版本
12. 命令工具
12.1. mongo - MongoDB Shell
12.1.1. eval
12.1.2. help
12.1.3. 登陆认证
12.1.4. 管道操作
12.2. mongodump - Backup
12.2.1. 本地备份
12.2.2. 远程备份
12.3. mongorestore
12.3.1. 本地恢复
12.3.2. 远程恢复
12.3.3. filter
12.4. mongostat
12.5. mongotop
12.6. mongofiles - Browse and modify a GridFS filesystem.
12.6.1. list 浏览文件
12.6.2. put 上传文件
12.6.3. get 下载
12.6.4. delete 删除
13. MongoDB Shell
13.1. shutdownServer
13.2. show 查看命令
13.2.1. show dbs
13.2.2. show collections
13.2.3. show users
13.2.4. show profile
13.3. 切换数据库
13.4. Collection 管理
13.4.1. 创建 Collection
13.4.2. 删除 collection
13.4.3. 删除字段
13.5. save
13.6. insert
13.7. update
13.7.1. multi 更新所有数据
13.7.2. upsert 更新,如果不存在则插入数据
13.7.3. updateMany 更新集合中的所有数据
13.8. remove
13.8.1. 删除条件使用 _id
13.9. count()
13.10. 查询
13.10.1. find() MongoDB 2.x
13.10.2. find() MongoDB 3.x
13.10.3. group()
13.11. aggregate
13.11.1. project
13.11.2. groupby + sum
13.12. Indexes 索引
13.12.1. 查看索引
13.12.2. 创建索引
13.12.3. 删除索引
13.12.4. 唯一索引
13.12.5. 复合索引
13.12.6. 稀疏索引
13.13. Map-Reduce
13.13.1. 使用 Map-Reduce 统计Web 服务器 access.log 日志文件
13.14. 内嵌对象
13.14.1. Array / List 列表类型
13.15. Javascript 脚本
14. Mongo Admin UI
14.1. RockMongo
14.2. MongoVUE
15. Cassandra
15.1. Getting Started
15.1.1. Downloading and Installation
15.1.2. Running Cassandra
15.1.3. cli tool
15.1.4. Testing Cassandra
15.2. Configure Cassandra
15.2.1. Envionment variables
15.2.2. log4j.properties
15.2.3. storage-conf.xml
15.3. Keyspace
15.3.1. Schema
15.3.2. Keyspace example
15.4. Cluster
15.4.1. Running a cluster
15.4.2. Running a single node
15.4.3. nodetool
16. Hypertable
16.1. Hypertable 安装
16.1.1. Hypertable standalone 单机安装
16.1.2. Hypertable on HDFS(hadoop) 安装
16.1.3. MapR
16.1.4. Ceph
16.1.5. 检验安装
16.2. Code examples
16.2.1. PHP
16.3. HQL
16.3.1. namespace 命名空间管理
16.3.2. Table 表
16.4. FAQ
16.4.1. 切换 DFS Broker
17. CouchBase
17.1. 安装 CouchBase
17.1.1. Getting Started with Couchbase on PHP
17.2. couchbase 命令
17.2.1. couchbase-cli
18. Memcached
18.1. 安装 Memcached
18.1.1. CentOS 下编译
18.1.2. Ubuntu 下编译安装
18.1.3. debian/ubuntu
18.1.4. yum install
18.2. Memcached 代理
18.2.1. moxi
18.2.2. memagent
19. RethinkDB
20. TokyoCabinet/Tyrant
21. Flare
22. Voldemort
23. LevelDB
24. HyperDex
25. LeoFS

范例清单

10.1. MongoDB Test
10.2. Using MongoDB in PHP
15.1. Twitter
15.2. Twissandra
18.1. /etc/init.d/memcached