0、编译安装redis需要jemalloc组件,gcc,gcc-c++
1、下载安装jemalloc-4.4.0
|
安装 |
jemalloc |
|
1 |
jemalloc-4.4.0/ |
|
2 |
./configure |
|
3 |
Make |
|
4 |
Make install |
2、安装redis-3.2.6
|
路径 |
路径/app/redis |
|
编译安装 |
make PREFIX=/app/redis install |
|
设置为后台启动 |
修改redis.conf 将daemonize的值改为yes |
|
启动服务 |
/app/redis/bin/redis-server /app/redis/redis.conf |
3、配置自启动
修改/etc/rc.local
su redis -lc "nohup /app/redis/bin/redis-server /app/redis/redis.conf > /app/redis/redis_nohup.log 2>&1 &"
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28538954/viewspace-2140623/ ,如需转载,请注明出处,否则将追究法律责任。