Linux Redis installation, how to install Redis in Linux, Linux Redis automatic startup, Redis startup

Linux Redis installation, how to install Redis in Linux, Linux Redis automatic startup, Redis startup

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

©Copyright Sweet Potato Yao July 21, 2017

http://fanshuyao.iteye.com/

 

Windows installation, using Redis see:

http://fanshuyao.iteye.com/blog/2324182

 

1. Upload the Redis installation package to a file on the Linux server, and then decompress the Redis installation package

tar xzf redis-3.2.9.tar.gz

 

2. Enter the Redis directory

cd redis-3.2.9

 

3. Compile the original code

Make

 

 

Fourth, create a new directory to store the necessary files for Redis, because there are many things generated by compilation, and it is also messy

mkdir bin

 

5. Copy files

1. Copy the Redis configuration file (redis.conf) to the bin directory. Note: This configuration file is in the Redis root directory.

cp redis.conf /home/java/run/redis-3.2.9/bin/

 

2. Enter the src directory

cd src

 

3. Copy the redis-server file of Redis to the bin directory.

cp  redis-server  /home/java/run/redis-3.2.9/bin/

 

4. Copy the redis-cli file of Redis to the bin directory.

cp redis-cli /home/java/run/redis-3.2.9/bin/

 

5. Copy the redis-benchmark file of Redis to the bin directory.

cp  redis-benchmark  /home/java/run/redis-3.2.9/bin/

 

 

 

6. Re-enter the bin directory

cd  /home/java/run/redis-3.2.9/bin/

 

七、启动Redis服务(前面是有点的),不能关闭这个(不能使用Ctrl+C终止,这样会退出Redis服务的)

./redis-server

 

可以用守护进程的方式运行: ????(这个未测试)

 ./redis-server &

 

八、需要再打开另一个命令窗口启动客户端

1、先进入bin目录

cd  /home/java/run/redis-3.2.9/bin/

 

2、启动客户端命令

./redis-cli

 

3、然后就可以使用Redis命令操作了。

 

 九、Redis自动启动见:

 http://fanshuyao.iteye.com/blog/2386236

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

©Copyright 蕃薯耀 2017年7月21日

http://fanshuyao.iteye.com/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327100635&siteId=291194637