[Tutorial] install Apache + MySQL + Python on Mac OS_MySQL

WBOY
풀어 주다: 2016-06-01 13:07:09
원래의
932명이 탐색했습니다.

pythonApache

my OS version is 10.8.5

last revision: 2014-06-27

here are the instructions:

# download & install XAMPP (you only get 64-bit version for mac)

http://www.apachefriends.org/download.html

# install python 2.7.x (64-bit)

http://www.python.org/download/releases/2.7.7/

# check python bit-version (run the following script in Python)

import struct; print( 8 * struct.calcsize("P"))
로그인 후 복사

(should print out ‘64′)

# check python version (run the following script in Python)

import sys; print (sys.version)
로그인 후 복사

(print out ‘2.7.7′ in this moment)

# download mod_wsgi (a bride for Apache and Python)

http://github.com/GrahamDumpleton/mod_wsgi/releases

# install mod_wsgi

make distclean

./configure –with-apxs=/Applications/XAMPP/xamppfiles/bin/apxs –with-python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python

make

sudo make install

# add load wsgi module script in Apache configuration (httpd.conf)

LoadModule wsgi_module modules/mod_wsgi.so

that’s all then you can launch Apache & MySQL in XAMPP now.

good luck! ;-)

[IMPORT!!] the Apache bit-version must be matched with the Python bit-version, or you will get error while Apache trying to launch. They must be both 64-bit version or both 32-bit version.

Tags:Apache,mod_wsgi,MySQL,Python,XAMPP

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!