CRTMPServer 在CentOS 64-bit下的編譯
http://blog.csdn.net/qiuchangyong/article/details/52848942
==========================================
一、Centos 用 wget 下載需要的軟件
wget?http://www.cmake.org/files/v2.8/cmake-2.8.6.tar.gz
二、安裝 cmake
tar zxvf cmake-2.8.4.tar.gz
cd cmake-2.8.6
./bootstrap
gmake
gmake install
這樣cmake就安裝好了
?
三、編譯crtmpserver
?
Here are the steps necessary for getting the server up and running. For installing the dependencies please consultthis.
- check out the source code from svn repository:
$ svn co --username anonymous https://svn.rtmpd.com/crtmpserver/trunk crtmpserver
Hit Enter key when prompted for password (this parameter is empty)
我發現這個目前不能用了,所以通過之前下載好的源碼壓縮包來編譯的。
- go to the builders directory
$ cd crtmpserver/builders/cmake
- make sure everything is clean by doing
$ sh cleanup.sh
Note: This is necessary when updating the sources or you run into troubles like missing libraries reported by cmake
- generate the makefile using cmake
$ cmake .
Notice the “space dot”
- start the actual building process
$ make
At this point, if no errors occurred, you should have a working binary.
實際在編譯時,遇到的問題是:
?
這是依賴的lua庫編譯的問題,重新編譯lua庫,給src/Makefile的CFLAGS變量加上-fPIC再重新編譯即可。
四、運行服務器
?
?
If you are here from previous steps (compiling), you should already be in the right directory which isbuilders/cmake
?relative to the directory where the sources are located. Enter the following command:
$ ./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua
五、發布
將cmake目錄拷貝到發布的設備的/usr/local/bin/rtmpd下,同時將所有的*.so文件拷貝到cmake下,即可運行
?
六、后臺運行
在后臺運行:$ ./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua &
?
查詢后臺運行所有進程:$ ps -al
查詢后臺運行進程: ps -ef | grep crtmpserver
用kill -9 (你的進程號)就可以關掉了
本文參考http://blog.sina.com.cn/s/blog_8337d0c50100v61j.html整理而得。