redis under centos7 installation environment

  A, redis installation

  1. Obtain installation package redis

  wget http://download.redis.io/releases/redis-4.0.6.tar.gz, if not installed wget, install wget: yum -y install wget

  2. Extract the installation package redis

  takes -xzf redis-4.0.6.tar.gz

  3. Establish flexible connections

  ln -s redis-4.0.6.tar.gz

  4.cd redis into the directory, compiled installation make && make install

  Redis can see the executable file 5.cd src directory

  redis-server start Redis server

  redis-cli Redis command line client

  redis-benchmark Redis performance testing tools

  redis-check-aof AOF file to repair the tool

  redis-check-dump on the RDB File Checker tool

  redis-sentinel Sentinel server

 Two, redis in three starts

  1. Start the simplest (the default startup mode)

  Direct execution ./redis-server

  2. Dynamic startup parameters

  redis-server --port 6380

 

 

  3. Start the configuration file (the recommended way)

  redis-server configPath

(Here redis-server /root/redis/redis.conf)

 

 

   Ways of identifying:

  (1) ps -ef | grep Redis

 

 

  (2) netstat -antpl | grip Redis

 

 

  (3)redis-cli -h ip -p port ping

   Finally add redis common configuration

daemonize Whether the daemon
port Redis external port number
logfile Redis system log
to you Redis working directory

Guess you like

Origin www.cnblogs.com/hopeofthevillage/p/11450623.html