1 redis 在 Linux 下的安装
Download, extract and compile Redis with:
$ wget http://download.redis.io/releases/redis-5.0.3.tar.gz
$ tar xzf redis-5.0.3.tar.gz
$ cd redis-5.0.3
$ make
到目前为止都比较顺利,但我们还需要安装它。
ubuntu@VM-0-6-ubuntu:~/tool/redis-5.0.3/src$ sudo make install
Hint: It's a good idea to run 'make test' ;)
INSTALL install
install: cannot create regular file '/usr/local/bin/redis-server': Permission denied
Makefile:306: recipe for target 'install' failed
make: *** [install] Error 1
ubuntu@VM-0-6-ubuntu:~/tool/redis-5.0.3/src$ make test
You need tcl 8.5 or newer in order to run the Redis test
Makefile:262: recipe for target 'test' failed
make: *** [test] Error 1
安装 tcl 8.5
官方安装方式,https://pkgs.org/download/tcl :
Update the package index:
# sudo apt-get update
Install tcl deb package:
# sudo apt-get install 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
完成 redis 剩余安装
$ make test
$ sudo make install