1 Star 0 Fork 34

Dkui / init_server

forked from Spring / init_server 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
redis.sh 549 Bytes
一键复制 编辑 原始数据 按行查看 历史
廖师兄 提交于 2017-12-04 23:26 . e
#!/usr/bin/env bash
wget http://download.redis.io/releases/redis-3.2.11.tar.gz
tar -zxvf redis-3.2.11.tar.gz
cd redis-3.2.11
make PREFIX=/usr/local/redis install
cp init_server/redis.conf /usr/local/redis/
#开机启动
cat > /usr/lib/systemd/system/redis.service <<EOF
[Unit]
Description=redis
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown
[Install]
WantedBy=multi-user.target
EOF
systemctl enable redis.service
Shell
1
https://gitee.com/Dkui97/init_server.git
git@gitee.com:Dkui97/init_server.git
Dkui97
init_server
init_server
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891