redis linux下安装及问题汇总
http://redis.io/download 安装
1.redis下载:
root@ubuntu:/# apt http://download.redis.io/releases/redis-4.0.0.tar.gz
2.redis解压:
root@ubuntu:/# tar zxf redis-4.0.0.tar.gz
3.进入redis目录:
root@ubuntu# cd redis-4.0.0/
4.make
问题一:make失败,需安装make
root@ubuntu:/redis-4.0.0# make
Command 'make' not found, but can be installed with:
apt install make # version 4.2.1-1.2, or
apt install make-guile # version 4.2.1-1.2
安装make:
root@ubuntu:/redis-4.0.0# apt install make
5.进入src:
root@ubuntu:/redis-4.0.0# cd src/
问题二:进入src并没有 redis-server/redis-cli
需要安装gcc:
root@ubuntu:/# apt install gcc
6.重新make:
问题三:make又报错
解决:参照 https://www.cnblogs.com/richerdyoung/p/8066373.html 感谢楼主!!
7.再次重新进入src:
8. 启动 ./redis-server:
又报错了,端口被占用了
解决办法,杀掉进程:
9.重新启动:
ok