boss44 发表于 2018-10-21 08:44:02

No SQL 之Redis安装

# mkdir /usr/local/redis3.0.4/etc/ -p  
# mkdir /usr/local/redis3.0.4/bin/ -p
  
# find . -perm 755 -o -perm 775| xargs -i cp {} /usr/local/redis3.0.4/bin/
  
# cd ..
  
# cp redis.conf /usr/local/redis3.0.4/etc/
  
# ls /usr/local/redis3.0.4/{etc,bin}
  
/usr/local/redis3.0.4/bin:
  
mkreleasehdr.shredis-benchmarkredis-check-aofredis-check-dumpredis-cliredis-sentinelredis-serverredis-trib.rb
  

  
/usr/local/redis3.0.4/etc:
  
redis.conf
  
# vim /usr/local/redis3.0.4/etc/redis.conf
  
...
  
################################ GENERAL#####################################
  

  
# By default Redis does not run as a daemon. Use 'yes' if you need it.
  
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
  
daemonize yes      \\默认是no改为yes,这样启动就会在后台运行
  
#daemonize no
  
...
  
:wq            \\保存退出
  
# ln -sv /usr/local/redis3.0.4/bin/* /usr/local/bin/      \\软连接到PATH去,这样就不用输入绝对路径,可以直接使用命令。
  
# redis-                                                   \\瞧见没
  
redis-benchmark   redis-check-aof   redis-check-dumpredis-cli         redis-sentinel    redis-server      redis-trib.rb
  
# redis-server /usr/local/redis3.0.4/etc/redis.conf             \\启动Redis,必须制定配置文件,不然出现如下情况
  
# redis-server
  
12912:C 25 Sep 10:58:42.547 # Warning: 注意这里-->no config file specified, using the default config.
页: [1]
查看完整版本: No SQL 之Redis安装