Linux Build nginx-rtmp Service

Source: Internet
Author: User
Tags install openssl openssl

confirm the environment that is required to install the compilation:

Make sure gcc-c++ and Openssl-devel are installed before installation (can be installed with Yum)

yum-y install gcc gcc-c++ Yum Install Openssl-devel

installing nginx-rtmp under Linux requires a few of the following installation packages (the installation package version does not have a hard requirement, choose the one that suits you):

1.nginx-1.13.6.tar.gz

2.nginx_mod_h264_streaming-2.27.zip

3.openss1-1.0.1.tar.gz

4.pcre-8.41.zip

Unzip the downloaded installation package

Use the mkdir command to create the Nginx_rtmp directory, which is the installation location for rtmp

Enter the extracted nginx-1.13.6 root directory and execute the command :

./configure--prefix=/data/nginx_rtmp--with-http_ssl_module--with-http_flv_module--with-http_stub_status_module --with-pcre=/data/pcre-8.41--add-module=/data/nginx-rtmp-module-master--add-module=/data/nginx_mod_h264_ streaming-2.2.7--with-openssl=/data/openssl-1.0.1l

Note:--with-pcre--add-module--with-openssl followed by the path refers to the path of these packages, in advance under the soft established, not unique,--prefix after the path for Nginx to specify the installation path, if you want to install in another path, Early in the path to establish the Nginx folder, the installation can be specified directly, or not unique

Compile and install:

Make

Make install

Verify that the nginx_rtmp is installed successfully :

Enter the created nginx_rtmp sbin directory and execute the command:

./nginx-t

If the installation is successful, the display:

Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK

Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful

Errors that may occur during the make command (compile):

1. Note: Nginx installation, error/hls/nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c:in function ' Ngx_streaming_ Handler ':, you need to modify src/ngx_http_streaming_module.c at this time :

Comment out the contents of the red box and recompile the installation

2. Errors that may occur during the compilation process are as follows:

Workaround:

Directly remove the-werror from the/objs/makefile file under the Nginx installation package.

Then compile the installation again.

After compiling it, it reports a warning, not an error. Perform the Make install command at this time

Note: I was modified after the compilation or error, and then I re-unzip the Nginx installation package, modified after the compilation of the installation to pass.

Linux Build nginx-rtmp Service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.