安装python
cd /optyum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devel libpng-devel gstreamer-devel libavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig python libtool nasmyum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel gtk*wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xztar xvf Python-2.7.9.tar.xzcd Python-2.7.9./configure –prefix=/usr/local/ -enable-shared CFLAGS=-fPICmakemake installmake cleanmv /usr/bin/python /usr/bin/python2.6ln -s /usr/local/bin/python2.7 /usr/bin/pythonvi /usr/bin/yum将文件头部的#!/usr/bin/python改成#!/usr/bin/python2.6输入python进行验证,如果报错:libpython2.7.so.1.0: cannot open shared object file 解决方案:vi /etc/ld.so.conf 然后添加文本:/usr/local/lib 然后保存并退出输入命令:/sbin/ldconfig 输入命令:/sbin/ldconfig -v输入命令 python -V查看python是否安装正确,并查看版本
安装pip
cd /optwget https://bootstrap.pypa.io/get-pip.pypython get-pip.pyln -s /usr/local/bin/pip2.7 /usr/bin/pip
安装python依赖包
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple beautifulsoup4
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pillow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple selenium
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple thrift
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple command
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple supervisor
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple uwsgi
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple lxml
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple supervisor
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple kafka
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple multiprocessing
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple wget
pip install -U flask-cors
安装MySQLdb
cd /optyum -y install wget mysql-devel python-develwget https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip#md5=654f75b302db6ed8dc5a898c625e030cunzip MySQL-python-1.2.5.zipcd MySQL-python-1.2.5chmod -R 775 *python setup.py buildpython setup.py install
资源下载
软件包命令
ffmpeg2.8wget https://www.ffmpeg.org/releases/ffmpeg-2.8.tar.gzlibtheora-1.2.0wget http://downloads.xiph.org/releases/theora/libtheora-1.2.0alpha1.tar.gzliboggz-1.3.2wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gzyamdi-1.4wget http://sourceforge.net/projects/yamdi/files/yamdi/1.4/yamdi-1.4.tar.gzlame-3.99.5wget https://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gzlibx264wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2libfaccwget https://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
安装依赖
yum install yasmyum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devel libpng-devel gstreamer-devel libavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig python libtool nasmyum install gd-devel
安装liboggz-1.3.2
tar xzvf libogg-1.3.2.tar.gzcd ./libogg-1.3.2./configuremake && make install
安装libtheora-1.2.0
tar xzvf libtheora-1.2.0alpha1.tar.gzcd ./libtheora-1.2.0alpha1./configuremake && make install
安装yamdi-1.4
tar xzvf yamdi-1.4.tar.gzcd yamdi-1.4make && make install
安装lame-3.99.5
tar xzvf lame-3.99.5.tar.gzcd ./lame-3.99.5./configuremake&&make install
安装libx264
tar jxf last_x264.tar.bz2cd ./x264-snapshot-20170309-2245/./configure --enable-shared --disable-asmmake && make install
安装libfaac
tar xzvf faac-1.28.tar.gz./configuremake make install 注:如果报错libstdc++.so:could not read symbols: File in wrong format,可以用file命令查看该文件,可以看到该库是32位的,而我们编译的libfaac是64位的,所有只需使用64位库就行,网上有个方法是 make clean all LDFLAGS=”-L/usr/lib64 -L/lib64” 还是用的lib下的libstdc++.so~~,只能用野蛮的方式解决了。。。先将lib下的libstdc++.so备份为libstdc++.so.bak,再将lib64下的libstdc++.so拷贝一份到lib目录下,编译libfaac一切正常!大功告成,不要忘了将libstdc++.so复原
安装ffmpeg
tar zxvf ffmpeg-2.8.tar.gzcd ffmpeg-2.8PKG_CONFIG_PATH=/usr/local/ffmpeg_build/lib/pkgconfigexport PKG_CONFIG_PATH./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libtheora --enable-nonfree --enable-pic --enable-shared --enable-libx264 --enable-libmp3lame --enable-libfaacmake -j8make install
安装nginx
tar zxvf nginx.tar.gz下载zlib-1.2.8,pcre-8.34,nginx-tfs-master(需要连接tfs才下载),nginx-rtmp-module至mnt下./configure --user=www --group=www --prefix=/opt/c_nginx --with-http_stub_status_module --with-zlib=/mnt/zlib-1.2.8 --with-pcre=/mnt/pcre-8.34 --with-http_stub_status_module --with-http_image_filter_module --add-module=/mnt/nginx-tfs-master/ --add-module=/mnt/nginx-rtmp-module --with-http_flv_module --with-http_mp4_module --with-http_ssl_modulemake -j8make install
配置nginx
安装segmenter
git clone https://github.com/johnf/m3u8-segmentercd m3u8-segmenterPKG_CONFIG_PATH=/usr/local/lib/pkgconfiggcc -Wall -g -I/usr/local/ffmpeg/include m3u8-segmenter.c -o segmenter -L/usr/local/ffmpeg/lib -lavformatcp ./segmenter /usr/local/bin/
安装JWPlayer
git clone https://github.com/jwplayer/jwplayer.gitgit remote add upstream https://github.com/jwplayer/jwplayernpm install -g gruntyum install gruntwget http://the5fireblog.b0.upaiyun.com/staticfile/swfobject.jswget http://www.the5fire.com/static/demos/swf/HLSProviderOSMF.swfwget http://www.the5fire.com/static/demos/swf/StrobeMediaPlayback.swf
转载请注明原文地址: https://ju.6miu.com/read-40332.html