OpenResty安装,
OpenResty安装,
openresty-1.13.6.2.tar.gz
测试环境aiqa
uname -a
用于打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等)
-a或--all:显示全部的信息
Linux 10-10-128-29 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
cat /etc/debian_version --测试环境为Debian系统
8.7 --版本
测试环境为Debian系统,参考博客如下,不能安装yum,没有rpm,需要安装rpm
https://blog.csdn.net/thomastang2012/article/details/6329566
sudo su #切换成root用户
官网下载openresty包 https://openresty.org/cn/download.html
OpenResty 依赖库有: perl 5.6.1+, libreadline, libpcre, libssl
apt-get install libreadline-dev libpcre3-dev libssl-dev perl
安装openresty
tar -zxvf openresty-1.13.6.2.tar.gz
cd openresty-1.13.6.2/
./configure
make
make install
安装完OpenResty,成功后在/usr/local/openresty出现
http://www.bubuko.com/infodetail-526943.html
把之前nginx的nginx.conf文件拷贝到openresty下
sudo cp /opt/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf/
把之前的nginx服务停掉,走openresty路径
sudo /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -s stop
ps -ef|grep nginx
sudo /usr/local/openresty/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf
ps -ef|grep nginx
如果为3.10.0-693.11.6.el7.x86_64
el6 el7为Redhat系列
cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core) --预览环境为CentOS系统,版本
CentOS内置yum rpm,不需要安装
openresty 安装 http://www.runoob.com/w3cnote/openresty-intro.html
把之前nginx的nginx.conf文件拷贝到openresty下
cp -f /usr/local/nginx/conf/nginx.conf /usr/local/openresty/nginx/conf
把之前的nginx服务停掉,走openresty路径
sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -s stop
ps -ef|grep nginx
sudo /usr/local/openresty/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf
ps -ef|grep nginx
评论暂时关闭