Build a python + apache + django development environment in Ubuntu

Source: Internet
Author: User
Author: aolinks & quot; install MySql & quot; you can find and install it in softwarecenter, and install the client of both the administrator and querybrowser gui. it is better to maintain mysql later. & quot; install python2.6 & quot; you can find and install it in softwarecenter. & quot; security.

 

Author: aolinks

"Install MySql

 

"You can find and install the client in the software center, and install the client for both the administrator and query browser. it is easier to maintain mysql later.

 

"Install python2.6

 

"You can find and install it in the software center.

 

"Install apache2

 

Sudo apt-get install apache2

 

"Http: // localhost/check whether apache is successfully installed

 

"Install apache2 mod-python

 

Sudo apt-get install libapache2-mod-python

 

"Download django

 

Http://www.djangoproject.com/download/

 

"Run the following command to download and save the Directory (unzip and install)

 

Tar xzvf Django-1.2.1.tar.gz

 

Cd Django-1.2.1

 

Sudo python setup. py install

 

"Install MySql for python

 

Apt-get install python-mysqldb

 

After django is installed, will be installed in a file like/usr/local/lib/python2.6/dist-packages/directory/usr/local/lib/python2.6/dist-packages/django/bin/django-admin.py will automatically A symbolic connection to/usr/local/bin/django-admin.py is created to enter the/usr/local/bin/directory and set this file to run. chmod + x django-admin.py I use the vim editor: "To enable all-around complementing functionality during djongo development, in. in vimrc, set the following two variables: let $ PYTHONPATH = "/home/gnolux/develop/python/django_first/" let $ DJANGO_SETTINGS_MODULE = "mysite. settings "PYTHONPATH is set to the root directory of the project,

 

The entire environment is basically set up. for detailed development, refer:

 

Http://docs.djangoproject.com/en/dev/intro/tutorial01/

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.