0% found this document useful (0 votes)
4 views

Module 2

bio tech
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Module 2

bio tech
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

lOGIN- ubuntu

ec2-user

clear

sudo apt-get update

clear

sudo apt-get install apache2 (ubuntu)


sudo yum install httpd (amazon linux and suse)

AMI DEMO :

cd /var/www/html

ls

sudo rm index.html

ls

sudo nano index.html

(type msg)

EBS Mounting in EC2

lsblk (show all block devices i.e.. ebs)

sudo su (to become super user)

file -s /dev/xvdf (if it shows data that means it is not formated)

file -s /dev/xvda (root has file system)

mkfs -t ext4 /dev/xvdf (create file system for ebs)

file -s /dev/xvdf (now file system is created)

lsblk

clear

ls

mkdir ebsvolume ( to mount drive we have to create a folder, ebs volume is name of
folder)

ls

mount /dev/xvdf ebsvolume (mount command to mount device xvdf to folder ebsvolume)

ls

lsblk
cd ebsvolume/ (to add file into this folder)

nano 1.txt 2.txt

ls

cd .. (come back)

umount /dev/xvdf

ls

lsblk

cd ebsvolume

ls

cd ..

mount /dev/xvdf ebsvolume

cd ebsvolume

ls
clear
cd ..

resizing volume (first go and resize from portal)

lsblk

df -h

resize2fs /dev/xvdf

df -h

snapshot(ceraete snapshot of ebs volume from portal and the unmount ebs )

umount /dev/xvdf (then delete ebs)

lsbsk

ls

sudo mount /dev/xvdf

ls

File share demo (craete file share in portal )

sudo apt-get -y install nfs-common

mkdir efs ( craete directory)

run command given n portal


lsblk (will not show bcuse it is not a block storage)

df -h

cd efs

sudo touch 1.txt 2.txt

ls

cd ..

unmount sudo efs

ls

cd efs

ls

cd ..

paste same mount command from portal


cd efs
ls

now second server

You might also like