Compile python on Dreamhost and install django

Source: Internet
Author: User
Tags install django
Compile python on Dreamhost and install django-Linux Enterprise Application-Linux server application information. The following is a detailed description. Python 2.5 installation steps:

Wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
Tar-zxvf Python-2.5.2.tgz
Cd Python-2.5.2
./Configure -- prefix = $ HOME/lib -- enable-unicode = ucs4
Make
Make install

Python 2.5 has been installed. Set python 2.5 to the default version:

Mkdir $ HOME/bin
Mkdir $ HOME/bin/python
Mkdir $ HOME/bin/python/bin
Ln-s $ HOME/lib/bin/python $ HOME/bin/python

Then, add one in $ HOME. bash_profile:

Export PATH = $ HOME/bin/python/bin: $ HOME/lib/bin: $ PATH

Reload the configuration file:

Source ~ /. Bash_profile

Check whether the operation is successful. Input python and the following code is displayed:

Python 2.5.2 (r252: 60911, Apr 4 2008, 22:51:28)
[GCC 3.3.5 (Debian. 3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Mysql-python Installation

Wget http://nchc.dl.sourceforge.net/s... python-1.2.2.tar.gz
Tar-zxvf MySQL-python-1.2.2.tar.gz
Cd MySQL-python-1.2.2
Python setup. py build
Python setup. py install

Install django

Sudo wget-c http://media.djangoproject.com/releases/0.96/Django-0.96.tar.gz
Tar xzvf Django-0.96.tar.gz
Cd Django-0.96
Sudo python setup. py install

Test whether django is successfully installed.

Cd ~
Startproject djangosite django-admin.py
Cd djangosite
Sudo chmod + x manage. py
Python manage. py runserver

Display

Validating models...
0 errors found.

Starting server on port 8000 with settings module 'newtest. setting '.
Go to http: // 127.0.0.1: 8000/for Django.
Quit the server with a CONTROL-C (Unix) or CTRL-BREAK (Windows ).

Install flup

Sudo wget-c http://www.saddi.com/software/flup/dist/flup-0.5.tar.gz
Tar xzvf flup-0.5.tar.gz
Cd flup-0.5
Sudo python setup. py install
Related Article

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.