1.安装依赖项
yum install tcl -y
2.下载redis包并安装
wget http://download.redis.io/releases/redis-2.8.17.tar.gz tar -zxvf redis-2.8.17.tar.gz cd redis-2.8.17 make make test
3.启动redis
$ cd src $ ./redis-server
或者用指定配置文件的方式启动
$ cd src $ ./redis-server redis.conf
4.进入客户端
$ cd src $ ./redis-cli redis> set foo bar OK redis> get foo "bar"
时间: 2024-10-13 10:29:57