CentOs搭建NodeJs服务器—redis搭建
1.下载
wget -O redis-5.0-rc3.tar.gz https://github.com/antirez/redis/archive/5.0-rc3.tar.gz
2.解压
tar -zxvf redis-5.0-rc3.tar.gz
3.进入目录, 编译
cd redis-5.0-rc3
make
提示则说明安装成功
Hint: It's a good idea to run 'make test' ;)
make[1]: 离开目录“/demongao/redis-5.0-rc3/src”
4.install
cd src
make install
提示如下:
Hint: It's a good idea to run 'make test' 😉
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
5.修改配置文件
vim /demongao/redis-5.0-rc3/redis.conf
修改如下配置
bind 0.0.0.0 # 登录ip限制 0.0.0.0 任何ip均可登录
requirepass # 登录密码
daemonize yes # 守护进程模式开启
6. redies 启动
redis-server /demongao/redis-5.0-rc3/redis.conf
/demongao/redis-5.0-rc3/redis.conf redis 配置文件所在目录
提示如下表示启动成功:
19988:C 11 Sep 15:34:37.250 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
19988:C 11 Sep 15:34:37.250 # Redis version=4.9.103, bits=64, commit=00000000, modified=0, pid=19988, just started
19988:C 11 Sep 15:34:37.250 # Configuration loaded
netstat -ltnp |grep 6379
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 19989/redis-server