如何在与Ubuntu中默认端口6379不同的端口上启动Redis服务器 [英] How to start redis-server on a different port than the default port 6379 in ubuntu

查看:447
本文介绍了如何在与Ubuntu中默认端口6379不同的端口上启动Redis服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在与Ubuntu中默认端口6379不同的端口上启动Redis服务器

我已按照以下步骤安装Redis

I have used the following steps to install the redis

  1. sudo add-apt-repository ppa:rwky/redis
  2. sudo apt-get更新
  3. sudo apt-get -y安装redis-server

我已经安装了,但是我不知道如何在不同于默认端口6379的其他端口上启动redis-server

I installed, but I don't know how to how to start redis-server on a different port than the default port 6379

因此,请告诉我将默认端口更改为其他端口的步骤?

So kindly tell me the steps to change the default port to different port ?

推荐答案

redis-server --port 6380将启动Redis服务器,监听端口6380.

redis-server --port 6380 will start a Redis server listening to port 6380.

redis-cli -p 6380-在这里也提出了一个建议-不启动Redis服务器监听端口6380 ,但是尝试将CLI连接到(希望运行的)Redis服务器上到该端口.

redis-cli -p 6380 -- a suggestion made here as well -- does not start a Redis server listening to port 6380, but tries to connect the CLI to a (hopefully running) Redis server that listens to that port.

这篇关于如何在与Ubuntu中默认端口6379不同的端口上启动Redis服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆