【安装环境】
yum install pcre-devel openssl-devel gcc curl
yum install gcc pcre-devel openssl-devel curl
yum install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev
yum install libxml2 libxml2-devel libxslt libxslt-devel
yum install perl perl-devel perl-ExtUtils-Embed
一、必要软件准备
1.安装pcre
为了支持rewrite功能,我们需要安装pcre
# yum install pcre* //如过你已经装了,请跳过这一步
2.安装openssl
需要ssl的支持,如果不需要ssl支持,请跳过这一步
# yum install openssl*
3.gzip 类库安装
yum install zlib zlib-devel
4.安装wget
下载nginx使用,如果已经安装,跳过这一步
# yum install wget
【下载安装程序】
wget https://openresty.org/download/openresty-1.15.8.2.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/v1.2.1.tar.gz
【开始安装】
cd /usr/local/src/openresty-1.15.8.2
./configure --prefix=/usr/local/openresty/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-luajit --with-http_iconv_module --with-stream --add-module=/usr/local/src/nginx-rtmp-module-1.2.1
gmake
gmake install
【运行】
/usr/local/openresty/nginx/sbin/nginx