###openrest install
###by weiliang
sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
sudo apt-get install libgd2-xpm libgd2-xpm-dev libgeoip-dev
mypath=/home/ubuntu/data/webserver(自定义目录)
softpath=/home/ubuntu/data/soft(自定义目录)
if [ ! -d $mypath ];then
mkdir $mypath -p
fi
if [ ! -d $softpath ];then
mkdir $softpath -p
fi
cd $softpath
wget https://openresty.org/download/openresty-1.11.2.4.tar.gz(注意下载版本)
tar -zxf openresty-1.11.2.4.tar.gz
cd openresty-1.11.2.4
sudo ./configure --prefix=/home/ubuntu/data/webserver/openrest --with-debug --with-pcre --with-http_stub_status_module --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_iconv_module --with-http_realip_module --with-http_gzip_static_module --with-luajit --user=www --group=www
sudo make
sudo make install