安装redis
1.上传:
2.解压: [hadoop@hadoop1 soft]$ tar -zxvf redis-4.0.10.tar.gz
3.编译安装:
[hadoop@hadoop1 soft]$ cd /opt/soft/redis-4.0.10
[hadoop@hadoop1 redis-4.0.10]$ make
[hadoop@hadoop1 redis-4.0.10]$ make PREFIX=/opt/module/redis install
4.配置redis:
[hadoop@hadoop1 bin]$ cp /opt/soft/redis-4.0.10/redis.conf /opt/module/redis/bin
[hadoop@hadoop1 bin]$ vi redis.conf
//注释掉bind
# bind 127.0.0.1
//设置密码
requirepass 123456
5.配置环境变量:
[hadoop@hadoop1 bin]$ sudo vi /etc/profile
#redis
export REDIS_HOME=/opt/module/redis
export PATH=$REDIS_HOME/bin:$PATH
[hadoop@hadoop1 bin]$ source /etc/profile
6.启动redis:
[hadoop@hadoop1 bin]$ redis-server redis.conf
[hadoop@hadoop1 ~]$ redis-cli
127.0.0.1:6379>