如何查看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
配置文件中配置密码,该文件的位置取决于您的操作系统。
如何查看redis安装位置