Here is the steps to run poweredsites project in a local ubuntu
Please run commands in this section to make sure all libs are ready:
# install git to sync tornado source code, and build tools etc
sudo apt-get install git-core gcc make build-essential
# python basic tools
sudo apt-get install python-setuptools python2.6-dev
# third party libs
sudo apt-get install python-pycurl python-mysqldb
sudo easy_install -U pymongo markdown beautifulsoup
webhelpers formencode routes decorator
git clone git://github.com/facebook/tornado
# And go to tornado folder run
sudo python setup.py install
Please refer to How to setup MySQL and How to setup MongoDB to setup MySQL and MongoDB
to mysql and mongodb,of course, you can use your username and password,
then change the project configuration.
import the schema in the repository to your mysql (poweredsites/conf/schema.sql)
Modify local Hosts
Mapping some subdomains to local machine, you can add more for testing:
sudo nano /etc/hosts
Proxy poweredsites.org requests to localhost:8888(Apache or Nginx as your wish)
Here is a Nginx exmaple, please refer to How to setup Nginx to setup nginx. The default port 80 will be conflict with apache2 if you already install apache2. If so, stop your apache2 or change apache2 listened port to another one.
Yes, I hardcode something :(, I will refine that later.
put a symbol link or copy
Sync project root to
/mnt/ebs/sites/poweredsites, then the layout of those files will like below.
Run the app:
# setup mongodb index at the first time
python /mnt/ebs/sites/poweredsites/poweredsites/app.py --setup_db=1
# Run this one in normal, or run the upper one always.
# for short
Then the app will be run at port 8888, type http://poweredsites.org in your browser to play with it.
Use CONTROL + C to Quit the app.
Well done, congratulations, Have fun！