首页 > 代码库 > Lab_1_SysOps_Compute_Linux_v2.5

Lab_1_SysOps_Compute_Linux_v2.5

System Operations - Lab 1: Creating Elastic Compute Cloud (Amazon EC2) Instances (Linux) - 2.5==================================================================================================================Using this command reference.==================================================================================================================1. Locate the section you need. Each section in this file matches a section in the lab instructions.2. Replace items in angle brackets - < > - with appropriate values. For example, in this command you would replace the value - <JobFlowID> - (including the brackets) with the parameter indicated in the lab instructions:   elastic-mapreduce --list <JobFlowID>.   You can also use find and replace to change bracketed parameters in bulk.3. Do NOT enable the Word Wrap feature in Windows Notepad or the text editor you use to view this file.++++1. Creating Instances++++==================================================================================================================1.2 Create Command Host==================================================================================================================1.2.8 Paste text into user data textbox#!/bin/bashyum update -y==================================================================================================================1.6 Create Web Server==================================================================================================================1.6.1 Save user datawget https://d2lrzjb0vjvpn5.cloudfront.net/sys-ops/v2.5/lab-1-compute-linux/static/UserData.txt1.6.2 Run command to create Web server instanceaws ec2 run-instances --image-id <ami-id> --user-data file:///home/ec2-user/UserData.txt --key-name <key-name> --security-group-ids <sg-id> --instance-type t2.micro --subnet-id <subnet-id> --associate-public-ip-address --query ‘Instances[*].InstanceId‘1.6.3 Assign Name tag to instanceaws ec2 create-tags --resources <instance_id> --tags ‘Key=Name,Value=http://www.mamicode.com/WebServer‘>

Lab_1_SysOps_Compute_Linux_v2.5