Home > Database > Redis > body text

What is the installation method of Redis6 under Centos7?

WBOY
Release: 2023-06-03 19:19:25
forward
2111 people have browsed it

Installation environment:centos7.9, redis 6.0.8

Nanny-level installation tutorial

1. Download the Redis compressed package from the Internet

wget http://download.redis.io/releases/redis-6.0.8.tar.gz
Copy after login

2. Unzip

tar -xf  redis-6.0.8.tar.gz
Copy after login

3. Enter the decompressed folder

cd redis-6.0.8
Copy after login

4. Compile redis

make#编译redis
Copy after login

If you find that the final compilation fails
What is the installation method of Redis6 under Centos7?
Check the version of gcc
What is the installation method of Redis6 under Centos7?
Execute the following commands in sequence to check gcc Upgrade the version

yum -y install centos-release-scl

yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils

scl enable devtoolset-9 bash#修改环境变量echo "source /opt/rh/devtoolset-9/enable" >> /etc/profile

gcc -v
Copy after login

What is the installation method of Redis6 under Centos7?
Execute the make command again, and find that the compilation is successful

5. Install Redis

mkdir  /usr/local/mysoftwares/redis -p	#创建安装目录make PREFIX=/usr/local/mysoftwares/redis/ install#安装并指定安装目录
Copy after login

Installation successful:
What is the installation method of Redis6 under Centos7?

6. Copy the redis configuration file to the redis installation directory

cp redis.conf /usr/local/mysoftwares/redis/ls /usr/local/mysoftwares/redis/
Copy after login

What is the installation method of Redis6 under Centos7?
7. Switch to the installation directory

cd /usr/local/mysoftwares/redis/
Copy after login

8. Start the project (Method 1: Front Desk Method)

./bin/redis-server redis.conf
Copy after login

What is the installation method of Redis6 under Centos7?
8. Start the project (Method 2:Background method)

Modify the redis.conf file& #xff0c;Change the guard mode to true

vim redis.conf
Copy after login

What is the installation method of Redis6 under Centos7?
What is the installation method of Redis6 under Centos7?

##9. Test
What is the installation method of Redis6 under Centos7?

The above is the detailed content of What is the installation method of Redis6 under Centos7?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!