Part I: Installing Redis
Want to install Redis to this directory
/usr/local/redis
You want to download the installation package to this directory
/usr/local/src
The installation process instructions are as follows:
Mkdir/usr/local/redis
Cd/usr/local/src
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz #将已经下载好的文件压缩包放到指定的目录
Tar xzf redis-2.6.14.tar.gz #解压缩文件包
Ln-s redis-2.6.14 Redis #建立一个链接
CD Redis
Make Prefix=/usr/local/redis Install #安装到指定目录中
CP redis.conf/usr/local/redis/etc/#将redis的配置文件移动到指定的目录
Note the last line above, we specified the installed directory through prefix. If make fails,
In general, GCC is not installed in your system, so you can install it via yum:
Yum install GCC #安装完成后 and continue with make.
After you have successfully installed Redis, you will be able to see a bin directory in/usr/local/redis,
The following documents are included:
Redis-benchmark
Redis-check-aof
Redis-check-dump
Redis-cli
Redis-server
#Redis默认不是以守护进程的方式运行, you can enable the daemon with Yes by modifying the configuration item
Last modified redis.conf change daemonize No to daemonize Yes
./redis-server/usr/local/redis/etc/redis.conf #运行redis (Boot configuration)
Turn off Redis
REDIS-CLI shutdown
Redis-cli-p 6379 shutdown
Ps-ef | grep Redis #查看redis的进程是否启动了
NETSTAT-TUNPL | grep 6379 #查看此端口的运行情况
Installation of Redis under Linux