File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848* Maven 安装和配置:| [ CODES] ( codes/deploy/tool/maven ) | [ DOCS] ( docs/deploy/tool/maven/install-maven.md ) |
4949* Nginx 安装和配置:| [ CODES] ( codes/deploy/tool/nginx ) | [ DOCS] ( docs/deploy/tool/nginx/install-nginx.md ) |
5050* Nodejs 安装和配置:| [ CODES] ( codes/deploy/tool/nodejs ) | [ DOCS] ( docs/deploy/tool/nodejs/install-nodejs.md ) |
51+ * Redis 安装和配置:| [ CODES] ( codes/deploy/tool/redis ) | [ DOCS] ( docs/deploy/tool/redis/install-redis.md ) |
Original file line number Diff line number Diff line change 1+ # 安装 Redis
2+
3+ 使用方法:
4+
5+ ``` sh
6+ wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/redis/install-redis.sh
7+ chmod -R 777 install-redis.sh
8+ ./install-redis.sh
9+ ```
10+
11+ 脚本会下载解压 redis 到 ` /opt/software/redis ` 路径下。
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- echo -e " \n>>>>>>>>> install redis"
3+ # ##################################################################################
4+ # 安装 Redis 脚本
5+ # 适用于所有 linux 发行版本。
6+ # Author: Zhang Peng
7+ # ##################################################################################
48
5- mkdir -p /opt/software/redis
6- cd /opt/software/redis
9+ echo -e " \n>>>>>>>>> install redis"
710
11+ # 下载并解压 redis
12+ root=/opt/software/redis
813version=4.0.8
9- wget http://download.redis.io/releases/redis-${version} .tar.gz
10- tar -zxvf redis-${version} .tar.gz
14+ mkdir -p ${root}
15+ wget -O ${root} /redis-${version} .tar.gz http://download.redis.io/releases/redis-${version} .tar.gz
16+ cd ${root}
17+ tar zxvf redis-${version} .tar.gz
18+
19+ # 编译
1120cd redis-${version}
1221make
Original file line number Diff line number Diff line change 1+ # Redis 安装
2+
3+ ## 安装
4+
5+ 安装步骤如下:
6+
7+ (1)下载并解压到本地
8+
9+ 进入官网下载地址:https://redis.io/download ,选择合适的版本下载。
10+
11+ 我选择的是最新稳定版本 4.0.8:http://download.redis.io/releases/redis-4.0.8.tar.gz
12+
13+ 我个人喜欢存放在:` /opt/software/redis `
14+
15+ ```
16+ wget -O /opt/software/redis/redis-4.0.8.tar.gz http://download.redis.io/releases/redis-4.0.8.tar.gz
17+ cd /opt/software/redis
18+ tar zxvf redis-4.0.8.tar.gz
19+ ```
20+
21+ (2)编译安装
22+
23+ 执行以下命令:
24+
25+ ```
26+ cd /opt/software/redis/redis-4.0.8
27+ make
28+ ```
29+
30+ ## 启动
31+
32+ ** 启动 redis 服务**
33+
34+ ```
35+ cd /opt/software/redis/redis-4.0.8/src
36+ ./redis-server
37+ ```
38+
39+ ** 启动 redis 客户端**
40+
41+ ```
42+ cd /opt/software/redis/redis-4.0.8/src
43+ ./redis-cli
44+ ```
45+
46+ ## 脚本
47+
48+ 以上两种安装方式,我都写了脚本去执行:
49+
50+ | [ 安装脚本] ( https://github.com/dunwu/linux/tree/master/codes/deploy/tool/redis ) |
You can’t perform that action at this time.
0 commit comments