In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article is to share with you the steps of compiling and installing ZLMediaKit in centos6 system. The editor thought it was very practical, so I shared it with you to learn. The following information is the steps for compiling and installing.
1. Install the basic compilation environment
1.1 installation of gcc-5.4
Note: the default gcc version of centos6 is gcc-4.4, and you need to upgrade to gcc-5.4 at this time. It is wrong to upgrade above gcc-4.7 to support c11 on the network. The measured 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.gztar-zxvf gcc-5.4.0.tar.gzcd gcc-5.4.0./contrib/download_prerequisitescd.. mkdir gcc-build-5.4.0cd gcc-build-5.4.0../gcc-5.4.0/configure-- enable-checking=release-- enable-languages=c,c++-- disable-multilibmake & & make install
(my virtual machine is a dual-core processor with 2.5G memory, which takes an hour. I should have known how many cores were configured. Wait for death)
Gcc- v at this time, the system gcc will automatically become the gcc-5.4 version
1.2 cmake-3.10 installation
For the time being, there is no test on whether other versions of cmake3 can be installed. The 3.10 currently used is consistent with the author's version.
Tar-zxvf cmake-3.10.0-rc4.tar.gzcd cmake-3.10.0. / bootstrapgmake & & gmake installyum remove cmakeln-s / usr/local/bin/cmake / usr/bin/cmakeln-s / usr/local/bin/cpack / usr/bin/cpackln-s / usr/local/bin/ctest / usr/bin/ctest# or write environment variable export PATH=$PATH:/usr/local/bin# can also be used after source is configured into / etc/profile
Verify:
# cmake-versioncmake version 3.10.0-rc4
two。 Compile ZLMediaKit
2.1 download Code
Git clone-- depth=1 https://github.com/xiongziliang/ZLMediaKit.gitcd ZLMediaKitgit submodule initgit submodule update
2.2 installation dependencies
Yum install mysql-devel.x86_64 openssl-devel ffmpeg ffmpeg-devel
The other three rpm packages also need to be installed, with the following links:
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.rpmlibfaac-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.rpmlibmp4v2-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.. Murray-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. / MediaServertcp 0 0 0 MediaServertcp 555 0 0 0 LISTEN 26771/./MediaServer tcp 0 0 0 5 19 36 0 0 0 14 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. 0 LISTEN 26771/./MediaServer tcp 0 0 0.0.0 0. 0. 0 LISTEN 26771/./MediaServer tcp 00 0. 0. 0. 0. 0. 0. 9 000. 0. 0. 0. 0. 0. 0 of the LISTEN 26771/./MediaServer
If you want to modify the port, find ZLMediaKit/git/ZLMediaKit/server/main.cpp before compiling
Modify the port number of each server under namespace mediakit {
If you like this article, you might as well share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.