Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: luis web on April 26, 2020, 06:34:36 PM
-
Thanks to everyone in the forum for helping
How to configure server vps centos7 for RTMP protocol?
I already installed FFMPEG.
It is for Webcam transmission on the website Live stream format.
I've been watching this RTMP tutorial.
it's viable?
https://medium.com/vicuesoft-techblog/how-to-install-tune-nginx-with-rtmp-module-and-start-streaming-through-ffmpeg-with-quicksync-on-eff02fac3eeb
I await help ... thank you all. ;) thankssssss
-
The issue you're going to have, is the nginx. You can recompile it, but there's no guarantee it won't be overwritten.
-
Here's a solution for you. Your installing NGINX, but seperate from the httpd nginx. (You'll notice cwpsrv is actually nginx).
Steps 1 & 2
sudo yum -y groupinstall 'Development Tools'
sudo yum -y install epel-release
sudo yum install openssl-devel
sudo yum install -y pcre-devel
wget https://nginx.org/download/nginx-1.18.0.tar.gz
tar -xzvf nginx-1.18.0.tar.gz
./configure --prefix=/etc/nginxrtmp --sbin-path=/usr/sbin/nginxrtmp --modules-path=/usr/lib64/nginxrtmp/modules --conf-path=/etc/nginxrtmp/nginx.conf --error-log-path=/var/log/nginxrtmp/error.log --pid-path=/var/run/nginxrtmp.pid --lock-path=/var/run/nginxrtmp.lock --user=nginx --group=nginx --build=CentOS --builddir=nginx-1.18.0 --http-log-path=/var/log/nginxrtmp/access.log --http-client-body-temp-path=/var/cache/nginxrtmp/client_temp --http-proxy-temp-path=/var/cache/nginxrtmp/proxy_temp --http-fastcgi-temp-path=/var/cache/nginxrtmp/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginxrtmp/uwsgi_temp --http-scgi-temp-path=/var/cache/nginxrtmp/scgi_temp --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module --with-compat --add-module=../nginx-rtmp-module --with-debug
-
Step 3
sudo ln -s /usr/lib64/nginxrtmp/modules /etc/nginxrtmp/modules
nano /usr/lib/systemd/system/nginxrtmp.service
[Unit]
Description=nginxrtmp - high performance web server
Documentation=https://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=forking
PIDFile=/var/run/nginxrtmp.pid
ExecStartPre=/usr/sbin/nginxrtmp -t -c /etc/nginxrtmp/nginx.conf
ExecStart=/usr/sbin/nginxrtmp -c /etc/nginxrtmp/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
systemctl enable nginxrtmp
cd /etc/nginxrtmp/
rm nginx.conf
nano nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935; # Standard port
chunk_size 8192;
# Application configuration
application origin_ffmpeg_1 {
live on;
record off;
meta copy;
exec ffmpeg -i rtmp://localhost:1935/origin_ffmpeg_1/$name <parameters/libs/modules> rtmp://localhost:1935/live_ffmpeg_1/$name_1;
}
application live_ffmpeg_1 {
live on;
record off;
}
}
}
systemctl start nginxrtmp
Now you should be able to follow the rest of the directions. Please note in step 8, that nginx.conf is in /etc/nginxrtmp
-
The issue you're going to have, is the nginx. You can recompile it, but there's no guarantee it won't be overwritten.
Thank you very much .. Great friend, you here on the forum that really helps and explains very well.
You understand me. not everyone has the same experience with CWP and that’s why you explain it clearly.
May God double your life .. I don't know how to thank you for this great help .. Thank you very much .. Thank you again ..
-
I tried to install but it gave error .. Is the file nginx 1.18.0 in root?
<>>>>>>>>>[root@serviot ~]# sudo yum -y groupinstall 'Development Tools'
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Determining fastest mirrors
epel/x86_64/metalink | 31 kB 00:00
* base: asi-fs-n.contabo.net
Excluding mirror: mirror.de.leaseweb.net
Excluding mirror: mirror.nl.leaseweb.net
* epel: ftp.fau.de
* extras: centos.schlundtech.de
* updates: asi-fs-n.contabo.net
base | 3.6 kB 00:00
cwp | 2.9 kB 00:00
extras | 2.9 kB 00:00
mariadb | 2.9 kB 00:00
updates | 2.9 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package byacc.x86_64 0:1.9.20130304-3.el7 will be installed
---> Package cscope.x86_64 0:15.8-10.el7 will be installed
---> Package ctags.x86_64 0:5.8-13.el7 will be installed
---> Package diffstat.x86_64 0:1.57-4.el7 will be installed
.....OK
--> Finished Dependency Resolution
Dependencies Resolved
avahi-libs.x86_64 0:0.6.31-20.el7
...OK
Dependencies Resolved
<>>>>>>>>>[root@serviot ~]# sudo yum -y install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
......OK
<>>>>>>>>[root@serviot ~]# wget https://nginx.org/download/nginx-1.18.0.tar.gz
--2020-06-14 00:31:53-- https://nginx.org/download/nginx-1.18.0.tar.gz
Resolving nginx.org (nginx.org)... 95.211.80.227, 62.210.92.35, 2001:1af8:4060:a 004:21::e3
Connecting to nginx.org (nginx.org)|95.211.80.227|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1039530 (1015K) [application/octet-stream]
Saving to: ‘nginx-1.18.0.tar.gz’
<>>>>>>>>[root@serviot ~]# tar -xzvf nginx-1.18.0.tar.gz
nginx-1.18.0/
nginx-1.18.0/auto/
.........
<>>>>>>>>[root@serviot ~]# ./configure --prefix=/etc/nginxrtmp --sbin-path=/usr/sbin/ngin xrtmp --modules-path=/usr/lib64/nginxrtmp/modules --conf-path=/etc/nginxrtmp/ngi nx.conf --error-log-path=/var/log/nginxrtmp/error.log --pid-path=/var/run/nginxr tmp.pid --lock-path=/var/run/nginxrtmp.lock --user=nginx --group=nginx --build=C entOS --builddir=nginx-1.18.0 --http-log-path=/var/log/nginxrtmp/access.log --ht tp-client-body-temp-path=/var/cache/nginxrtmp/client_temp --http-proxy-temp-path =/var/cache/nginxrtmp/proxy_temp --http-fastcgi-temp-path=/var/cache/nginxrtmp/f astcgi_temp --http-uwsgi-temp-path=/var/cache/nginxrtmp/uwsgi_temp --http-scgi-t emp-path=/var/cache/nginxrtmp/scgi_temp --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --wi th-http_realip_module --with-http_addition_module --with-http_sub_module --with- http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip _module --with-http_gzip_static_module --with-http_auth_request_module --with-ht tp_random_index_module --with-http_secure_link_module --with-http_degradation_mo dule --with-http_slice_module --with-http_stub_status_module --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-st ream_realip_module --with-stream_ssl_preread_module --with-compat --add-module=. ./nginx-rtmp-module --with-debug
-bash: ./configure: No such file or directory
<>>>>>>>>[root@serviot ~]# sudo ln -s /usr/lib64/nginxrtmp/modules /etc/nginxrtmp/modules
ln: failed to create symbolic link ‘/etc/nginxrtmp/modules’: No such file or dir ectory
<>>>>>>[root@serviot ~]# cd nginx-1.18.0
[root@serviot nginx-1.18.0]# ./configure --prefix=/etc/nginxrtmp --sbin-path=/usr/sbin/nginxrtmp --modules-path=/usr/lib64/nginxrtmp/modules --conf-path=/etc/nginxrtmp/nginx.conf --error-log-path=/var/log/nginxrtmp/error.log --pid-path=/var/run/nginxrtmp.pid --lock-path=/var/run/nginxrtmp.lock --user=nginx --group=nginx --build=CentOS --builddir=nginx-1.18.0 --http-log-path=/var/log/nginxrtmp/access.log --http-client-body-temp-path=/var/cache/nginxrtmp/client_temp --http-proxy-temp-path=/var/cache/nginxrtmp/proxy_temp --http-fastcgi-temp-path=/var/cache/nginxrtmp/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginxrtmp/uwsgi_temp --http-scgi-temp-path=/var/cache/nginxrtmp/scgi_temp --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module --with-compat --add-module=../nginx-rtmp-module --with-debug
checking for OS
+ Linux 3.10.0-1127.10.1.el7.x86_64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for getaddrinfo() ... found
configuring additional modules
adding module in ../nginx-rtmp-module
./configure: error: no ../nginx-rtmp-module/config was found
<>>>>>>>[root@serviot nginx-1.18.0]#
Am I not installing in the correct dir? nginx 1.18.0 was in the root ..
error installing RTMP nginx 1.18.0
Can someone help install RTMP with a correct step by step ..
Thanks to those who help me
-
cd to the nginx folder that was just untared