User Tools

Site Tools


test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
test [2017/07/23 16:07] walkeradmintest [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Creating an Amazon AWS EC2 Instance ======
 +<color darkorange>May 2017</color>
 +\\ 
 +\\ 
 +
 +----
 +===== Introduction =====
 +\\ 
 +This guide assumes that you have created an Amazon account to be able to access the Amazon Web Services (AWS) pages, and that you have successfully logged in.
 \\  \\ 
 \\  \\ 
Line 78: Line 87:
 \\  \\ 
 Click <color #ff7f27>Add Rule</color> and select <color #ff7f27>HTTP</color> as the type. <color #ff7f27>0.0.0.0/0, ::/0</color> means accept traffile from any IP Address. For the SSH I would limit that to your own IP (say your work or home IP). Click <color #ff7f27>Add Rule</color> and select <color #ff7f27>HTTP</color> as the type. <color #ff7f27>0.0.0.0/0, ::/0</color> means accept traffile from any IP Address. For the SSH I would limit that to your own IP (say your work or home IP).
 +\\ 
 +\\ 
 +Now you can select <color #ff7f27>Review and Launch</color>.
 +\\ 
 +\\ 
 +You will be shown a review screen of your selected settings.
 +\\ 
 +\\ 
 +{{ :aws_009.png?850 |}}
 +\\ 
 +If you are happy, select Saunch in the bottom right hand corner of the page.
 +\\ 
 +\\ 
 +You will be presented with a pop up that is asking about <color #ff7f27>Key Pairs</color>. When using SSH, <color #ff7f27>key pairs</color> are used rather than a simple username and password as <color #ff7f27>key pairs</color> are much more secure.
 +\\ 
 +\\ 
 +{{ :aws_010.png?600 |}}
 +\\ 
 +Where you see <color #ff7f27>Choose an existing key pair</color>, you need to change this to <color #ff7f27>Create a new key pair</color>.
 +\\ 
 +\\ 
 +{{ :aws_011.png?600 |}}
 +\\ 
 +Select a new for the new key pair, and click the <color #ff7f27>Download Key Pair</color> button.
 +\\ 
 +\\ 
 +You will see the <color #ff7f27>.pem</color> file download (this is browser specific).
 +\\ 
 +\\ 
 +Click the <color #ff7f27>Launch Instances</color> button.
 +\\ 
 +\\ 
 +{{ :aws_013.png?850 |}}
 +\\ 
 +The next page confirms that your instance is launching.
 +\\ 
 +\\ 
 +Click the <color #ff7f27>View Instances</color> button.
 +\\ 
 +\\ 
 +{{ :aws_014.png?850 |}}
 +\\ 
 +On this page we can see the information about our instance. The part we will need initially is the IP Address.
 +\\ 
 +\\ 
 +
 +----
 +==== Connecting to the EC2 Instance ====
 +\\ 
 +To connect to the EC2 instance you will need your <color #ff7f27>IP Address</color> (obtained from the EC2 Status Page) and you will need the .pem <color #ff7f27>key pair</color> file you downloaded.
 +\\ 
 +\\ 
 +{{ :aws_15.png?850 |}}
 +\\ 
 +If you have neither of these, please read the entire guide.
 +\\ 
 +\\ 
 +To be able to connect you will need a suitable SSH program, of which there are many. The most popular is probably Putty, however to use putty you need to use Puttygen to convert the .pem key first. So I am using another free application called <color #ff7f27>MobaXterm</color> which you can download from [[http://mobaxterm.mobatek.net/|HERE:]]
 +\\ 
 +\\ 
 +Once installed, run MobaXterm.
 +\\ 
 +\\ 
 +{{ :ssh_001.png?600 |}}
 +\\ 
 +At the top of the page, select <color #ff7f27>Session</color>.
 +\\ 
 +\\ 
 +Then select <color #ff7f27>SSH</color>.
 +\\ 
 +\\ 
 +{{ :ssh_002.png?600 |}}
 +\\ 
 +The SSH Page will open and we have to enter the following information.
 +\\ 
 +\\ 
 +{{ :ssh_003.png?600 |}}
 +\\ 
 +**Remote Host:** This is the IP Address of your EC2 Instance.
 +**Advanced Settings:** Click this tab, select<color #ff7f27> Use Private Key</color> and navigate to where you saved your <color #ff7f27>key pair</color>.
 +\\ 
 +\\ 
 +Click <color #ff7f27>OK</color>.
 +\\ 
 +\\ 
 +MobaXterm will now connect to your EC2 instance, using your key pair to authenticate.
 +\\ 
 +\\ 
 +{{ :ssh_004.png?600 |}}
 +\\ 
 +You will have to enter a password. The default password is <color #ff7f27>ec2-user</color> (case sensitive)
 +\\ 
 +\\ 
 +Once you enter the password you should be at the console.
 +\\ 
 +\\ 
 +{{ :ssh_005.png?600 |}}
 +\\ 
 +You can now enter standard Linux commands, that's it, you are now connected to your EC2 instance.
 +\\ 
 +\\ 
 +
 +----
 +==== Install the Web Server ====
 +\\ 
 +As this example is a simple web server, lets install a web server and give it a little test. 
 +\\ 
 +\\ 
 +First thing to do is to navigate to the IP Address of you EC2 instance, to ensure there is nothing already running.
 +\\ 
 +\\ 
 +{{ :websvr_001.png?850 |}}
 +\\ 
 +You should see that there is nothing on this IP Address.
 +\\ 
 +\\ 
 +So we can install a web server. Open MobaXterm and from the command line enter:
 +\\ 
 +    sudo yum install httpd -y
 +\\ 
 +\\ 
 +This will install Apache web server, and configure the basic system files required for it to run.
 +\\ 
 +\\ 
 +Once installed, you will have to start the Apache service. You can do this with:
 +\\ 
 +    sudo service httpd start
 +\\ 
 +You should see a confirmation that looks like: Starting httpd:  [  <color #22b14c>OK</color>  ]
 +\\ 
 +\\ 
 +Now you can retest your connection from a web browser.
 +\\ 
 +\\ 
 +{{ :websvr_002.png?850 |}}
 +\\ 
 +You should see an Apache test web page, this means your server is running and you can start to build and upload your test website.
 \\  \\ 
 \\  \\ 
  
test.1500822478.txt.gz · Last modified: 2023/03/09 22:35 (external edit)