日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

mac os 开启redis_mac os 命令行安装 启动和停止 redis

發(fā)布時間:2024/9/30 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mac os 开启redis_mac os 命令行安装 启动和停止 redis 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

簡介

Redis時一個開源的非關(guān)系數(shù)據(jù)庫,支持持久化存儲。

安裝

Mac os x下安裝Redis很簡單通過Brew安裝即可。

如果沒有安裝 Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

首先,獲取最新軟件安裝包

brew update

安裝Redis

brew install redis

結(jié)果:

Ahmeds-iMac:~ x-xxx.com$ brew -v

Homebrew 1.2.2

Homebrew/homebrew-core (git revision e82a; last commit 2017-06-05)

Ahmeds-iMac:~ x-xxx.com$ brew install redis

Updating Homebrew...

==> Auto-updated Homebrew!

Updated 2 taps (homebrew/core, josegonzalez/php).

==> Updated Formulae

aws-sdk-cpp gphoto2 sdl_mixer

awscli heroku sdl_sound

bazel josegonzalez/php/wp-cli servus

citus knot svgcleaner

conan knot-resolver termius

docker-machine libgphoto2 vapoursynth

docker-machine-completion makepkg vim

ffmpeg mercurial wpcli-completion

freetds msgpack yara

==> Downloading https://homebrew.bintray.com/bottles/redis-3.2.9.sierra.bottle.t

######################################################################## 100.0%

==> Pouring redis-3.2.9.sierra.bottle.tar.gz

==> Using the sandbox

==> Caveats

To have launchd start redis now and restart at login:

brew services start redis

Or, if you don't want/need a background service you can just run:

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

==> Summary

🍺 /usr/local/Cellar/redis/3.2.9: 13 files, 1.7MB

Ahmeds-iMac:~ x-xxxx.com$ redis-server

4297:C 07 Jun 17:44:26.735 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf

4297:M 07 Jun 17:44:26.736 * Increased maximum number of open files to 10032 (it was originally set to 7168).

_._

_.-``__ ''-._

_.-`` `. `_. ''-._ Redis 3.2.9 (00000000/0) 64 bit

.-`` .-```. ```\/ _.,_ ''-._

( ' , .-` | `, ) Running in standalone mode

|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379

| `-._ `._ / _.-' | PID: 4297

`-._ `-._ `-./ _.-' _.-'

|`-._`-._ `-.__.-' _.-'_.-'|

| `-._`-._ _.-'_.-' | http://redis.io

`-._ `-._`-.__.-'_.-' _.-'

|`-._`-._ `-.__.-' _.-'_.-'|

| `-._`-._ _.-'_.-' |

`-._ `-._`-.__.-'_.-' _.-'

`-._ `-.__.-' _.-'

`-._ _.-'

`-.__.-'

4297:M 07 Jun 17:44:26.737 # Server started, Redis version 3.2.9

4297:M 07 Jun 17:44:26.737 * The server is now ready to accept connections on port 6379

出現(xiàn)上面代碼表示安裝成功了。

那么怎么啟動它呢?

啟動

在終端直接運行命令

redis-server

//Redis 默認(rèn)端口是6379,你也可以換個端口號啟動,

redis-server --port 6380

//使用了肯定需要停止,停止怎么弄呢?

//停止

//執(zhí)行命令

redis-cli shutdown

如有錯誤或問題請留言

總結(jié)

以上是生活随笔為你收集整理的mac os 开启redis_mac os 命令行安装 启动和停止 redis的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。