Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

Redis

  • Redis download address: download. Redis. IO/releases /
/ root @ localhost ~ # CD/opt/root @ localhost ~ # wget HTTP: / / http://download.redis.io/releases/redis-6.0.5.tar.gz For example, redis 6.0 will generate errors when compiled. The network says it is gc--c++ dependencies will also need to be upgraded. For production or other environment deployments, both versions are 4.xCopy the code
  • Tar decompress redis, and then go to the decompression directory make to compile
  • Make install PREFIX=/usr/local/redis
  • Conf file to the /usr/local/redis installation directory
  • Start the redis service:./redis-server.. /redis.conf, this is front-end startup, and then can’t do anything else
Nohuo background start redis service NULL >2$>1 &Copy the code
  • Redis. conf, change daemonize no to daemonize yes, save the configuration and exit.
    • /redis-server redis.conf is run in the background
  • To stop the Redis service, usually the kill process is used
    • To stop the service, run the following command:./redis-cli shutdown
    • Stop the service with password: redis-cli -a 123456 shutdown
  • Set the redis password
Temporary password, redis-cli client to enter the service: config get requirepass 123456 Auth 123456 is required to verify the password every time you enter the service. Modify the redis. Conf configuration file to remove the requirepass comment. Requirepass 123456 and restart the Redis serviceCopy the code
  • To connect to redis remotely, comment bind 1270.0.0.1 in the redis

zookeeper

The Dubbo service registry address is zK serviceCopy the code
  • Download address: mirror.bit.edu.cn/apache/zook…
[root@localhost ~ ]# cd /opt [root@localhost ~ ]# wget Tips: http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz have bin installation file is free installationCopy the code
  • Tar ZXVF Decompress the file and copy it to another directory: cp -r zookeeper-* /usr/local/zookeeper
  • CFG zoo_default.cfg zoo.cfg in the conf directory
  • Modify the configuration file zoo.cfg
DataDir = dataLogDir= Notice You are advised to save the two directories in the TMP temporary directoryCopy the code
  • To start the service, run the following command: zkserver. sh start The default configuration file path is.. /conf/zoo.cfg
  • Stop: stop, status: status, restart: restart command operations