以本地编译的方式,在 ubuntu 18.04 环境下部署 redis
下载及编译
参考官网教程,执行如下命令来进行 redis 本地编译。
1 | $ wget http://download.redis.io/releases/redis-5.0.5.tar.gz |
遇到问题即解决方式
如果出现下列的错误提示:
1 | cd src && make all |
说明没有安装 gcc ,输入下列的命令安装 gcc 即可。
1 | sudo apt-get install gcc |
上述问题解决后,如果出现下列的错误提示:
1 | cd src && make all |
则可通过下列命令来解决:
1 | make MALLOC=libc |
运行
按照官网的提示,输入下列命令启动:
1 | zyp@DESKTOP-CI621JQ:~/redis-5.0.5$ src/redis-server |