CentOS installation redis detailed tutorial

CentOS installation redis detailed tutorial

Download address and command

Enter the following directory

cd /usr/local/src/

download command

wget http://download.redis.io/releases/redis-6.0.6.tar.gz

After the download is complete, unzip the downloaded package

tar xzf redis-6.0.6.tar.gz

Then execute the install command

make PREFIX=/usr/local/redis install

The above command specifies that the installation path of redis can be modified according to your own needs. If an error similar to the following is reported,

struct redisServer’没有名为‘server_cpulist’的成员

Just upgrade gcc, the upgrade command is as follows:

yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash

After the command is executed, continue to execute the installation command, and the installation is successful.

configuration

set password

Find the redis.conf file in the reids installation directory. If you can’t find this file, you can find it in the previously decompressed folder, and then find the following content.
#requirepass foobared
Remove the comment, change foobared to your desired password, and
you need to specify it when starting The configuration file needs to be started so that the password will take effect.

Let redis run in the background

Find the redis.conf file in the reids installation directory. If you can’t find this file, you can find it in the previously decompressed folder, and then find the following content. Change no to
daemonize no
yes.
You need to specify the configuration file to start when starting.

Guess you like

Origin blog.csdn.net/javaXiaoAnRan/article/details/107890381