Redis 安装(shell)

原创 赤水  2016年3月31日 02:30 阅读 249 次

Shell:

 

yum -y install gcc-c++
cd /usr/src/; wget http://download.redis.io/releases/redis-3.0.5.tar.gz
tar -zxvf redis-3.0.5.tar.gz  
mv  /usr/src/redis-3.0.5 /usr/local/redis ; cd /usr/local/redis
make
sed -i 's/daemonize no/daemonize yes/' redis.conf 
src/redis-server redis.conf ; 	netstat -nputl | egrep 6379
echo '/usr/local/redis/src/redis-server /usr/local/redis/redis.conf' >> /etc/rc.local 

 

单机多个实例

cp /usr/local/redis/redis.conf  /usr/local/redis/redis.conf1
sed -i 's/port 6379/port 6380/' /usr/local/redis/redis.conf1 
sed -i 's/pidfile \/var\/run\/redis.pid/pidfile \/var\/run\/redis1.pid/'  /usr/local/redis/redis.conf1
/usr/local/redis/src/redis-server /usr/local/redis/redis.conf1 ; netstat -nputl | egrep 6380

 

 

 



sed -i 's/pidfile \/var\/run\/redis.pid/pidfile \/var\/run\/redis1.pid/'  /usr/local/redis/redis.conf1
本文地址: https://blog.lssin.com/readblog/87.html
版权声明:本文为原创文章,版权归  赤水 所有,欢迎分享本文,转载请保留出处!

发表评论


表情