当前位置:网站首页>Redis7.0 installation steps

Redis7.0 installation steps

2022-06-26 01:51:00 Maple Leaf sprite s

1. download redis

Connect xftp take redis.gz Upload the file to linux in /opt Under the folder

  1. download xshell and xftp(https://www.xshell.com/zh/free-for-home-school/)

  2. see linux Of ip Address

   # see ip Address 
   $ ifconfig
  1. Connect linux And xftp
    If connected xftp Failure , You can restart the network card and reconnect

  2. take radis Upload the compressed package to linux On
    take redis.gz Folder of to linux Of /opt Under the folder

2. install gcc

$ yum install gcc

3. Get into /opt Unzip the folder

$ cd /opt

 Insert picture description here

$ tar -zxvf redis-7.0.0.tar.gz

4. Get into redis Directory for installation

cd redis-7.0.0
$ make
$ make install

Default installation directory /usr/local/bin
The contents of the installation are

  1. redis-benchmark : Performance testing tools , It can run in its own essence , Look at the performance of your book
  2. redis-check-rdb: Fix the problem dump.rdb file
  3. redis-sentinel:Redis Cluster use
  4. redis-check-aof: Fix the problem AOF file
  5. redis-cli: client , Operation entrance
  6. redis-server:Redis Server start command

5. Background start redis

The first time it starts , To perform 1 and 2, Then start direct execution 3 and 4.

1. Get into redis The catalog of
take redis.conf Copied to the /etc

cp redis.conf /etc/redis.conf

2. Get into /etc/redis.conf
modify redis.conf Of daemonize take no Change it to yes

vim /etc/redis.conf

 Insert picture description here

3. start-up redis, If you can't start it directly, enter /usr/local/bin start-up

$ redis-server /etc/redis.conf

5. Connect redis

$ redis-cli

6. close

shutdown # Direct execution 
 perhaps 
$ ps -ef | grep redis  # see PID
$ kill -9 PID #PID: process ID
原网站

版权声明
本文为[Maple Leaf sprite s]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260005166614.html