1. 數據庫導出 html
mysqldump --opt -u name -p dbname > backupfile.sql
0)install web.py python
sudo pip install web.py
下載mod_wsgi mysql
http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2 ios
解壓, web
./configure sql
make shell
sudo make install 數據庫
2) 配置apache httpd.conf apache
#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) 若是仍不能訪問,修改對應的webpy啓動文件
# for mod_python
app = web.application(urls, globals())
application = app.wsgifunc()
3. 導入數據庫數據
mysql -u root -p < database.sql
sudo pip search MySQL_python sudo pip install MySQL_python5. 啓動apache服務器