---
title: "开源视频 服务器 MediaCore 安装"
author: "Menuz"
date: "2013-01-11T16:51:54Z"
tags: ["RedHat", "Ubuntu", "开源"]
categories: ["非技术"]
slug: "mediacore"
draft: false
lastmod: "2013-01-11T16:55:30Z"
id: 1768380
url: "https://menuz.iteye.com/blog/1768380"
---

RedHat5 安装 Mediacore 0.9.4

官方安装文档: 
http://mediacorecommunity.org/docs/install/index.html#step-1-setup-a-python- 
virtual-environment 

Apache2安装： 
sudo yum install httpd httpd-devel 
apache配置文件:/etc/httpd/conf/httpd.conf 
Apache模块路径：/usr/sbin/apachectl 
web目录:/var/www/html 
如果采用源代码安装，一般默认安装在/usr/local/apache2目录下 
自己编译会很麻烦～～～ 

开启关闭： 
apachectl stop 
apachectl start 

mod_wsgi安装： 
官方参考文档：http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide 

tar xvfz mod_wsgi-X.Y.tar.gz 
./configure 
./configure --with-apxs=/usr/local/apache/bin/apxs \ 
  --with-python=/usr/local/bin/python 
make 
make install 

PS:apxs包含在http-devel包中 

如何将mode_wsgi加载到apache2中 
在apache的httpd.conf中增加 
LoadModule wsgi_module modules/mod_wsgi.so 


启动apache正常，访问mediacore报错，查看/var/log/httpd/error_log 
报错一： 
(13)Permission denied: mod_wsgi (pid=26962): Unable to connect to WSGI \ 
daemon process '<process-name>' on '/etc/httpd/logs/wsgi.26957.0.1.sock' \ 
after multiple attempts. 

解决方法：http://code.google.com/p/modwsgi/wiki/ConfigurationIssues 


报错二： 
permission denied，以root身份还报这个错，shit，打开所有权限 chmod 777 -R mediacore 


如何启动 mediacore 
open terminal 
cd /home/mediacore 
source mediacore_env/bin/activate 
cd mediacore 
paster serve --reload development.ini 
apachectl stop 
apachectl start



Ubuntu12.04  安装 Mediacore 0.9.4

----------------------- 
Apache2 is available as an Ubuntu package, therefore we can install it like this: 
apt-get install apache2 
Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. 
Additional configurations are stored in subdirectories of the /etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), 
/etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d. 


Task: Start Apache 2 Server /启动apache服务 
# /etc/init.d/apache2 start 
or 
$ sudo /etc/init.d/apache2 start 
Task: Restart Apache 2 Server /重启apache服务 
# /etc/init.d/apache2 restart 
or 
$ sudo /etc/init.d/apache2 restart 
Task: Stop Apache 2 Server /停止apache服务 
# /etc/init.d/apache2 stop 
or 
$ sudo /etc/init.d/apache2 stop 