Install ZLMediaKit on centos6 The author of ZLMediaKit developed it using Ubuntu 16, but if you want to run it for testing or even production, you must deploy it on centos. The author mainly uses centos6 (centos7 has the same compilation component operations except for the following rpm package). I installed it and shared it with you because there is a demand. 1. Install the basic compilation environment 1.1 Installation of gcc-5.4 Note: The default gcc version of centos6 is gcc-4.4, which needs to be upgraded to gcc-5.4. The online version that says to upgrade to gcc-4.7 or above to support c11 is wrong. In actual testing, gcc-4.8 cannot successfully cmake the relevant basic configuration framework wget http://mirrors.nju.edu.cn/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz tar -zxvf gcc-5.4.0.tar.gz cd gcc-5.4.0 ./contrib/download_prerequisites cd .. mkdir gcc-build-5.4.0 cd gcc-build-5.4.0 ../gcc-5.4.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib make && make install (My virtual machine has a dual-core processor and 2.5G memory, and it takes 1 hour. If I had known earlier, I would have configured more cores... I would have waited till death) gcc -v At this time, the system gcc will automatically become gcc-5.4 version 1.2 cmake-3.10 installation We have not tested whether other versions of cmake3 can be installed yet. The 3.10 currently used is consistent with the author's version. tar -zxvf cmake-3.10.0-rc4.tar.gz cd cmake-3.10.0 ./bootstrap gmake && gmake install yum remove cmake ln -s /usr/local/bin/cmake /usr/bin/cmake ln -s /usr/local/bin/cpack /usr/bin/cpack ln -s /usr/local/bin/ctest /usr/bin/ctest #Or write environment variable export PATH=$PATH:/usr/local/bin #After configuring in /etc/profile, source can also verify: # cmake --version cmake version 3.10.0-rc4 2. Compile ZLMediaKit 2.1 Download the code git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git cd ZLMediaKit git submodule init git submodule update 2.2 Installation Dependencies yum install mysql-devel.x86_64 openssl-devel ffmpeg ffmpeg-devel Three other rpm packages also need to be installed, the links are as follows: libx264-devel (https://pkgs.org/download/libx264) wget http://pkgrepo.linuxtech.net/el6/release/x86_64/libx264-devel-0.130-0.20130531.1.el6.x86_64.rpm libfaac-devel (https://pkgs.org/download/libfaac) wget http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libfaac-devel-1.28-alt2.x86_64.rpm libmp4v2-dev (https://pkgs.org/download/libmp4v2) wget https://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/l/libmp4v2-1.5.0.1-10.el6.x86_64.rpm 2.3 Compilation # mkdir linux_build # ln -s linux_build/build # cd build # cmake .. -- The C compiler identification is GNU 5.4.0 ... -- Configuring done -- Generating done -- Build files have been written to: /usr/local/src/install_pack/ZLMediaKit/build # make The compiled executable file is under ZLMediaKit/git/ZLMediaKit/build/bin 3. Run the compiled ZLMediaKit cd ZLMediaKit/git/ZLMediaKit/build ./bin/MediaServer # netstat -antlp | grep ./MediaServer tcp 0 0 0.0.0.0:555 0.0.0.0:* LISTEN 26771/./MediaServer tcp 0 0 0.0.0.0:1936 0.0.0.0:* LISTEN 26771/./MediaServer tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26771/./MediaServer tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 26771/./MediaServer tcp 0 0 0.0.0.0:322 0.0.0.0:* LISTEN 26771/./MediaServer tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 26771/./MediaServer If you want to change the port, before compiling, find ZLMediaKit/git/ZLMediaKit/server/main.cpp Modify the port numbers of each server under namespace mediakit { Summarize The above is the editor's introduction to centos6 compilation and installation of ZLMediaKit analysis. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Vue local component data sharing Vue.observable() usage
>>: Detailed usage of Vue more filter widget
Usage Environment In cmd mode, enter mysql --vers...
1. Foreign key setting method 1. In MySQL, in ord...
Table of contents Foreign Key How to determine ta...
Table of contents Preface $attrs example: $listen...
In the migration of Oracle database to MySQL data...
Step 1: Enter the directory: cd /etc/mysql, view ...
In the past, float was often used for layout, but...
Table of contents Container Hierarchy The process...
This article describes the Linux file management ...
Use HTML color blocks to dynamically display data...
<body> <div id="root"> <...
Table of contents Table definition auto-increment...
Table of contents Index Type Index structure Nonc...
This article shares the specific code of React to...
1. Brief introduction of the event An event is a ...