sh 在EC2上安装Redis

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在EC2上安装Redis相关的知识,希望对你有一定的参考价值。

1. Install Linux updates, set time zones, followed by GCC and Make

sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
 

2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)

cd /tmp
wget http://download.redis.io/releases/redis-2.8.12.tar.gz
tar xzf redis-2.8.12.tar.gz
cd redis-2.8.12
make
 

3. Create Directories and Copy Redis Files

sudo mkdir /etc/redis 
sudo mkdir /var/lib/redis
sudo cp src/redis-server src/redis-cli /usr/local/bin/
sudo cp redis.conf /etc/redis/
 

4. Configure Redis.Conf

sudo vim /etc/redis/redis.conf
  [..]
  daemonize yes
  [..]
  
  [..]
  bind 127.0.0.1
  [..]
  
  [..]
  dir /var/lib/redis
  [..]
 

5. Download init Script

cd /tmp
wget https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server
 

6. Move and Configure Redis-Server

Note: The redis-server to be moved below is the one downloaded in 5 above.

sudo mv redis-server /etc/init.d
sudo chmod 755 /etc/init.d/redis-server
sudo vim /etc/init.d/redis-server
  redis="/usr/local/bin/redis-server"
 

7. Auto-Enable Redis-Server

sudo chkconfig --add redis-server
sudo chkconfig --level 345 redis-server on
 

8. Start Redis Server

sudo service redis-server start

// Taken from http://codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ and updated.

以上是关于sh 在EC2上安装Redis的主要内容,如果未能解决你的问题,请参考以下文章

sh 在EC2上安装Redis

sh 在新的Ubuntu 14.04 Amazon EC2实例上安装Sentry(http://getsentry.com)+ Redis的基本安装脚本

sh 在EC2上安装TensorFlow

sh 在EC2上安装Spark + Zeppelin

在ec2上安装Open Source Redis服务器时出错

在 AWS EC2 上安装 NPM