#Create new Instance in AWS GUI #Create new security group with open ports 22 and 80

Similar documents
Aliases are set manually or in a login script. Aliases that were set manually will be gone the next time you login.

Technical White Paper NetBackup 8.1 and later. NetBackup in the AWS Cloud: Required setup to use Amazon EFS as the NetBackup CloudCatalyst cache

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Linux Essentials Objectives Topics:

Adding a block devices and extending file systems in Linux environments

If you had a freshly generated image from an LCI instructor, make sure to set the hostnames again:

Review of Fundamentals

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes

Cluster of Web-Servers with AWS

Precursor Steps & Storage Node

Deploying Rubrik Datos IO to Protect MongoDB Database on GCP

labibi Documentation Release 1.0 C. Titus Brown

Amazon Web Services Hands On S3 January, 2012

Topic 2: More Shell Skills

www highskills pt pt

UNIX System Programming Lecture 3: BASH Programming

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev

Quick start guide for Infscape UrBackup Appliance on Amazon Web Services

FreeBSD Install VIM Editor Without X11 GUI

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Practical 4. Linux Commands: Working with Directories

Basic Linux Command Line Interface Guide

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Environment Variables

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Systems Administration Getting Started with Linux

Disks, Filesystems 1

Illustrated Steps to create greggroeten.net with AWS

Linux at the Command Line Don Johnson of BU IS&T

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Linux and Git Boot Camp

Tutorial 1. Account Registration

Basic Linux Command Line Interface Guide

Figure 1 0: AMI Instances

Installing MooseFS Step by Step Tutorial. Core Technology Development & Support Team

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Defensie Exercises preparing for the exam.

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

UNIX Quick Reference

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Red Hat.Actualtests.EX200.v by.Dixon.22q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator (RHCSA) Exam

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Environment Variables

Control-M Workload Automation

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

High Availability & Fault Tolerance of the Deployment Manager using NFS on Linux

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Lab 2: Linux/Unix shell

RG-MACC_2.0 Installation Manual

Exercise 1: Basic Tools

CIT 668: System Architecture

Seltestengine EX200 24q

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Topics. Installation Basics of Using GNU/ Linux Administration Tools

Chapter 6. Linux File System

Part 1: Installing MongoDB

CST Algonquin College 2

DEVOPS COURSE CONTENT

Image Management Service. User Guide. Issue 03. Date

COMS 6100 Class Notes 3

Amazon Web Services EC2 Helix Server

Installing Altiris Agent on Ubuntu

CHE3935. Lecture 1. Introduction to Linux

Introduction to Containers

CMU MSP Intro to Hadoop

Vendor: RedHat. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator - RHCSA. Version: Demo

Linux shell scripting Getting started *

Introduction to Linux Workshop 1

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More

AWS Course Syllabus. Linux Fundamentals. Installation and Initialization:

Log into Linux Reminders: Homework 1 due today; Homework 2 due on Thursday Questions?

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

Lassoing the Clouds: Best Practices on AWS. Brian DeShong May 26, 2017

Lassoing the Clouds: Best Practices on AWS. Brian DeShong May 26, 2017

EX200 EX200. Red Hat Certified System Administrator RHCSA

Linux Command Line Primer. By: Scott Marshall

Introduction to the UNIX command line

Introduction to UNIX Command Line

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Lecture 4. Log into Linux Reminder: Homework 1 due today, 4:30pm Homework 2 out, due next Tuesday Project 1 out, due next Thursday Questions?

IBM AIX Basic Operations V5.

Critical Analysis and last hour guide for RHCSA/RHCE Enterprise 7

CompTIA Linux Course Overview. Prerequisites/Audience. Course Outline. Exam Code: XK0-002 Course Length: 5 Days

It is recommended to complete the tutorial using a web browser from the same operating system as your Putty or SSH client (e.g. Ubuntu terminal).

Chapter 7. Getting Started with Boot from Volume

Bourne Shell (ch 8) Overview. Bourne Shell. Bourne Shell. Bourne Shell. Bourne Shell. Redirect standard error. Redirect standard error

Linux Bootcamp Fall 2015

Lab Working with Linux Command Line

Linux Systems Security. Backup and Change Management NETS Fall 2016

Zadara Enterprise Storage in

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

EX200.exam.35q. Number: EX200 Passing Score: 800 Time Limit: 120 min. EX200. Red Hat Certified System Administrator RHCSA

Linux crash lecture by Andrey Lukyanenko

Cloud Computing /AWS Course Content

Transcription:

#Create new Instance in AWS GUI #Create new security group with open ports 22 and 80 #Connect to Newly created EC2 Instance ssh i ~/.aws/aws_test.pem ec2 user@52.74.47.51 #Update EC2 instance with latest security patches and application updated sudo yum y update #Install nginx webserver sudo yum y install nginx #Add nginx web server to start with EC2 instance boot sudo /sbin/chkconfig levels 235 nginx on #Start nginx sudo /etc/init.d/nginx start #check if nginx is running ps ef grep nginx #Create New User in IAM aws_tst in GUI #Add credentials for AWS console for newly created IAM aws_tst user mkdir ~/.aws && vim ~/.aws/credentials [default] aws_access_key_id=xxxxxxxxxxxxxxxxxxxx aws_secret_access_key=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy region=ap southeast 1 output=json #Create 2 new groups 1. Read only IAM 2. Full access EC2 and S3 #Add users to the groups #List existing users aws iam list users #List groups aws iam list groups #List existing Volumes aws ec2 describe volumes output table #Create New 1G volume aws ec2 create volume size 1 availability zone ap southeast 1a volume type standard

#List Instance ID and Volume ID aws ec2 describe instances grep InstanceId aws ec2 describe volumes grep VolumeId #Attache volume to newly created instance aws ec2 attach volume volume id vol 81a1be94 instance id i 343d86f8 device /dev/xvdf #Check on volume attachment lsblk ; sudo file s /dev/xvdf # format volume ext4 jfs sudo mkfs t ext4 /dev/xvdf && sudo file s /dev/xvdf #Backup nginx web root folder tar cvpzf nginx_html_backup.tar.gz /usr/share/nginx/html/ #Backup fstab sudo cp /etc/fstab /etc/fstab.orig #mount 1G volume as /usr/share/nginx/html/ sudo mount /def/xvdf /usr/share/nginx/html/ #add automount during boot sudo vim /etc/fstab #Add below entry to the end of the file /dev/xvdf /usr/share/nginx/html ext4 defaults,nofail 0 2 #Check mounted partitions mount #Create new index.html file sudo vim /usr/share/nginx/html/index.html #Add below into the file <!DOCTYPE html> <html> <body> <h1 style="font family:courier; font size:40px; background color:white; font color:black; text align:center">hello AWS World</h1> </body> </html> #Test html curl localhost v #Create S3 new bucket aws s3api list buckets aws s3api create bucket create bucket configuration LocationConstraint=ap southeast 1 bucket=awstst aws s3 ls #or

aws s3api list buckets #Add bucket policy # create policy file vim policy.json { "Version":"2008 10 17", "Id":"http referer policy example", "Statement":[ { "Sid":"readonly policy", "Effect":"Allow", "Principal":"*", "Action":"s3:GetObject", "Resource":"arn:aws:s3:::awstst/*" } ] } #apply policy aws s3api put bucket policy bucket awstst policy file://policy.json #Take required screenshots #Uploda 3 screenshots to S3 awstst bucket #Change permissions for uploaded screenshots files to allow everybody read only access #Upload addition Screenshots Ex. Route 53 DNS config # List S3 objects in bucket awstst aws s3api list objects bucket awstst #or aws s3api list objects bucket awstst # copy cfg files to S3 bucket awstst aws s3 cp /etc/fstab s3://awstst/ aws s3 cp /etc/nginx/nginx.conf s3://awstst/

#Final index.html <!DOCTYPE html> <html> <body> <h1 style="font family:courier; font size:40px; background color:white; font color:black; text align:center">hello AWS World</h1> <p style="font family:courier; font size:20px; background color:white; font color:black; text align:center">the mounted EBS volume</p> <center><img src="https://s3 ap southeast 1.amazonaws.com/awstst/screen shot1.png" width="770" height="158" align="middle"></img></center> <p style="font family:courier; font size:20px; background color:white; font color:black; text align:center">the index.html file resides within EBS</p> <center><img src="https://s3 ap southeast 1.amazonaws.com/awstst/screen shot2.png" style="width:548px;height:171px;border:0"></img></center> <p style="font family:courier; font size:20px; background color:white; font color:black; text align:center">the web server has been configured to serve index.html from the EBS volume</p> <center><img src="https://s3 ap southeast 1.amazonaws.com/awstst/screen shot3.png" width="780" height="633"></img></center> <a href="https://s3 ap southeast 1.amazonaws.com/awstst/Route53_DNS_Config.png">Route 53 config</a> <a href="https://s3 ap southeast 1.amazonaws.com/awstst/fstab">fstab config</a> <a href="https://s3 ap southeast 1.amazonaws.com/awstst/nginx.conf">nginx WEB server config</a> <a href="https://s3 ap southeast 1.amazonaws.com/awstst/Work_Book.pdf">Steps in setting up the enviroment</a> </body> </html>

http://www.mudrii.com/ > Direct IP Address http://mudrii.com/ > Load Balancer http://awstst 403626838.ap southeast 1.elb.amazonaws.com/ http://52.74.47.51/ #Additional configuration for shell to make life easier vim.bashrc #.bashrc # Source global definitions if [ f /etc/bashrc ]; then. /etc/bashrc fi # User specific aliases and functions [ z "$PS1" ] && return PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[m\] \[\e[1;32m\]\$ \[\e[m\]\[\e[1;37m\] ' export EDITOR=vim set o noclobber shopt s histappend export HISTSIZE=1000 export HISTFILESIZE=1000 export HISTTIMEFORMAT='%F %T ' PROMPT_COMMAND="history a;$prompt_command" HISTCONTROL=ignoreboth eval `dircolors b` export GREP_COLOR="1;33" alias ls='ls color=auto' alias grep='grep color=auto' alias ll="ls lh" alias la="ls a" alias mv='mv i' alias rm='rm i' alias cp='cp i' alias exit="clear ; exit" export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' echo ne "Hello, $USER! Today is $(date).\n\n" cal

echo ne "System Info: $(uptime)\n\n" cat.nanorc set autoindent include "/usr/share/nano/c.nanorc" include "/usr/share/nano/perl.nanorc" unset backup set nonewlines set tabsize 4 set nowrap cat.inputrc "\eoa": history search backward "\e[a": history search backward "\eob": history search forward "\e[b": history search forward "\eoc": forward char "\e[c": forward char "\eod": backward char "\e[d": backward char "\C x\c r": re read init file set match hidden files off set page completions off set completion query items 350 set show all if ambiguous on set bell style none sudo file s /dev/xvdf df h pwd ; ls ltrah aws iam get account summary