Download presentation
Presentation is loading. Please wait.
Published byPeter Brown Modified over 8 years ago
1
Your EC2 Instance
2
How to Connect to your EC2 Instance?
3
Connect from Unix/Linux/Mac You would need the key you downloaded [yshi5@science EC2]$ chmod 400 MyKeyPair.pem [yshi5@science EC2]$ ssh -i MyKeyPair.pem ec2-user@ec2-54-200-23-92.us- west-2.compute.amazonaws.com
4
Connect EC2 Instance from Windows On your computer, please download PuTTY,PuTTYgen, and Psftp from On your computer, please download PuTTY,PuTTYgen, and Psftp from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
5
Convert the KeyPair associated with your instance from.pem file to.ppk file by using PuTTYgen Convert the KeyPair associated with your instance from.pem file to.ppk file by using PuTTYgen 1. Load you.pem file 2. Save it as.ppk file
6
Then use PuTTY to ssh your EC2 instance Then use PuTTY to ssh your EC2 instance Public DNS of your EC2 instance
7
Load the.ppk file
8
You can save your configuration for next use Then click “Open”
9
Login as ec2-user
10
Part II: Install Apache HTTP Server on your Instance Part II: Install Apache HTTP Server on your Instance
11
Connected to EC2 instance Check software package installed Check software package installed yum list installed yum list installed | more
12
Update all your currently installed package Update all your currently installed package sudo yum –y update sudo yum –y update
13
Install lynx – a text based browser Install lynx – a text based browser sudo yum install lynx sudo yum install lynx Install C++ compiler Install C++ compiler sudo yum install gcc sudo yum install gcc Install make Install make sudo yum install make sudo yum install make Install httpd Install httpd sudo yum install httpd sudo yum install httpd sudo service httpd start sudo service httpd stop sudo service httpd restart
14
Test Your Web Server
15
Part III Transfer files from and to your EC2 Instance Part III Transfer files from and to your EC2 Instance
16
Transfer from/to your Unix/Linux/Mac $ cd ~/.ssh create a file named “config”, add the following two lines to this file: (If this file already exists, add the following two lines to the end of the file) host ec2-107-21-71-113.compute-1.amazonaws.com identityFile ~/Keypairs1.pem Public DNS of your EC2 Your Keypair file
17
Use sftp to connect to your EC2 Upload file download file Ends sftp [yshi5@science ~]$ sftp ec2-user@ec2-54-187-156-132.us-west-2.compute.amazonaws.com Connecting to ec2-54-187-156-132.us-west-2.compute.amazonaws.com... sftp> put MyKeyPair2.pem Uploading MyKeyPair2.pem to /home/ec2-user/MyKeyPair2.pem MyKeyPair2.pem 100% 1692 1.7KB/s 00:00 sftp> get try.txt Fetching /home/ec2-user/try.txt to try.txt /home/ec2-user/try.txt 100% 6 0.0KB/s 00:00 sftp> bye [yshi5@science ~]$
18
Transfer file from/to Windows Open PuTTY, save the session of the connection to your EC2 Open PuTTY, save the session of the connection to your EC2
19
Open the session List the files under the current direction on EC2 Change directory on EC2 Upload file Close the session
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.