redis单机安装

1、下载安装包

wget http://download.redis.io/releases/redis-3.2.1.tar.gz

2、安装

tar -zxvf redis-3.2.1.tar.gz 
cd redis-3.2.1
make
make PREFIX=/usr/local/redis install


mkdir /usr/local/redis/etc/
cp redis.conf /usr/local/redis/etc/ 
cd /usr/local/redis/bin/
cp redis-benchmark redis-cli redis-server /usr/bin/


vim /usr/local/redis/etc/redis.conf

# 修改一下配置
# redis以守护进程的方式运行
# no表示不以守护进程的方式运行(会占用一个终端)  
daemonize yes
bind 192.168.30.128 #改成自己的ip地址


# 启动redis(指定配置文件)
redis-server /usr/local/redis/etc/redis.conf

#检查
[root@linux-node1 bin]# lsof -i:6379
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
redis-ser 4906 root    4u  IPv4  75872      0t0  TCP linux-node1:6379 (LISTEN)
redis-ser 4906 root    6u  IPv4  75875      0t0  TCP linux-node1:6379->linux-node3:34242 (ESTABLISHED)
redis-ser 4906 root    7u  IPv4  75877      0t0  TCP linux-node1:6379->linux-node2:42326 (ESTABLISHED)

  

  

posted @ 2020-04-21 13:50  随心朝阳  阅读(199)  评论(0编辑  收藏  举报