redis單機搭建

1.       建立分用戶(用於啓動redisredis

[root@Centos6 ~]# useradd redistcp

  1. 2.       切換到分用戶環境ide

[root@Centos6 ~]# sudo su – redisspa

  1. 3.       上傳redis軟件或者wget http://download.redis.io/releases/redis-3.2.6.tar.gzserver

[redis@Centos6 ~]$ rz -yci

rz waiting to receive.get

Starting zmodem transfer.  PressCtrl+C to cancel.it

Transferring redis-3.2.6.tar.gz...io

  100%    1508 KB   1508 KB/sec    00:00:01       0 Errors class

[redis@Centos6 ~]$ ls

redis-3.2.6.tar.gz

  1. 4.       解壓縮redis文件並安裝

[redis@Centos6 ~]$ mkdir run

[redis@Centos6 ~]$ tar zxf redis-3.2.6.tar.gz –C run/

[redis@Centos6 ~]$ cd run/redis-3.2.6/

[redis@Centos6 redis-3.2.6]$ make

  1. 5.       啓動redis(這裏使用默認配置文件進行啓動)

[redis@Centos6 ~]$ ~/run/redis-3.2.6/src/redis-server~/run/redis-3.2.6/redis.conf  &

[redis@Centos6 ~]$ netstat -lantup|grep redis

(Not all processes could be identified, non-owned process info

 will not be shown, you wouldhave to be root to see it all.)

tcp       0      0127.0.0.1:6379[l1]       0.0.0.0:*     LISTEN     8536/redis-server 1


 [l1]默認綁定的地址以及端口

相關文章
相關標籤/搜索