当前位置:网站首页>Install redis from zero

Install redis from zero

2022-07-07 02:50:00 skyline_ wx

install

  1. Get into Redis Official website https://redis.io/
     Insert picture description here
  2. Click on Get Start, Enter the boot page
     Insert picture description here
  3. Click on Install Redis from Source
     Insert picture description here
  4. If you want to install the latest stable version , Then directly execute the following commands
    wget https://download.redis.io/redis-stable.tar.gz
    
  5. If you want to install a specific version , Then you can check the download links of all stable versions here https://github.com/redis/redis-hashes Insert picture description here
  6. I have installed Redis 6.x Last version of
     Insert picture description here
  7. After the download , Execute the unzip command tar -xzvf redis-6.2.7.tar.gz
  8. Switch to redis-6.2.7 Next , perform make
  9. If an error is reported , It may be gcc No installation
     Insert picture description here
  10. install gcc yum install gcc
  11. After installation , Re execution make, If the following error occurs , Change to make MALLOC=libc
     Insert picture description here
  12. If make success , Then we should be able to src In the directory redis-server and redis-cli These two documents
     Insert picture description here
  13. Only this and nothing more , We can already use redis-server To start up rRedis 了 . But if you want to put Redis The installation to /usr/local/bin Next , That still needs to be implemented make install
     Insert picture description here
  14. Try using the command redis-server start-up Redis, After execution , Seeing this page means that the startup is successful
     Insert picture description here
  15. Use ctrl+c To stop Redis
     Insert picture description here

Redis Common configuration modification

  1. Set up Redis Allow outside ip visit . Comment out bind 127.0.0.1 -::1 Or set up bind * -::*
     Insert picture description here

  2. Set the password . stay requirepass Just write the password you need on the back
     Insert picture description here

  3. Set up running in the background . take daemonize Set to yes
     Insert picture description here

  4. Start with a file redis.redis-server redis.conf
     Insert picture description here

Using tool links Redis

 Insert picture description here
If the connection fails , You can turn off the firewall and try again

systemctl stop firewalld.service

stop it Redis

redis-cli -h 127.0.0.1 -p 6379 -a foobared shutdown 
原网站

版权声明
本文为[skyline_ wx]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207061910475460.html