deployment and startup of Redis under Linux
- Download installation media
Redis website Address: http://www.redis.io/
Currently the latest version is redis-3.0.3.
can access http://download.redis.io/releases/redis-3.0.3.tar.gz download and use SCP to upload to server,
or download directly:
wget http://download.redis.io/releases/redis-3.0.3.tar.gz
[Email protected]:/data$ tar-zvxf redis-3.0.3.tar.gz
[Email protected]:/data$ CD./redis-3.0.3/
[Email protected]:/data/redis-3.0.3$ make
[Email protected]:/data/redis-3.0.3$ ls
00-releasenotes COPYING Makefile redis.conf runtest-sentinel tests
BUGS deps MANIFESTO runtest sentinel.conf utils
Contributing INSTALL README runtest-cluster src
- Enter the SRC directory to view the executable file
[Email protected]:/data/redis-3.0.3/src$ ls-f | grep "*"
Copy the executable directly to the/usr/bin/directory and execute the program name directly in the post-operation.
CP Redis-benchmark REDIS-CLI redis-server/usr/bin/
Or directly execute the make install command, you can copy the executable file to the/usr/local/bin directory.
Copy the configuration file under the redis-3.0.3 directory to the/etc/directory
CP redis.conf/etc/
You can start Redis by running Redis-server directly.
Redis-server/etc/redis.conf
CTRL + Z switches the service to the background,
Review the process and confirm that Redis is started:
Ps-ef | grep Redis
- Start your own client test Redis
redis-cli
You can use the ping command to test whether the connection is healthy:
Redis> Ping
PONG
The connection will be answered normally.
You can manipulate the data directly:
Redis> Set name Bingyue
Ok
Redis> Get Name
"Bingyue"
Redis may be synchronizing the in-memory data to the hard disk, forcing the process to terminate may result in data loss.
Use the following command to stop Redis:
redis-cli shutdown
Refer to Linux under Redis installation details Linux Redis installation configuration startup script
Deployment and startup notes for Redis under Linux