我正在尝试在我的VPS上安装mod_wsgi,但是它不起作用。 这就是我所做的:
wget http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz tar xzvf mod_wsgi-2.5.tar.gz cd mod_wsgi-2.5 ./configure --with-python=/opt/python2.5/bin/python
我运行上面的命令后,我得到这个错误:
checking for apxs2... no checking for apxs... no checking Apache version... ./configure: line 1298: apxs: command not found ./configure: line 1298: apxs: command not found ./configure: line 1299: /: is a directory ./configure: line 1461: apxs: command not found configure: creating ./config.status config.status: creating Makefile config.status: error: cannot find input file: Makefile.in
通过一些研究,我发现我需要修改我的命令:
./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-python=/usr/local/bin/python
但是,/ usr / local / apache /不存在,或者这就是它告诉我的。 如果它不存在,我该如何创build所需的所有文件,或者如果apache位于我的VPS的其他位置它将位于哪里?
我还想提一下,在整个交易之前,我运行了一个命令来安装apache:
yum install httpd
所以我认为这是我所需要的,但显然不(我是非常新的所有这个服务器pipe理的东西,所以请温柔)
编辑:这是我一直在使用这个教程来设置: http : //binarysushi.com/blog/2009/aug/19/CentOS-5-3-python-2-5-virtualevn-mod- WSGI-和-MOD-rpaf /
我被困在标题“安装mod_wsgi”
谢谢你的帮助!
mod_wsgi在EPEL中 。 configuration完成后,您也可以通过yum进行安装。
编辑: 直接链接到添加EPEL回购的说明 。