Baixe o app para aproveitar ainda mais
Prévia do material em texto
Instalação e configuração do Redis - Baixar o pacote do redis (exemplo 4.0.9): http://download.redis.io/releases/redis-4.0.9.tar.gz - Compilação: # tar -xvzf redis-4.0.9.tar.gz # cd redis-4.0.9 # cd deps # make hiredis lua jemalloc linenoise # cd .. # make # make install - Instalação: # cd utils/ # install_server.sh (dar permissão de execução, caso necessário) Welcome to the redis service installer This script will help you easily set up a running redis server Please select the redis port for this instance: [6379] Selecting default: 6379 Please select the redis config file name [/etc/redis/exemplo.conf] Please select the redis log file name [/var/log/redis_exemplo.log] Please select the data directory for this instance [/var/lib/redis/exemplo] Please select the redis executable path [/usr/local/bin/redis-server] Selected config: Port : 6379 Config file : /etc/redis/exemplo.conf Log file : /var/log/redis_exemplo.log Data dir : /var/lib/redis/exemplo Executable : /usr/local/bin/redis-server Cli Executable : /usr/local/bin/redis-cli Is this ok? Then press ENTER to go on or Ctrl-C to abort. Copied /tmp/ctps.conf => /etc/init.d/redis_6379 Installing service... Successfully added to chkconfig! Successfully added to runlevels 345! Starting Redis server... Installation successful! - Comandos (serviço já no setup das máquinas para início com o SO): # service redis_6379 status (pode ser utilizado "ps -ef | grep redis" porque o status às vezes mostra "running" mesmo com o serviço já parado) # service redis_6379 stop # service redis_6379 start # service redis_6379 restart - Verificação das portas: # ss -tanp | grep 6379 LISTEN 0 128 *:6379 *:* users:(("redis-server",8032,5)) LISTEN 0 128 :::6379 :::* users:(("redis-server",8032,4)) - Configuração: /etc/config/exemplo.conf: protected-mode no (padrão yes)
Compartilhar