Ubuntu 18 + Redis安装

Ubuntu 18 + Redis安装

1.安装命令:

opengis@gisserver20:~$ sudo apt-get install redis-server

2.查看tcp 连接

opengis@gisserver20:~$ sudo netstat -ap | grep 6379

3.修改配置

opengis@gisserver20:~$ sudo vim /etc/redis/redis.conf

bind 0.0.0.0 ::1

requirepass gis

4.重启服务

opengis@gisserver20:~$ sudo systemctl restart redis

opengis@gisserver20:~$

5.客户端登录

opengis@gisserver20:~$ redis-cli

127.0.0.1:6379> auth gis

OK

127.0.0.1:6379> exit

上一篇:洛谷mNOIP模拟赛Day1-斐波那契


下一篇:刷题19. Remove Nth Node From End of List