首页 > 代码库 > Redis-3.2.3 安装部署
Redis-3.2.3 安装部署
1.redis下载安装
cd /usr/local/srctar -zxvf redis-3.2.3.tar.gzwget http://download.redis.io/releases/redis-3.2.3.tar.gzcd redis-3.2.3make PREFIX=/usr/local/redis-3.2.3 installln -s /usr/loca/redis-3.2.3 /usr/local/redis
2.redis启动脚本
cp /usr/local/src/redis-3.2.3/utils/redis_init_script /etc/init.d/redischmod +x /etc/init.d/redisvim /etc/init.d/redis 6 REDISPORT=6379 7 EXEC=/usr/local/redis/bin/redis-server # 启动命令更改 8 CLIEXEC=/usr/local/redis/bin/redis-cli
3.redi配置文件
mkdir /etc/rediscp /usr/local/src/redis-3.2.3/redis.conf /etc/redis/6379.conf# 修改redis的配置文件[root@localhost ~]# vim /etc/init.d/6379.conf 61 bind 192.168.2.10 # 绑定IP地址 88 # In high requests-per-second environments you need an high backlog in order 89 # to avoid slow clients connections issues. Note that the Linux kernel 90 # will silently truncate it to the value of /proc/sys/net/core/somaxconn so 91 # make sure to raise both the value of somaxconn and tcp_max_syn_backlog 92 # in order to get the desired effect. 93 tcp-backlog 511 # 修改/proc/sys/net/core/somaxconn值 128 daemonize yes # no改成yes 163 logfile "/etc/redis/redis_6379.log" # 日志文件 247 dir /etc/redis/redis_6379 # 数据目录 480 requirepass xiaoyi # 开启密码认证[root@localhost ~]# cat /proc/sys/net/core/somaxconn128[root@localhost ~]# echo 512 >/proc/sys/net/core/somaxconn[root@localhost ~]# cat /proc/sys/net/core/somaxconn 512[root@localhost ~]# mkdir /etc/redis/redis_6379[root@localhost local]# /etc/init.d/redis start
Redis-3.2.3 安装部署
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。