没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
redis 主从同步项目和负载均衡(cent6.6 和 red6.5)
在 192.168.4.5 上(搭建 redis 服务(主))
[root@localhost 桌面]# yum -y install gcc gcc-c++
[root@localhost 桌面]# ls
redis-2.6.14.tar.gz
[root@localhost 桌面]# tar -zxf redis-2.6.14.tar.gz
[root@localhost 桌面]# ls
redis-2.6.14 redis-2.6.14.tar.gz
[root@localhost 桌面]# cd redis-2.6.14
[root@localhost redis-2.6.14]# ls
00-RELEASENOTES COPYING Makefile redis.conf src
BUGS deps MANIFESTO runtest tests
CONTRIBUTING INSTALL README sentinel.conf utils
[root@localhost redis-2.6.14]# make MALLOC=jemalloc
[root@localhost redis-2.6.14]# make PREFIX=/usr/local/redis install
[root@localhost redis-2.6.14]# ls /usr/local/redis/
bin
[root@localhost redis-2.6.14]# ls /usr/local/redis/bin/
redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server
[root@localhost redis-2.6.14]# tree /usr/local/redis/
/usr/local/redis/
└── bin
├── redis-benchmark
├── redis-check-aof
├── redis-check-dump
├── redis-cli
└── redis-server
[root@localhost redis-2.6.14]# mkdir /usr/local/redis/conf //优化目录结构
[root@localhost redis-2.6.14]# cp redis.conf /usr/local/redis/conf/ //配置其他功能可修改配置文件
[root@localhost redis-2.6.14]# echo "PATH=/usr/local/redis/bin/:$PATH" >> /etc/profile
[root@localhost redis-2.6.14]# . /etc/profile
[root@localhost redis-2.6.14]# which redis-server
/usr/local/redis/bin/redis-server
[root@localhost redis-2.6.14]# redis-server --help //可查看用法
[root@localhost redis-2.6.14]# redis-server /usr/local/redis/conf/redis.conf &
[1] 5390
[root@localhost redis-2.6.14]# [5390] 19 Jun 21:07:07.674 * Max number of open files set to
10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.14 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 5390
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[5390] 19 Jun 21:07:07.690 # Server started, Redis version 2.6.14
[5390] 19 Jun 21:07:07.692 # WARNING overcommit_memory is set to 0! Background save may fail
under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to
/etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this
to take effect.
[5390] 19 Jun 21:07:07.692 * The server is now ready to accept connections on port 6379
如果内存不够,执行:“sysctl vm.overcommit_memory=1”命令,可以放到/etc/sysctl.conf 中,也可在
命令行执行。
资源评论
运维实战帮
- 粉丝: 78
- 资源: 420
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功