Centos installation redis tutorial
yum install gcc-c++
tar -zxvf redis-4.0.12.tar.gz
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
cd /usr/local/src/redis/deps
make hiredis lua jemalloc linenoise
cd /usr/local/src/redis
make
mkdir /usr/local/redis
make install PREFIX=/usr/local/redis
See the instructions above and the installation is successful
cd /usr/local/redis/bin
ls
which redis-server
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
. /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
# 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
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
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
3, Open redisManager
Reference blog
https://blog.csdn.net/wzcyamadie/article/details/101448521
Recommended Posts