[英]How to start redis server and config nginx to run mediacrush script on CentOS?
I found a MediaCrush open source from here 我从这里找到了MediaCrush开源
https://github.com/MediaCrush/MediaCrush
https://github.com/MediaCrush/MediaCrush
But stuck in last steps. 但陷入最后一步。 I started the Redis server, use command
我启动了Redis服务器,使用命令
$redis-cli
$ redis的-CLI
that received the "PONG" response. 收到“ PONG”回复。
Then used the command 然后用命令
$celery worker -A mediacrush -Q celery,priority
$ celery worker -A mediacrush -Q celery,priority
and after 之后
python app.py
python app.py
But it seem that nothing works. 但是似乎没有任何效果。 I just installed nginx, run it on my IP ok, but after edit the nginx.conf like a Mediacrush script, then accessing my IP, nothing happens.
我刚刚安装了nginx,在IP正常的情况下运行它,但是像Mediacrush脚本一样编辑nginx.conf之后,再访问我的IP,则没有任何反应。 So what am I missing here?
那我在这里想念什么? and how to config nginx server and start redis server to run this script on CentOS (i can change it to Arch like them if required)
以及如何配置Nginx服务器并启动Redis服务器以在CentOS上运行此脚本(如果需要,我可以将其更改为Arch)
Thanks! 谢谢!
I just wanted to run it for fun.. so this may be wrong but what I did after running the celery daemon was edit the app.py script and manually set the host, port, and set debug to false. 我只是想以有趣的方式运行它。所以这可能是错误的,但是在运行celery守护程序之后,我所做的是编辑app.py脚本并手动设置主机,端口并将debug设置为false。 Then I just executed it like any other python script.
然后,我像执行其他任何python脚本一样执行了它。
EDIT : This may work 编辑 :这可能有效
PORT=8000 gunicorn -w 4 app:app
it switches your port to 8000 and runs the gunicron daemon with 4 workers. 它将您的端口切换到8000,并与4个工人一起运行gunicron守护程序。 both approaches worked for me.
两种方法都对我有用。
Edit File: ./app.py
编辑文件:
./app.py
from mediacrush.app import app
from mediacrush.config import _cfg, _cfgi
import os
app.static_folder = os.path.join(os.getcwd(), "static")
if __name__ == '__main__':
# CHANGE THIS LINE TO REFLECT YOUR DATA
app.run(host=_cfg("debug-host"), port=_cfgi('debug-port'), debug=True)
# FOR EXAMPLE I CHANGED IT TO THIS
# app.run(host="92.222.25.245", port=8000, debug=0)
Also to start redis i believe you should do redis-server&
I use the cli to manually tinker with it. 另外,要启动redis,我相信您应该做
redis-server&
我使用cli手动修改它。
Btw I did this on linux mint / ubuntu 14.04 / debian 顺便说一句,我在Linux Mint上做到了这一点/ Ubuntu 14.04 / Debian
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.