fpm打包redis3.0.7
1.安装redis
1 2 3 4 | tar -xf redis-3.0.7. tar .gz -C /usr/local cd /usr/local && mv redis-3.0.7 redis cd redis make install |
2.编写redis优化脚本
1 2 3 4 5 6 7 8 9 | echo "vm.overcommit_memory = 1" >> /etc/sysctl .conf sysctl -p [root@游戏测试 ~] # cat /data/scripts/redis.sh #!/bin/bash ln -s /usr/local/redis/src/redis-server /usr/bin/ ln -s /usr/local/redis/src/redis-cli /usr/bin/ ln -s /usr/local/redis/src/redis-benchmark /usr/bin/ ln -s /usr/local/redis/src/redis-check-dump /usr/bin/ ln -s /usr/local/redis/src/redis-check-aof /usr/bin/ |
3.打包
1 2 3 4 | [root@游戏测试 ~] # fpm -s dir -t rpm -n redis -v 3.0.7 --post-install /data/scripts/redis.sh -f /usr/local/redis/ no value for epoch is set , defaulting to nil {:level=>:warn} no value for epoch is set , defaulting to nil {:level=>:warn} Created package {:path=> "redis-3.0.7-1.x86_64.rpm" } |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步