Redis environment construction
1. Installation dependencies
yum -y install gcc automake autoconf libtool make
2. Upload the installation package
Obtain the installation package and upload it to the /usr/local/src/ directory
3. Unzip
tar -zxvf redis-5.0.4.tar.gz
4. Compile
cd redis-5.0.4
make
5. Installation
make PREFIX=/usr/local/redis install
6. Copy the configuration file
cd /usr/local/redis/bin/
cp /usr/local/src/redis-5.0.4/redis.conf ./
7. Modify the configuration
vi redis.conf
# bind 127.0.0.1 注释掉
bind 0.0.0.0
protected-mode no # 关闭保护模式
8. Start the service
./src/redis-server redis.conf &