Linux Web.py网站迁移Mac OS X
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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。