EC2 environment construction and EC2 Environment Construction
Ec2 usage
1. register an account with Amazon, enter a credit card number, and enter the verification code on the computer page.
2. Select a region to create a linux instance (I select centos6.5 ).
3. When creating an instance, you will choose to create a new key-pair with a random name, and then download xx. pem files (note that this file must not be lost, or you will not be able to connect to your instance later)
After the installation is completed, download the full version of putty.exe (including the full version of puttygen.exe ).
5. Open puttygen.exe, select load, find the xx. pem file that you saved, and then choose to save the private key (that is, the private option)
6. Open putty and enter root @ + dns (dns is the public dns on your ec2 console instance). No Password is required here, you only need to save xx. ppk file.
7. There is an auth option under the ssh option. Click Open and select brower. Find the ppk file that you saved and click open to connect to your instance.
8. After connecting to the instance, you need to install apache, tomcat, jdk, and other files.
9. Install jdk, maybe the built-in linux is openjdk, here is how to install the jdk sun (http://tecadmin.net/steps-to-install-java-on-centos-5-6-or-rhel-5-6 ).
10. install tomcat (http://tecadmin.net/steps-to-install-tomcat-server-on-centos-rhel/) after jdk installation ).
11. linux generally comes with apache. You can run the command to view it (rpm-qa | grep httpd). If not, (yum list | grep httpd ), in the list, you can install yum (yum install httpd ).
12. After completing the preceding steps, you will not be able to access your apache or tomcat. If (ps-aux | grep httpd) does not have this process, start apache (service httpd start)
13. To access the above apache welcome page, you need to select your own instance in security groups, right-click and choose edit inbound rules to add Port 80 of http, of course, you can also add tomcat port 8080.
14. After port 80 is added, your apache will be able to access the welcome page. If you open the tomcat port 8080, but you cannot access it, it is normal, because you still need to open the port 8080 in iptables, otherwise you will not be able to access it.
15. enable port 8080 in iptables, vi etc/sysconfig/iptables (-a input-m state -- state NEW-m tcp-p tcp -- dport 8080-j ACCEPT), save and exit, restart iptables (/etc/init. d/iptables restart.
Frequently Used viewing software installation location
Rpm-ql subversion
Svn initialization structure directory
Svn mkdir file: // home/project/svn/myrepo/{trunk, tags, branches}-m "initial directory structure"
Svn Create initial repository structure
Htpasswd-cm/etc/svn-auth-conf yourusername
Htpasswd-m/etc/svn-auth-conf anotherusername
I hope it will be available in the future. I would like to thank Amazon for providing free services. However, it is recommended that you do not have to pay for a paid project.
Note: To delete an ec2 instance, stop it first, and delete non-default and key pair in security groups. The instance disappears in a few hours,
He will not disappear immediately, so don't worry.
What does ec2 instance mean?
Amazon EC2
Amazon Elastic Compute Cloud (EC2) is a basic platform for Amazon's Cloud computing environment. By using EC2, you can easily create, start, and supply virtual instances at any time based on individual or enterprise needs. You are billed Based on the instance type and the actual usage per hour. The virtual server runs in the secure environment of the Amazon data center.
EC2 provides the following functions for Web applications:
Dynamically configure computing requirements.
Adjust the computing capability as needed.
In today's Web-driven environment, website traffic may rush to the peak (for example, because your website is mentioned on the Yahoo homepage), and then fall to the bottom in an hour. Now, the computing capability can be quickly improved and reduced in an elastic way. This new Elastic Computing Model provides some very valuable features:
Reliability EC2 can easily supply instances and destroy them when they are no longer needed. Simplicity EC2 provides strong flexibility for system design based on simple concepts. Amazon provides all the building blocks required. You can combine them based on the Use Cases of your application. Security EC2 provides a high level of security. All instances are running in Amazon's data center. You can also restrict access to a trusted group by configuring firewall rules. Flexibility enhances application flexibility by placing instances in different geographic locations and using persistent storage volumes with a life cycle independent of the instance. The low-cost EC2 service meets all your server needs at a very low rate.
How to build a private cloud platform
Alibaba Cloud Amazon EC2 is a public cloud computing platform and belongs to IaaS (Infrastructure as a service.
There is now an open-source project Eucalyptus (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems), which also implements the functions of Amazon EC2 due To its open-source nature, it is doomed to build a private cloud computing platform. it is more convenient that the Ubuntu9.10 server version has integrated the Eucalyptus open source software, making it easy and simple to build an enterprise private cloud computing platform.
Next we will build this private cloud computing platform step by step.
1. Preparations
1) Prepare at least two machines. Of course, I use the Virtual Machine Software (Sun VirtualBox) to virtualize the two actual machines (if you also use Sun VirtualBox, some precautions, see Appendix 1)
2) underlying operating system: Ubuntu9.10 Server Edition (www.ubuntu.com/cloud)
3) cloud service environment: Eucalyptus (embedded in Ubuntu9.10 Server Edition) eucalyptus.com/
4) Eucalyptus command line Client
5) Eucalyptus client: Elastic Fox, which is a firefox plug-in
Pieces: pai.amazonwebservices.com/..id=609
--------------------------------------------------------------------------
2. Building cloud computing services (it is very simple to use the Wizard provided by Ubuntu)
1) A machine named ubuntu-Cluster as the Front End. It contains the following parts:
1. Cloud Controller (clc)
2. Cluster Controller (cc)
3. Walrus (the S3-like storage service)
4. Storage Controller (SC)
5.
2) At least one machine, named "ubuntu-node1", contains the following parts:
Node Controller (nc)
3) install the basic system: Ubuntu9.10 Server
1. Select "Install Ubuntu Enterprise Cloud" During Installation Guide"
2. During installation, if the prompt "Cluster" or "Node" is displayed, select Cluster
3. During the installation process, when the message "Configure postfix" is displayed, select the remaining full text>