pip安装uWSGI后,没有/etc/uwsgi/目录-如何使用已启用应用程序的目录? [英] After pip installing uWSGI there's no /etc/uwsgi/ directory - how can I use apps-enabled?

查看:564
本文介绍了pip安装uWSGI后,没有/etc/uwsgi/目录-如何使用已启用应用程序的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用apt-get install uwsgi为我的Django应用程序安装uWSGI.今天,我意识到我需要一个直到uWSGI 1.1才可用的功能,而至少在我的apt-get install uwsgi=1.1尝试下,Ubuntu 12.04.1在1.0.x之后没有任何功能.所以,我用了:

I've been using apt-get install uwsgi to install uWSGI for my Django application. Today, I realized I needed a feature that's not available until uWSGI 1.1, and Ubuntu 12.04.1 doesn't have anything after 1.0.x, at least according to my apt-get install uwsgi=1.1 attempt. So, I used:

pip install http://projects.unbit.it/downloads/uwsgi-lts.tar.gz

这样做之后,我收到一条消息,提示使用/usr/local/bin/uwsgi启动程序.从源代码编译时,我不是专家,但我的理解是,当您从源代码编译时,/etc/目录中不会有任何更改.这样对吗?如果没有,为什么我没有一个/etc/uwsgi/目录,更具体地说是一个/etc/uwsgi/apps-enabled/目录?从源代码安装uWSGI时,是否应该简单地创建目录?考虑到文档中没有提及这一点,我很犹豫(我不希望有偶然发生的事情,等等).

After doing so, I get a message prescribing the use of /usr/local/bin/uwsgi to launch the program. I'm not a guru when it comes to compiling from source, but my understanding is that when you do so, nothing will be changed in the /etc/ directory. Is this correct? If not, why don't I have a /etc/uwsgi/ directory and, more specifically, a /etc/uwsgi/apps-enabled/ directory? Should I simply create the directories when installing uWSGI from source? I was hesitant to do so, considering there is no mention of this in the docs (I don't want something that accidentally works, etc.).

推荐答案

很抱歉收到这么晚的答复,但这也许会对以后会找到此答案的人们有所帮助:

Sorry for this very late reply, but maybe this will help people who'll find this answer in the future:

要获取/etc/uwsgi等,您需要通过运行aptitutde install uwsgi从Debian或Ubuntu(无论使用什么)安装uwsgi软件包.但是,默认情况下,这可能会安装旧版本的uwsgi!这样安装uwsgi时,将uwsgi二进制文件放置在/usr/bin/uwsgi中.

To get /etc/uwsgi etc, you need to install the uwsgi package from Debian or Ubuntu (whatever you are using) by running aptitutde install uwsgi. However this will by default probably install an ancient version of uwsgi! The uwsgi binary is placed in /usr/bin/uwsgi when installing uwsgi this way.

要获取最新版本,请使用pip install -U uwsgi的pip安装uwsgi,(至少在我的Ubuntu系统上)将把uwsgi二进制文件放入/usr/local/bin/uwsgi,然后执行以下操作:

To get the latest version, also install uwsgi using pip using pip install -U uwsgi, which (on my Ubuntu system at least) will put the uwsgi binary in /usr/local/bin/uwsgi then go do the following:

cd /usr/bin/

mv uwsgi uwsgi-old

ln -s /usr/local/bin/uwsgi uwsgi

或者:编辑uwsgi初始化脚本并适当地编辑DAEMON="/usr/bin/uwsgi".

Alternatively: edit the uwsgi init script and edit the DAEMON="/usr/bin/uwsgi" appropriately.

Et voila:"debianism"(完整的初始化脚本等)最新的uwsgi二进制文件!

Et voila: "debianism" (full init scripts, etc) and the latest uwsgi binary!

这篇关于pip安装uWSGI后,没有/etc/uwsgi/目录-如何使用已启用应用程序的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆