补充(只需要三步):
安装环境:
text 代码:yum install -y libtool automake autoconf gcc-c++ openssl-devel
安装redis:
text 代码:yum install -y redis
启动redis:
text 代码:redis-server --daemonize yes
2023之前的安装办法
⒈安装环境gcc-c++和wget
text 代码:yum install -y gcc-c++ wget vim
2.下载Redis
text 代码:mkdir redis
cd redis/
wget http://download.redis.io/releases/redis-7.4.0.tar.gz
2.解压:
text 代码:tar -zxvf redis-7.4.0.tar.gz
3.进入文件
text 代码:cd redis-7.4.0
make
4.安装:
text 代码:make PREFIX=/usr/local/redis install
5.复制redis.conf
text 代码:cp redis.conf /usr/local/redis
6.修改文件
text 代码:vim redis.conf
修改
xml 代码:daemonize no改yes
bind 127.0.0.1改0.0.0.0
requirepass 【password】
7.启动
text 代码:./bin/redis-server ./redis.conf
8.查看
text 代码:ps -ef | grep -i redis
9.停止
text 代码:/usr/local/redis/bin/redis-cli shutdown
10.让redis开机自启
text 代码:vim /etc/rc.local
加入
text 代码:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis-conf
English:
⒈Installation environment gcc-c++and wget
text 代码:yum install -y gcc-c++ wget vim
2.Download Redis
text 代码:mkdir redis
cd redis/
wget http://download.redis.io/releases/redis-7.4.0.tar.gz
2.Decompression:
text 代码:tar -zxvf redis-7.4.0.tar.gz
3.Enter file
text 代码:cd redis-7.4.0
make
4.Install:
text 代码:make PREFIX=/usr/local/redis install
5.Copy redis.conf
text 代码:cp redis.conf /usr/local/redis
6.Modify file
text 代码:vim redis.conf
Modify
xml 代码:daemonize no改yes
bind 127.0.0.1改0.0.0.0
requirepass 【password】
7.firing
text 代码:./bin/redis-server ./redis.conf
8.View
text 代码:ps -ef | grep -i redis
9.Suspend
text 代码:/usr/local/redis/bin/redis-cli shutdown
10.Let Redis boot up automatically
text 代码:vim /etc/rc.local
Join
text 代码:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis-conf