mac系統下 安裝 redis
安裝方式是基於brew的,所以先要確保系統已經安裝brew
1.安裝redis
brew install redis
2.建立連結並新增到開機啟動
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
3.啟動服務
執行完後服務一般就已經啟動
如果自己啟動的話執行命令:
redis-server
4.客戶連結測試
執行
redis-cli
結果:
MacBook-Pro:Cellar$ redis-cli
127.0.0.1:6379>set aa 'a'
OK
127.0.0.1:6379> get aa
"a"
127.0.0.1:6379> del aa
(integer) 1
OK,安裝完畢
python安裝redis庫
說明:
mac系統預設是自帶了python的,但是沒安裝pip,所以安裝一下pip:
sudo easy_install pip
這時會把pip也安裝上去了
可以在命令後執行pip看安裝成功沒
MacBook-Pro:local$ pip
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring
environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form
[user:[email protected]]proxy.server:port.
--retries <retries> Maximum number of retries each connection should
attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup.
--trusted-host <hostname> Mark this host as trusted, even though it does
not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file
containing the private key and the certificate
in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
安裝redis python庫:
sudo pip install redis
測試一下:
MacBook-Pro:~ $ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import redis
>>>
沒有報錯,redis庫安裝成功
來段測試程式碼:
>>> import redis
>>> conn=redis.Redis()
>>> conn.set('a','hello,world')
True
>>> conn.get('a')
'hello,world'
>>>
相關推薦
mac系統下 安裝 redis
安裝方式是基於brew的,所以先要確保系統已經安裝brew 1.安裝redis brew install redis 2.建立連結並新增到開機啟動 ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Mac系統下安裝ipython分別支持python2和python3
python cnblogs rip fff tro -c 我們 usr sta 操作系統:Mac10.11.5 python2.7.13 python3.6.1 安裝python2: brew install python 安裝python3: brew in
在linux系統下安裝redis
官網 linu .tar.gz foo pre set inux linux系統 nbsp 去官網找到合適的版本,可以直接下載下來,再用fxp上傳,也可以直接以下面這種方式下載:$ wget http://download.redis.io/releases/redis-3
windows64系統下安裝 redis服務 (詳細)
sta 保存數據 card class 再看 exe track ttl -c Linux下Redis安裝鏈接 : 轉到 redis是一個key-value存儲系統。和Memcached類似,它支持存儲的value類型相對更多,包括string(字符串)、list
linux系統下安裝redis以及java調用redis
.gz sql 遠程連接 tar 必須 -- 外鍵 onf ++ 關系型數據庫:MySQL Oracle 非關系型數據庫:Redis 去掉主外鍵等關系數據庫的關系性特性 1)安裝redis編譯的c環境,yum install gcc-c++ 2)將redis-2.
mac系統下安裝、啟動、停止mongodb
src lin onf lis with nod 其他 文字 ans 一. 下載nodejs,安裝,一直到 node -v顯示版本號,表示安裝成功。 二. 本文主要講解,安裝包方式安裝 mongodb,至於其他方式不做介紹。 下載Mongodb後,將Mongodb-3.2.
liunx系統下安裝redis
logfile alloc 修改內容 exist edi 目錄 設置 ppi pin 1.下載redis安裝包(我這裏用的是redis-3.2.1.tar.gz) 2.將redis安裝包放到/tmp 目錄下 3.解壓redis安裝包 tar xf redis-3.2.1.t
Window系統下安裝Redis
下載Redis Redis官網只提供Linux版本,Windows版本只能去GitHub上下載 Redis官網下載地址:http://redis.io/download GitHub下載地址:https://github.com/MSOpenTech/redis/tags 安裝Redis 建立r
Redis(1)-----初識Redis-----windows,linux系統下安裝Redis及其視覺化工具RedisDesktopManager配置
一,windows系統 1.1,安裝 要安裝Redis,首先要獲取安裝包。 Windows的Redis安裝包需要到以下GitHub連結找到。 連結:https://github.com/MSOpenTech/redis 開啟網站後,找到Release,點選前往下載頁面。  
Windows7系統下安裝redis的操作教程
版權宣告:本文為博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/matiantian666/article/details/55048282 redis是一個key-value儲存系統,和Memcached等儲存系統類似,它可以在
第三章Mac系統下安裝Vue-cli詳細步驟
第三章Vue-cli安裝 因為是mac系統,所以和視訊里老師講的有些許不同。 1.首先開啟終端 按照老師的操作,首先檢查node版本 下面是我的操作 開啟終端,輸入命令 node -v 我去,找不到node。。。。。 好吧,去這個地方下載mac
Linux系統下安裝Redis資料庫
安裝Redis步驟: 1、下載Redis安裝包 https://redis.io/download 版本:redis-5.0.3-tar-gz 2、將下載的redis-5.0.3-tar-
CentOS系統下安裝Redis圖文教程
一、Redis安裝 Redis是C語言開發的,安裝Redis需要C語言的環境,如果你的linux系統沒有安裝介面,那麼就需要線上安裝C語言環境。這裡測試使用的系統是CentOS6.4,安裝了系統介面。如果你是命令列版本的CentOS,那麼需要使用以下命令安裝C語言環境。
針對mac系統下安裝ipython時出現的OSError的解決方案
這幾天學Python時,被人推薦去下載ipython,於是參考了網上得到如下方法: $ sudo pip install ipython --upgrade --ignore-installed six 本人Mac系統為Sierra,多次嘗試後總是出現這樣
Mac系統下安裝PIL
安裝PIL依賴JPEG、Freetype、LittleCMS, 首先安裝這三個環境(第一至三步): 第一步:安裝JPEG $ tar zxvf jpegsrc.v8.tar.gz $ cd jpeg* $ ./configure --enable-shared
Window 7 系統下安裝Redis
-->2.下載後解壓檔案到本地,這裡我解壓到D盤 -->3.開啟Redis伺服器:開啟cmd命令列視窗,使用cd命令切換目錄到D:\RedisOfProject 執行 redis-ser
5.Mac 系統下安裝 IntelliJ IDEA
Mac 系統下安裝 IntelliJ IDEA 系統要求 系統支援:Mac OS X 10.5 以上JDK 版本:Apple Java 6 或 Oracle Java 7 以上記憶體:最低要求 1 G,推薦 2 G 以上硬碟:最低要求 2 G顯示器:最低要求 1024
解決Linux系統下安裝redis make出錯的問題
主要問題 collect2: ld 返回 1 make[1]: *** [redis-server] 錯誤 1 make[1]: Leaving directory `/usr/local/redis-3.0. 解決方法 : make +引數 CFLAGS="-
Mac系統下安裝ant
當你還鬱悶如何設定環境變數設定ant在mac下的部署時候,一大堆的複雜問題都來了,這裡有一個簡易方法來快速設定,我們選擇安裝了brew來安裝ant,可以輕鬆解決問題;讓mac也能擁有apt-get類似的功能-brew:之前一直懷念ubuntu下的apt-get,因為實在是方便
mac系統下如何安裝win7虛擬機?
mac系統下安裝win7虛擬機 arallels Desktop for Mac mac系統下安裝win7虛擬機?運行Parallels Desktop for Mac,進入“新建虛擬機”向導,提供兩種系統安裝模式:“安裝Windows或其它操作系統”或“從PC遷移Windows”,這裏選擇“安