redis安装教程
1、下载redis
wget http://download.redis.io/releases/redis-4.0.9.tar.gz
2、解压
tar xzf redis-4.0.9.tar.gz
3、移动,放到usr/local?录下
sudo mv ./redis-4.0.9 /usr/local/redis/
4、进?redis?录
cd /usr/local/redis/
5、生成
sudo make
6、测试,这段运?时间会较?
make test
出现错误 You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [Makefile:242: test] Error 1
make[1]: Leaving directory ‘/usr/local/redis/src’
make: *** [Makefile:6: test] Error 2
7、安装tcl
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
sudo tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/
cd /usr/local/tcl8.6.1/unix/
sudo ./configure
sudo make
sudo make install
8、安装完tcl,再次make test
9、安装,将redis的命令安装到/usr/local/bin/?录
sudo make install
10、安装完成后,我们进入目录/usr/local/bin中查看
cd /usr/local/bin
ls -all
redis-server redis服务器
redis-cli redis命令行客户端
redis-benchmark redis性能测试工具
redis-check-aof AOF文件修复工具
redis-check-rdb RDB文件检索工具
11、配置?件,移动到/etc/?录下
配置?件?录为 /usr/local/redis/redis.conf
sudo cp /usr/local/redis/redis.conf /etc/redis/
|