|
Installing Pylons 0.9.4.1 on Suse 10.2 with Python version 2.5 .
Install the following software and depends from Yast2 :
Apache2 Python 2.5 mod_python python-devl python-xml
subversion subversion-python
GCC
Download easy_install setup.
at the command prompt issue the following command (assuming you're in the directory that has the easy_install setup script you downloaded.):
# su (login as root) # python ez_setup.py -d /usr/lib/python2.5/site-packages
You must define the path or it will point to /usr/local/lib/python2.5/site-packages and fail.
If that was successful issue this command still logged in as root:
# python easy_install-2.5 -d /usr/lib/python2.5/site-packages/ Pylons
# python easy_install -d /usr/lib/python2.5/site-packages -U PasteScript==dev
Add /usr/lib/python2.5/site-packages/ to your path or you will have to type this each time you issue the paster command.
Open Yast2 (Administrator settings) and select Network Services. Click HTTP Server and follow the instructions. This will start Apache.
Back at the terminal exit root and setup a web project for testing, we will call it test:
# exit (if you're still logged on as root.) # python paster create --template=pylons test OR if you didn't add site-package to your path. # python /usr/lib/python2.5/site-packages/paster create --template=pylons test
You will find test under your home directory. Lets make sure it works. Edit the development.ini file in the test directory.
change:
[server:main] use = egg:Paste#http host = 0.0.0.0 port = 5000
to:
[server:main] use = egg:Paste#http host = localhost port = 5000
Save and close. Go back to the terminal, not as root, and issue:
# cd test # python paster serve --reload development.ini OR if you didn't add site-package to your path. # python /usr/lib/python2.5/site-packages/paster serve --reload development.ini
Open your web browser and enter http://localhost:5000
You should see "Welcome to your Pylons Web Application" with instructions to get you going. If you have problems check your Python paths and be sure to read the docs on the Pylons site. |