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/echo/walle-ngx-echo-2.20.1-1.el7.noarch.rpm #在线安装(rpm) ``` 或 ``` yum -y install http://ngx.walle.org/down/rpm/openresty/echo/walle-ngx-echo-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/echo/so/ngx_http_echo_module-1.18.0.so; ``` 将 1.18.0 替换成您的 nginx 版本号即可! ```cmd vim /etc/nginx/conf.d/default.conf ``` 在 location / { 上面加入: ```gray location /hello {default_type text/plain;echo "hello, world!";} ``` hello, world! 换成需要输出的信息 --- ```gray ps aux | grep nginx ```
nginx -t && nginx
```gray ps aux | grep nginx ``` (四)访问测试 - ```cmd curl localhost/hello ``` 或 Web访问:http://10.0.0.1/hello 10.0.0.1 替换成站点 ip 或域名 --- 当前编译版本:https://github.com/openresty/echo-nginx-module/archive/refs/tags/v0.62.tar.gz