Linux搭建apache简易媒体服务器

来源:互联网 发布:java json数组遍历 编辑:程序博客网 时间:2024/05/17 08:29
 简介:
系统环境:loongson-2f、中标普华linux5、linux2.6.27.6内核
工具包:httpd-2.0.64.tar.bz2
 
1、工具包获取:
进入网址http://www.apache.org/dist/httpd,下载httpd-2.2.21.tar.bz2工具包。
 
2、工具包安装:
# tar jxf httpd-2.0.64.tar.bz2
# cd httpd-2.0.64
#./configure --prefix=/home/1b-tools/apache2_install --enable-module=so --sharedstatedir=/home/1b-tools/apache2_install/apache_share
# make && make install
# cd ./apache2_insatll/bin
# ./apachect1 start
# cd ./apache_insatll/htdoc
#rm * -rf && cp /music/1.mp3 ./
执行以上步骤后,IE打开http://服务器地址,在网页上就能看到文件1.mp3,使用mplayer http://服务器地址/1.mp3 可播放媒体库音频。
备注:使用2F测试运行apache服务器,内存占用率会越来越高,因此长时间使用apache需定时释放内存。