First step: Download, install
1[Email protected]:/# wget http://download.redis.io/releases/redis-2.8. A. tar.gz2[Email protected]:/# tar xzf redis-2.8. A. tar.gz3[Email protected]:/home# cd redis-2.8. A4[Email protected]:/home/redis-2.8. A# ls5 xx-releasenotes contributing Deps INSTALL MANIFESTO redis.conf runtest-Sentinel src utils6 BUGS COPYING dump.rdb Makefile README runtest sentinel.conf tests7[Email protected] redis-2.8. A]# make prefix=/usr/bin #安装到指定文件夹8[Email protected] redis-2.8. A]#./usr/bin/redisd-server #这是带界面的启动
Step Two: Modify the configuration file (optional)
Redis configuration files are stored in the redis.conf
# Redis is not run as a daemon by default, and if you want it to run in the background, you can change it to Yes. # When Redis runs as a daemon, it writes a PID into the/var/run/redis.pid file.
Daemonize No
In this way, there will be no background interface, of course, when the boot needs to add a configuration file, as follows:
[Email protected]:/home/redis-2.8. src/redis-server redis.conf #带配置文件的启动, if there is no configuration file, the Demo[email protected] will appear:/home/redis- 2.8. # redis-cli shutdown #关闭redis-server
Note: For the background management more convenient
You can choose to place the classification type. Executable program in/usr/bin/, library file in/usr/lib/, config file in/usr/local/, run program generated configuration file under Home folder is hidden.
This placement facilitates system administration and use. When you want to run a program or programmatically specify a dynamic public library, you can go directly to it, without having to set up a bunch of directories or copy several for different programs.
Redis usage log (i) installation, commissioning