Linux 非root 用户安装openresty
首先得用root用户安装依赖包
yum install perl
yum install gcc
yum install gcc-c++
yum install zlib
yum install zlib-devel;
接着 安装openresty
1,下载openssl
wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz
解压openssl
tar -zvxf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k/
patch -p1 < /path/to/openresty/patches/openssl-1.0.2h-sess_set_get_cb_yield.patch
红色标注的是openresty下载包解压之后的路径
cd ..
下载prce 安装包
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
解压pcre包
tar -xvf pcre-8.40.tar.gz wget https://openresty.org/download/openresty-1.11.2.5.tar.gz
解压openresty安装包
tar -zxvf openresty-1.11.2.5.tar.gz cd openresty-1.11.2.5/
## assuming your have 4 spare logical CPU cores
./configure --prefix=../opt/openresty --with-openssl=../openssl-1.0.2k --with-pcre=../pcre-8.40 -j4
gmake
gmake install
出处:http://www.cnblogs.com/Hackerman/