Redis installation (full version)

1. Check whether the system has installed g++, gcc

rpm -qa | grep gcc-c++

2. Install g++, gcc

2.1. Download and install the rpm package
链接: https://pan.baidu.com/s/1-Muqk_KBzzsEs9MooBeHfw  密码: ercb

Insert picture description here

2.2 Upload to the /opt/gcc directory and install
rpm -Uvh *.rpm --nodeps --force
2.3 Test whether the installation is successful
gcc -v
g++ -v

3. Install redis

3.1 Download and unzip

Insert picture description here

tar xzvf redis-5.0.11.tar.gz -C /opt/redis
3.2 Compile and install
cd /opt/redis/redis-5.0.11
make
make install PREFIX=/opt/redis/redis
3.3 Modify configuration (remote connection)
cp /opt/redis/redis-5.0.11/redis.conf /opt/redis/redis/bin
vi redis.conf

Insert picture description here
Insert picture description here

3.4 Start the redis service (no password, I want to set my own settings, the default port is 6379)
cd /opt/redis/redis/bin
./redis.server redis.conf
./redis.cli

Guess you like

Origin blog.csdn.net/q18729096963/article/details/114031071