安装 nginx 和 nginx 模块
①安装nginx依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
② nginx压缩包已经下载好了,放到/user/local目录下面,解压后改下名字nginx
tar -xvf nginx-1.17.6.tar.gz
③ nginx-rtmp-module压缩包,放在/home/目录下面,解压后改下名字nginx-rtmp-module
tar -xvf nginx-rtmp-module-1.2.1.tar.gz
④ 安装nginx以及模块
./configure --add-module=/home/nginx-rtmp-module./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_modulemake & make install
⑤ 解决报错,在/usr/local/nginx目录下
mkdir logschmod 700 logs/usr/local/nginx/sbin/nginx -t
⑥添加环境变量
#nginxPATH=$PATH:/usr/local/nginx/sbin
查看nginx进程
ps -ef|grep nginx
