NOTE
1.2 Redis Installation
Install Redis from source, configure the core settings, and start a local instance.
This is a historical learning note and may contain outdated or incomplete understanding.
1. Install from Source
- Download the source code
- Install development-environment packages
sudo apt-get install build-essential tcl ruby rubygems
- Compile
cd src
make MALLOC=libc
- Install
- redis*
make install PREFIX=<USER_HOME>/software/redis/redis0
mkdir -p redis0/{conf,data,log}
cp src/redis-trib.rb <USER_HOME>/software/redis/redis0/bin/
cp redis-5.0.8/*.conf redis0/conf/
-
Configure
- Back up the configuration and remove comments
mv redis.conf redis_bak.conf cat redis_bak.conf | grep -v "#" | grep -v "^$" > redis.conf- The most important configuration
daemonize yes bind 127.0.0.1 port 6379 dir "<USER_HOME>/software/redis/redis0/data" logfile "<USER_HOME>/software/redis/redis0/log/6379.log" -
Start and test
bin/redis-server conf/redis.conf
bin/redis-cli -p 6379
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub