15 Star 42 Fork 29

Spring / init_server

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
redis.sh 549 Bytes
Copy Edit Web IDE Raw Blame History
廖师兄 authored 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

Comment ( 0 )

Sign in for post a comment

Shell
1
https://gitee.com/liaoshixiong/init_server.git
git@gitee.com:liaoshixiong/init_server.git
liaoshixiong
init_server
init_server
master

Search