标签:style http color os io strong 文件 for 数据
1. 数据库导出
mysqldump --opt -u name -p dbname > backupfile.sql
0)install web.py
sudo pip install web.py
下载mod_wsgi
http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2
解压,
./configure
make
sudo make install
2) 配置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) 如果仍不能访问,修改对应的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_python
标签:style http color os io strong 文件 for 数据
原文地址:http://my.oschina.net/u/566401/blog/305865