1、安装wget
yum -y install wget
2、/opt路径下下载redis
wget http://download.redis.io/releases/redis-6.2.1.tar.gz
3、安装gcc
yum install gcc
gcc --version
4、解压redis包
tar -zxvf redis-6.2.1.tar.gz
5、cd redis-6.2.1/下,执行make编译成C
6、执行make install,安装完成
7、默认安装位置
/usr/local/bin
8、基本使用(配置后台启动)
/opt/redis-6.2.1/redis.conf
复制配置文件
cp redis.conf /etc/redis.conf
编辑/etc/redis.conf
daemonize no修改为yes
启动
cd /usr/local/bin
./redis-server /etc/redis.conf
查看redis状态
ps -ef|grep redis
通过客户端连接redis
./redis-cli
127.0.0.1:6379> ping 打印pong表示联通状态正常
关闭
127.0.0.1:6379> shutdown
或
kill -9 <进程号>
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。