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

WBOY
Lepaskan: 2016-06-01 13:07:09
asal
932 orang telah melayarinya

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"))
Salin selepas log masuk

(should print out ‘64′)

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

import sys; print (sys.version)
Salin selepas log masuk

(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

sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!