EC2 is an elastic cloud service provided by Amazon (Amazon.com);
Apache is a cross-platform Web server-side software that enables programs written in Python, PHP, Perl, and other languages to run on the server;
Django is a Web application framework that can be used to make the Python Web program easier to write.
Amazon S3 is the cloud storage service provided by Amazon;
Combined with Amazon S3, Amazon EC2 provides virtually unlimited storage space and unlimited computing power.
All of these things together, you can use the easy-to-use Python to make a massive data processing function of the Web site, feel that this thing should be in high-throughput sequencing data processing a little bit.
Here are the steps to deploy Apache and Django on Amazon EC2:
0. First, AWS is required to create a EC2 Instance, using Ubuntu Linux system, can directly select Ubuntu official ami,id for AMI-CEF405A7,EC2 in community ami The establishment of the instance is not complicated, it is not in detail here. Note: The user name is Ubuntu, not ec2-user, or root when you log in with SSH after the build is done.
1. Installing Apache
sudo apt-get install apache2
2. Download and install Django
wget http://www.djangoproject.com/download/1.3/tarball/
Download the file name is index.html, change the name
MV Index.html django-1.3.tar.gz
Extract
Tar xzvf django-1.3.tar.gz
Installation
CD Django-0.91
sudo python setup.py install
3. Installing Mod_python
Apt-get Install Libapache2-mod-python
4. Restart Apache
/etc/init.d/apache2 start
5. Go to the/etc/apache2/sites-available directory, copy the default file and rename it to MySite
Edit the MySite file to replace the/var/www with/home/ubuntu
Activating MySite
A2ensite MySite
Then run/etc/init.d/apache2 Reload
6. Edit/etc/apache2/httpd.conf and add the following:
SetHandler Python-program
Pythonhandler Django.core.handlers.modpython
SETENV Django_settings_module mysite.settings
PythonPath "['/home/ubuntu ', '/home/ubuntu/mysite '] + sys.path"
7. Restart Apache
/etc/init.d/apache2 restart
Now, copy the EC2 public DNS (like this ec2-xx-xx-xx-xx.compute-1.amazonaws.com) into the browser address bar to see the results.
If you want to access the above deployment through your domain name, just create a CNAME record in Domain name management and point to the address above.
The next task is to concentrate on writing the program in Python.
Reprinted from: http://www.yelinsky.com/blog/archives/370.html
The Django project is uploaded to the AWS server