数据库
首页 > 数据库> > redis安装及配置

redis安装及配置

作者:互联网

上传

  1.   解压

[hadoop@hadoop1 module]$ tar -zxvf redis-4.0.10.tar.gz

 

 2解压

hadoop@hadoop1 module]$ tar -zxvf redis-4.0.10.tar.gz

[hadoop@hadoop1 redis-4.0.10]$ make

[hadoop@hadoop1 redis-4.0.10]$ make PREFIX=/opt/module/redis install

3配置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

# bind 127.0.0.1 

 

 

 4 配置环境变量

[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

5  启动redis

[hadoop@hadoop1 bin]$ redis-server redis.conf

[hadoop@hadoop1 ~]$ redis-cli

127.0.0.1:6379>

标签:bin,4.0,配置,redis,hadoop,module,hadoop1,安装
来源: https://blog.csdn.net/yuling1023/article/details/121163996