1. Database Export
mysqldump--opt-u name-p dbname > Backupfile.sql
2. Install the web.py environment on Mac OS X
0) Install web.py
sudo pip install web.py
1) Install Mod_wsgi
Download Mod_wsgi
http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2
Extract
./configure
Make
sudo make install
2) Configure Apache httpd.conf
#Load Mod_wsgi module:
LoadModule wsgi_module libexec/apache2/mod_wsgi.so
wsgiscriptalias/ota/users/iosteam/ota_all/website.py/
AddType text/html. py
Alias/ota/static "/users/iosteam/ota_all/static"
<directory "/users/iosteam/ota_all" >
Order Deny,allow
Allow from all
</Directory>
3) If you still cannot access, modify the corresponding webpy boot file
# for Mod_python
App = Web.application (URLs, globals ())
Application = App.wsgifunc ()
3. Import Database Data
Mysql-u Root-p < Database.sql
4. Install Python Connection database package
sudo pip search mysql_pythonsudo pip install Mysql_python
5. Start the Apache server
Linux web.py Web site migration mac OS X