The article directories

  • Writing in the front
  • Summary of Redis
  • Windows installation
  • Linux installation

Writing in the front


Summary of Redis


What is Redis? Redis (Remote Dictionary Server) is an open source, network-enabled, memory-based and persistent logging, key-value database written in ANSI C language, and provides multiple language APIS. Is one of NoSql, also known as structured database. IO/Chinese official website :www.redis.cn/



Redis application

  1. Memory storage and persistence
  2. The cache
  3. The session server
  4. A distributed lock
  5. Message queue (publish subscribe system)
  6. Timers, counters (traffic)
  7. Leaderboards, likes, check-ins and other apps

Windows installation


First of all, Windows deployment is officially not recommended, it is maintained by Microsoft, so the version will be much behind Linux.

  1. Go to Github to download the latest version and select the zip package

    Download address:Github.com/microsoftar…

  2. unzip

  3. Double-click to run the service

  4. Open client connection to Redis(leave service open)

Redis is now deployed successfully, Windows is still simple (whisper bb)

Linux installation


(you can also install pagoda one key fool)

  1. towebsiteDownload the latest version

  2. Upload files using Xftp (/opt)

  3. unzip
cd /opt Switch to the upload directory
ls # check
tar -zxvf redis- 6.0.6.tar.gz # decompression
Copy the code



  1. Basic environment installation
Run the following commands in sequence
Install the GCC package
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
# upgrade GCC
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
# installed Redis
cd /opt/redis- 6.0.6
make
cd ./src
make install
Copy the code

Answer Y to the question



  1. Opening the installation directory
Default installation path /usr
cd /usr/local/bin
Copy the code

I saw the newly installed Redis

  1. Copy the Redis configuration file to the current directory
mkdir configs Create a directory first
cp /opt/redis- 6.0.6/redis.conf configs # copy
Copy the code

  1. Change the configuration file to default background startup
vim redis.conf # Enter edit
:wq # exit
Copy the code

At line 222, change no to yes

  1. Start the Redis service
cd /usr/local/bin
redis-server configs/redis.conf
Copy the code

  1. Client connection
redis-cli -p 6379
Copy the code

  1. View processes and close
ps -ef|grep redis Filter the Redis process
shutdown # End process
exit # exit
Copy the code

Create a session. 2 View the process



End the process in session 1 and exit (or kill)



The process is closed again

Original is not easy, please do not reprint (this is not rich visits add insult to injury) blogger home page: blog.csdn.net/qq_45034708 If the article is helpful to you, remember to focus on the likes collection ❤