Linux Centos7 install redis tutorial

Centos installation redis tutorial

  1. Install gcc compilation software
yum install gcc-c++
  1. Unzip software
tar -zxvf redis-4.0.12.tar.gz
  1. Copy the decompressed file to /usr/local/src
cp -r /root/software/redis-4.0.12/usr/local/src/
Enter the target path, modify the name
cd /usr/local/src/
mv redis-4.0.12  redis
  1. Open /usr/local/src/redis/deps to compile dependencies
cd /usr/local/src/redis/deps
make hiredis lua jemalloc linenoise
  1. Open /usr/local/src/redis to compile
cd /usr/local/src/redis
make
  1. Install the Redis directory above and install it into /usr/local/redis
mkdir /usr/local/redis
make install PREFIX=/usr/local/redis

See the instructions above and the installation is successful

  1. Verify that the installation was successful
cd /usr/local/redis/bin
ls
  1. Use the which command to check if there is a redis service in the system
which redis-server
  1. Move the configuration file to the /root/myredis directory, which can be customized and can be /root/myredis
mkdir /root/myredis
cp /usr/local/src/redis/redis.conf /root/myredis

10 , Start Redis

cd /usr/local/redis/bin
. /redis-server /root/myredis/redis.conf 

11 , By default, Redis is not running in the background, we need to run redis in the background

vi /root/myredis/redis.conf
  1. Start the viewing process again
. /redis-server /usr/myredis/redis.conf 
\# View process
ps -ef|grep redis

13 , Start Redis configuration

vim /etc/rc.local
Join
/usr/local/redis/bin/redis-server /root/myredis/redis-conf

14 , Stop redis

cd /usr/local/redis/bin
. /redis-cli shutdown
# or
pkill redis-server
# View the process again
ps -ef|grep redis
  1. Client link and exit
# connection
cd /usr/local/redis/bin
. /redis-cli default is-h 127.0.0.1-p 6379 
# drop out
quit
ping
PONG

redisManager connects to redis in the virtual machine Centos

  1. vim search function description
Tip: How to search in vim files(After entering the file, do not click i, do not click o, that is, when it remains uneditable):

/Enter the content
 Example: search redis.The letters'bind' in conf
/bind
  1. Open the redis coordination file, you can see where your configuration file is
vi /root/myredis/redis.conf

Search for bind and modify it as follows and comment out the following line.
Search protected-mode,Change to no later
  1. Close redis, restart redis, check whether it is enabled

3, Open redisManager

Reference blog

https://blog.csdn.net/wzcyamadie/article/details/101448521

Recommended Posts

Linux Centos7 install redis tutorial
Centos install MYSQL8.X tutorial
Centos install elasticsearch tutorial
Linux Centos7 install jdk1.8
CentOS (linux) install PostgreSQL
Centos7 install kubernetes tutorial
Centos7 install Mysql8 tutorial
Install redis5.0 in CentOS7
CentOS 7 install Redis 5.0.8 original
Linux CentOS 7 installation tutorial
Centos 7 install JDK (Linux install jdk)
Linux (CentOS7) using RPM to install mysql 8.0.11 tutorial
Know Linux and install CentOS
Install MySQL 8.0.16 on Linux Centos
Install MySQL under Linux (CentOS 7)
vmware install CentOS 7 detailed tutorial
5.1. CentOS@ install JDK1.8 graphic tutorial
CentOS 6.8 under linux install mongodb
CentOS 7 yum install PHP7.3 tutorial
Install Mesos tutorial under CentOS7
1.5 Install Centos7
Minimal install JDK 1.8 tutorial in CentOS 7
CentOS8 install jdk8 / java8 tutorial (recommended)
Linux CentOS 7 install JDK detailed steps
Install MySQL on Linux CentOS7 (Windows)
​Install Oracle database on CentOS Linux
Linux CentOS6 compile and install Pyt
Use VMware15 to install Linux (CentOS6.5)
Install Jenkins on linux centos (non-docker way)
Centos6 install Python2.7.13
Install Redis Sentinel on CentOS6 Single Node
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
Install mysql8.0.13 version under Linux CentOS7 system
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
Linux01 install centOS6.5mini
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6