Archive 归档

loading ..

loading ..

(〇)检测 - ``` rpm -qa | grep walle-ngx-echo #是否已安装 ``` ```gray rpm -e walle-ngx-echo #卸载 ``` (一)在线安装 - ```blue rpm -Uvh http://ngx.walle.org/down/rpm/openresty/redis2/walle-ngx-redis2-2.20.1-1.el7.noarch.rpm #在线安装(rpm) ``` 或 ``` yum -y install http://ngx.walle.org/down/rpm/openresty/redis2/walle-ngx-redis2-2.20.1-1.el7.noarch.rpm #在线安装(yum) ``` (二)验证 - ### 1)是否已经安装 ``` rpm -qa | grep walle-ngx-echo ``` ### 2)查看(已安装)软件信息 ``` rpm -qi walle-ngx-echo ``` ### 3)查看包内文件 ``` rpm -ql walle-ngx-echo ``` (三)安装 nginx - [nginx 安装参考](//qpress-doc.erhe.cn/.nginx安装/201111-01-官网推荐yum安装最新稳定版/)
wget -O /etc/yum.repos.d/nginx.repo http://ngx.walle.org/down/yum/repo/nginx.repo && yum -y install nginx
```gray cd /usr/share/nginx/html #默认web目录 ``` ```cmd vim /etc/nginx/nginx.conf ``` 在 events { 上面加入: ```gray load_module /walle/ngx/openresty/redis2/so/ngx_http_redis2_module-1.18.0.so; ``` 将 1.18.0 替换成您的 nginx 版本号即可! ```cmd vim /etc/nginx/conf.d/default.conf ``` 在 server 块内,添加配置: ```gray location = /redis{default_type text/plain;redis2_query get "links";redis2_pass 127.0.0.1:6379;} ``` get "links" 换成需要的查询语句 --- ```gray ps aux | grep nginx ```
nginx -t && nginx
```gray ps aux | grep nginx ``` (四)访问测试 - ```cmd curl localhost/redis ``` 或 Web访问:http://10.0.0.1/redis 10.0.0.1 替换成站点 ip 或域名 --- 当前编译版本:https://github.com/openresty/redis2-nginx-module/archive/refs/tags/v0.15.tar.gz