2009년 10월 11일 일요일

CherryPy 설치

* pakage 설치


Once you have installed a svn client, you need to type the following command :

svn {co} {http://svn.cherrypy.org}

This will download the complete source code to your computer.


Installing the package from the Subversion repository

If you have downloaded the source code from the CherryPy subversion repository, then you should have a directory called svn.cherrypy.org. Then type the following commands:

cd {svn.cherrypy.org/trunk}

Then issue the following command (as root if you are under Unix/Linux):

python {setup.py} {install}

Alternately, since CherryPy has no dependencies, you don't have to run setup.py. Instead, checkout /trunk/cherrypy into a directory which is on your Python path, such as site-packages/cherrypy.




* config설정


cherrypy.config.update({'server.socket_host': '0.0.0.0',
                            'server.socket_port': 9999, })

conf = {'/images': {'tools.staticdir.on': True,
        'tools.staticdir.dir': '/home/eur/cherrypy/images'}}

cherrypy.quickstart(Root(), '/', config=conf)

댓글 없음:

댓글 쓰기