首页 > 编程知识 正文

redis安装配置,redis配置文件位置

时间:2023-05-04 09:23:42 阅读:219684 作者:2347

如何查看redis安装位置

You can download the latest version of Redis from https://redis.io/download.

您可以从https://redis.io/download下载最新版本的Redis 。

Redis can be installed on any server. In this case we’ll install it locally for testing.

Redis可以安装在任何服务器上。 在这种情况下,我们将其安装在本地进行测试。

On macOS, installation is simpler using Homebrew. Run:

在macOS上,使用Homebrew的安装更简单。 跑:

brew install redis

Then run

然后跑

brew services start redis

to make Redis start automatically, and re-start when the computer reboots.

使Redis自动启动,并在计算机重新启动时重新启动。

You can also start it manually using:

您也可以使用以下命令手动启动它:

redis-server /usr/local/etc/redis.conf

On Linux Ubuntu you’ll need to run

在Linux Ubuntu上,您需要运行

sudo apt-get install redis-server

and Redis will automatically be up and running.

Redis将自动启动并运行。

Once it’s started, Redis listens on port 6379.

一旦启动,Redis将监听端口6379

On a local server it’s fine to keep it running without a password. But when Redis is exposed to the Internet, make sure you configure a password in the redis.conf configuration file, whose location depends on your Operating System.

在本地服务器上,无需输入密码即可使其运行。 但是,当Redis暴露于Internet时,请确保在redis.conf配置文件中配置密码,该文件的位置取决于您的操作系统。

翻译自: https://flaviocopes.com/redis-installation/

如何查看redis安装位置

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。