$ wget http://download.redis.io/redis-stable.tar.gz $ tar xvzf redis-stable.tar.gz //这里假设解压缩到/usr/local/redis $ cd redis-stable $ make $ make test $ sudo make install $ sudo cp ./src/redis-server /usr/local/bin/ $ sudo cp ./src/redis-cli /usr/local/bin/ $ sudo cp redis.conf /etc/redis.conf $ sudo vi /etc/redis.conf
$cd utils $sudo ./install_server.sh
Please select the redis port for this instance:
[6379]
Selecting default: 6379
Please select the
redis config file name [/etc/redis/6379.conf]
Selected default -
/etc/redis/6379.conf
Please select the redis log file name
[/var/log/redis_6379.log]
Selected default -
/var/log/redis_6379.log
Please select the data directory for
this instance [/var/lib/redis/6379]
make test报错:
You need tcl 8.5 or newer in order to
run the Redis test make : *** [ test ] Error
1 |
解决办法:安装tcl
$ wget http://downloads.sourceforge.net/tcl/tcl8.6.0-src.tar.gz $ cd tcl8.6.0/ $ cd unix && ./configure --prefix=/usr --mandir=/usr/share/man --without-tzdata $([ $(uname -m) = x86_64 ] && echo --enable-64bit) && make && sed -e "s@^\(TCL_SRC_DIR=‘\).*@\1/usr/include‘@" -e "/TCL_B/s@=‘\(-L\)\?.*unix@=‘\1/usr/lib@" -i tclConfig.sh $ make install && make install-private-headers && ln -v -sf tclsh8.6 /usr/bin/tclsh && chmod -v 755 /usr/lib/libtcl8.6.so
原文:http://www.cnblogs.com/caipanjin/p/3525711.html