执行安装命令
make install
提示:
- cd src && make install
- make[1]: Entering directory `/opt/redis-2.8.13/src'
- Hint: To run 'make test' is a good idea ;)
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL install
- make[1]: Leaving directory `/opt/redis-2.8.13/src'
提示:
- Hint: To run 'make test' is a good idea ;)
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL install
- INSTALL instal
提示:
- You need tcl 8.5 or newer in order to run the Redis test
- make: *** [test] Error 1
也可以使用:yum install tcl 命令安装
后来经搜索发现不需要安装,直接到src目录下执行 ./redis-server 就可以
可以使用类似 ./redis-server /path/to/redis.conf 命令指定配置文件;
Server started, Redis version 2.8.13
The server is now ready to accept connections on port 6379
服务启动成功,服务已经在6379端口上监听连接请求。
你可以使用内置的客户端连接Redis:http://www.redis.cn/download.html
- $ src/redis-cli
- redis> set foo bar
- OK
- redis> get foo
- "bar"
注意事项:
要远程访问它,还需要开启防火墙端口,
要保持服务的运行可以直接关闭终端窗口,但不要使用Ctrl+C,这样会使程序退出。
原文来自:http://blog.csdn.net/testcs_dn/article/details/39756477