我使用以下命令从源代码安装 redid:
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install tcl8.5
cd /usr/local/src
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
cd utils
sudo ./install_server.sh
install_server.sh shell脚本将redis安装为后台守护进程
这些是配置选项:
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
虽然 redid-server 可执行文件位于 $PATH 中,但我无法重新启动服务器:
/etc/init.d/redis-server restart
9908:C 12 Oct 15:52:17.192 # Fatal error, can't open config file '/etc/init.d/redis-server'
我希望能够像系统服务一样控制它。