centos7 安装NGINX+nginx-rtmp-module+wordpress

centos7 安装NGINX-1.16.0+nginx-rtmp-module,配置直播、点播流媒体服务器、同时配置wordpress

在配置之前,首先要安装mysql和PHP

1、下载nginx-1.16.0和rtmp-module

http://nginx.org/en/download.html
https://github.com/sergey-dryabzhinsky/nginx-rtmp-module

到/usr/local/src目录
2、解压后,进入nginx目录准备进行编译
编译前首先搭建基础环境:

yum install -y gcc gcc-c++ autoconf wget
yum -y install wget gcc-c++ ncurses ncurses-devel cmake make perl bison openssl openssl-devel
gcc* libxml2 libxml2-devel curl-devel libjpeg* libpng* freetype* 

这下面三个基础的必须安装:
1、 安装openssl

yum install openssl openssl-devel

2、 安装pcre

yum install pcre pcre-devel

3、安装zlib

yum install zlib zlib-devel

4、之后编译:

./configure
--prefix=/usr/local/nginx --add-module=/usr/local/src/nginx-rtmp-module-master --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-stream --with-stream_ssl_module

然后

make &&  make install

注意,如果之前已经安装了NGINX,只是想升级,那就只make,然后把生成的objs文件夹中的二进制文件“nginx”,复制到之前的安装执行目录:/usr/local/nginx/sbin,之前的执行文件自行备份。

5、然后配置 “/usr/local/nginx/conf” 文件夹中 “nginx.conf”
如果要准备安装wordpress的话,可先查看php配置目录中的www.conf:

vim /etc/opt/remi/php73/php-fpm.d/www.conf

找到【www】选项,发现user和group是系统默认用户和组apache,于是把nginx.conf中的默认用户也改成apache。当然也可以将两者都修改成自己建的系统用户和组。

vim /etc/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值