Linux web.py Web site migration mac OS X

Source: Internet
Author: User
Tags import database

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.