Redis 服務安裝

下載

客戶端可視化工具: RedisDesktopManager
redis官網下載: http://redis.io/download

windos服務安裝

  • windows服務安裝/卸載
  1. 下載文件并解壓
  2. 使用 管理員身份 運行命令行并且切換到解壓目錄
  3. 執行 redis-service --service-install
  4. windows+R 打開運行窗口, 輸入 services.msc 查看是否有 redis 服務
  5. 如果沒有啟動,可以在服務面板中點擊啟動,也可以使用 redis-server --service-start 啟動服務
  6. 想要停止此服務,可以在服務面板中點擊關閉,也可以使用 redis-server --service-stop 停止服務

  • linux服務安裝
  1. 下載源碼包: wget http://download.redis.io/releases/redis-3.2.1.tar.gz

  2. 解壓 源碼包并且移動到 /usr/local/ 目錄中

tar -zxf redis-3.2.1.tar.gzmv redis-3.2.1  /usr/local/redis

為什么移動到這個目錄中? 因為等下需要安裝到這個目錄中

  1. 進入 /usr/local/redis 該目錄中執行安裝命令 make

make 命令執行完后, src目錄下會有 redis-server(服務端) redis-cli(客戶端)

  1. 進入 src 目錄中運行服務端(后臺), 然后使用客戶端來訪問, 看是否能夠啟動成功
cd src
./redis-server  /usr/local/redis/redis-conf &
./redis-cli

/usr/local/redis/redis-conf 是默認的配置文件,可以根據需要修改
如果運行 ./redis-cli 能夠出現 127.0.0.1:6379> 提示符,說明連接成功

  1. 設置 redis 服務為自動啟動
vim /etc/rc.local# 加入這一行
/usr/local/redis/src/redis-server  /usr/local/redis/redis-conf & 

redis 設置密碼

設置密碼后, 重啟服務才能生效

  • 修改配置文件 /usr/local/redis/redis.conf, 找到下面這行去掉注釋并修改
requirepass your_password

PHP 安裝 redis 擴展

  • 下載: http://pecl.php.net/package/redis
  • 解壓該文件進入此目錄
unzip phpredis-php7.zip
cd phpredis7
  • 配置安裝環境(路徑根據自己的實際情況)
./configure --with-php-config=/usr/local/php/bin/php-configmake && make install

編譯安裝成功后,在/usr/local/php/lib/php/extensions/no-debug-zts-20151012 會生成一個 redis.so 的文件

  • 修改php的配置文件
vim /usr/local/etc/php.ini# 大概在 `720` 行左右, 添加這一行配置
extension="redis.so";
  • 重啟 apache 服務
/usr/local/apache2/bin/apachectl restart
  • 使用 phpinfo() 函數來查看是否安裝成功
7942449-a42b65e391c12788.png
擴展安裝成功

客戶端軟件 RedisDesktopManager 的使用

github 地址: https://github.com/uglide/RedisDesktopManager/stargazers

轉載于:https://www.cnblogs.com/liaohui5/p/10581607.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389632.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389632.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389632.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

熊貓數據集_對熊貓數據框使用邏輯比較

熊貓數據集P (tPYTHON) Logical comparisons are used everywhere.邏輯比較隨處可見 。 The Pandas library gives you a lot of different ways that you can compare a DataFrame or Series to other Pandas objects, lists, scalar values, and more. The traditional comp…

初級功能筆試題-1

給我徒弟整理的一些理論性的筆試題,不喜勿噴。(所以沒有答案哈) 1、測試人員返測缺陷時,如果缺陷未修復,把缺陷的狀態置為下列什么狀態()。 2、當驗證被測系統的主要業務流程和功能是否實現時&a…

ansbile--playbook劇本案例

個人博客轉至: www.zhangshoufu.com 通過ansible批量管理三臺服務器,使三臺服務器實現備份,web01、nfs、backup,把web和nfs上的重要文件被分到backup上,主機ip地址分配如下 CharacterIP地址IP地址主機名Rsync--server1…

5938. 找出數組排序后的目標下標

5938. 找出數組排序后的目標下標 給你一個下標從 0 開始的整數數組 nums 以及一個目標元素 target 。 目標下標 是一個滿足 nums[i] target 的下標 i 。 將 nums 按 非遞減 順序排序后,返回由 nums 中目標下標組成的列表。如果不存在目標下標,返回一…

決策樹之前要不要處理缺失值_不要使用這樣的決策樹

決策樹之前要不要處理缺失值As one of the most popular classic machine learning algorithm, the Decision Tree is much more intuitive than the others for its explainability. In one of my previous article, I have introduced the basic idea and mechanism of a Dec…

說說 C 語言中的變量與算術表達式

我們先來寫一個程序&#xff0c;打印英里與公里之間的對應關系表。公式&#xff1a;1 mile1.61 km 程序如下&#xff1a; #include <stdio.h>/* print Mile to Kilometre table*/ main() {float mile, kilometre;int lower 0;//lower limitint upper 1000;//upper limi…

gl3520 gl3510_帶有gl gl本機的跨平臺地理空間可視化

gl3520 gl3510Editor’s note: Today’s post is by Ib Green, CTO, and Ilija Puaca, Founding Engineer, both at Unfolded, an “open core” company that builds products and services on the open source deck.gl / vis.gl technology stack, and is also a major contr…

uiautomator +python 安卓UI自動化嘗試

使用方法基本說明&#xff1a;https://www.cnblogs.com/mliangchen/p/5114149.html&#xff0c;https://blog.csdn.net/Eugene_3972/article/details/76629066 環境準備&#xff1a;https://www.cnblogs.com/keeptheminutes/p/7083816.html 簡單實例 1.自動化安裝與卸載 &#…

5922. 統計出現過一次的公共字符串

5922. 統計出現過一次的公共字符串 給你兩個字符串數組 words1 和 words2 &#xff0c;請你返回在兩個字符串數組中 都恰好出現一次 的字符串的數目。 示例 1&#xff1a;輸入&#xff1a;words1 ["leetcode","is","amazing","as",&…

Python+Appium尋找藍牙/wifi匹配

前言&#xff1a; 此篇是介紹怎么去尋找藍牙&#xff0c;進行匹配。主要2個問題點&#xff1a; 1.在不同環境下&#xff0c;搜索到的藍牙數量有變 2.在不同環境下&#xff0c;搜索到的藍牙排序會變 簡單思路&#xff1a; 將搜索出來的藍牙名字添加到一個list去&#xff0c;然后…

power bi中的切片器_在Power Bi中顯示選定的切片器

power bi中的切片器Just recently, while presenting my session: “Magnificent 7 — Simple tricks to boost your Power BI Development” at the New Stars of Data conference, one of the questions I’ve received was:就在最近&#xff0c;在“新數據之星”會議上介紹我…

字符串匹配 sunday算法

#include"iostream" #include"string.h" using namespace std;//BF算法 int strfind(char *s1,char *s2,int pos){int len1 strlen(s1);int len2 strlen(s2);int i pos - 1,j 0;while(j < len2){if(s1[i j] s2[j]){j;}else{i;j 0;}}if(j len2){…

5939. 半徑為 k 的子數組平均值

5939. 半徑為 k 的子數組平均值 給你一個下標從 0 開始的數組 nums &#xff0c;數組中有 n 個整數&#xff0c;另給你一個整數 k 。 半徑為 k 的子數組平均值 是指&#xff1a;nums 中一個以下標 i 為 中心 且 半徑 為 k 的子數組中所有元素的平均值&#xff0c;即下標在 i …

Adobe After Effects CS6 操作記錄

安裝 After Effects CS6 在Mac OS 10.12.5 上無法直接安裝, 需要瀏覽到安裝的執行文件后才能進行 https://helpx.adobe.com/creative-cloud/kb/install-creative-suite-mac-os-sierra.html , 但是即使安裝成功, 也不能正常啟動, 會報"You can’t use this version of the …

數據庫邏輯刪除的sql語句_通過數據庫的眼睛查詢sql的邏輯流程

數據庫邏輯刪除的sql語句Structured Query Language (SQL) is famously known as the romance language of data. Even thinking of extracting the single correct answer from terabytes of relational data seems a little overwhelming. So understanding the logical flow…

好用的模塊

import requests# 1、發get請求urlhttp://api.xxx.xx/api/user/sxx_infodata{stu_name:xxx}reqrequests.get(url,paramsdata) #發get請求print(req.json()) #字典print(req.text) #string,json串# 返回的都是什么# 返回的類型是什么# 中文的好使嗎# 2、發請求posturlhttp://api…

5940. 從數組中移除最大值和最小值

5940. 從數組中移除最大值和最小值 給你一個下標從 0 開始的數組 nums &#xff0c;數組由若干 互不相同 的整數組成。 nums 中有一個值最小的元素和一個值最大的元素。分別稱為 最小值 和 最大值 。你的目標是從數組中移除這兩個元素。 一次 刪除 操作定義為從數組的 前面 …

BZOJ4127Abs——樹鏈剖分+線段樹

題目描述 給定一棵樹,設計數據結構支持以下操作 1 u v d  表示將路徑 (u,v) 加d 2 u v 表示詢問路徑 (u,v) 上點權絕對值的和 輸入 第一行兩個整數n和m&#xff0c;表示結點個數和操作數接下來一行n個整數a_i,表示點i的權值接下來n-1行,每行兩個整數u,v表示存在一條(u,v)的…

數據挖掘流程_數據流挖掘

數據挖掘流程1-簡介 (1- Introduction) The fact that the pace of technological change is at its peak, Silicon Valley is also introducing new challenges that need to be tackled via new and efficient ways. Continuous research is being carried out to improve th…

北門外的小吃街才是我的大學食堂

學校北門外的那些小吃攤&#xff0c;陪我度過了漫長的大學四年。 細數下來&#xff0c;我最懷念的是…… &#xff08;1&#xff09;烤雞翅 吸引指數&#xff1a;★★★★★ 必殺技&#xff1a;酥流油 烤雞翅有蜂蜜味、香辣味、孜然味……最愛店家獨創的秘制雞翅。雞翅的外皮被…