1
00:00:00,510 --> 00:00:07,950
First of all, we will be launching one EC2 istance on AWS cloud that mean we will be launching our

2
00:00:07,950 --> 00:00:16,260
Web server on AWS cloud and then we will be installing the Apache Web server on that.

3
00:00:16,500 --> 00:00:19,080
And then we will see whether we are able to access.

4
00:00:19,090 --> 00:00:25,260
We are not going to cover just we will make one simple Web page and we will see whether we are able

5
00:00:25,260 --> 00:00:29,530
to access that Web site or not for practical purposes.

6
00:00:29,550 --> 00:00:30,920
We will be using AWS.

7
00:00:31,440 --> 00:00:32,280
EC2

8
00:00:32,640 --> 00:00:38,660
And you can get the AWS cloud free tier for one year.

9
00:00:39,000 --> 00:00:46,080
So we are assuming that you can create your free account on AWS type of thing.

10
00:00:46,890 --> 00:00:48,750
So here we will be looking at that.

11
00:00:49,320 --> 00:00:56,120
So first of all, what we will do, we will go into the AWS console, On AWS console.

12
00:00:56,140 --> 00:00:57,750
Lot of services are there.

13
00:00:58,050 --> 00:01:05,640
But what we are interested we are interested in this EC2, EC2 is used for creating virtual

14
00:01:05,640 --> 00:01:06,780
servers in the cloud.

15
00:01:07,000 --> 00:01:16,530
Or you can say that we can create virtual machines in the cloud, like for all the other labs.

16
00:01:16,530 --> 00:01:24,560
We created three VMS for the experimental purpose same way we can create the servers in the cloud.

17
00:01:24,930 --> 00:01:27,480
So for that we need EC2 service.

18
00:01:27,660 --> 00:01:30,870
So we will click on EC2 service.

19
00:01:31,710 --> 00:01:36,680
Then we will try to launch one instance how we are going to launch one instance.

20
00:01:37,020 --> 00:01:45,370
And please remember whenever you have to use AWS cloud, first of all, we need to create one key pair

21
00:01:45,750 --> 00:01:54,480
that public private key pair because whenever we are creating the VMS, we have to lock these VMS with our

22
00:01:55,590 --> 00:01:56,370
public key.

23
00:01:57,090 --> 00:02:02,010
Once we have locked our VMS with the public key, we can only open it with a private key.

24
00:02:02,280 --> 00:02:08,880
So we have to create the private key how we are going to create in our case, we have already created.

25
00:02:09,510 --> 00:02:15,660
If in your case it is not already created, then what you can do is create key pair.

26
00:02:16,110 --> 00:02:26,370
You can specify the name of the key and then you can download the key in PPK format or in PEM format.

27
00:02:26,880 --> 00:02:36,330
If you are downloaded in PEM format, then you need to convert that into PPK format by

28
00:02:36,330 --> 00:02:38,860
using some software like putty.

29
00:02:39,120 --> 00:02:41,760
But we have already done this thing.

30
00:02:42,300 --> 00:02:48,270
So Straightway, what we will do, we will go into our again EC2 dashboard.

31
00:02:48,870 --> 00:02:55,320
We will go to the instances, although in our case we have already launched that instance.

32
00:02:55,380 --> 00:02:59,490
I'm just going to tell you how we launched that instance.

33
00:03:00,060 --> 00:03:07,260
So whenever we are talking about the EC2 service, how to launch the instances, you have to say

34
00:03:07,440 --> 00:03:11,370
launch instance there, you will get this option.

35
00:03:11,580 --> 00:03:12,750
Launch instances.

36
00:03:14,620 --> 00:03:23,870
Now, a lot of choices are available, like Amazon linux2 AMI, MAC OS is there Redhat enterprise.

37
00:03:25,100 --> 00:03:28,050
So suse linux, Ubuntu, windows are there.

38
00:03:29,180 --> 00:03:30,420
Here we are going to choose.

39
00:03:30,430 --> 00:03:31,390
Amazon Linux.

40
00:03:31,390 --> 00:03:31,740
Why?

41
00:03:31,760 --> 00:03:38,280
Because it just behaves like the Centos7 that we have used in our other labs.

42
00:03:38,280 --> 00:03:44,800
So all the commands that we are comfortable there, they all will run in this Amazon Linux.

43
00:03:45,070 --> 00:03:50,170
And also other advantage is that it comes under free tier eligible.

44
00:03:50,590 --> 00:03:55,830
That mean when you're going to use it, there will be no charges for this operating system.

45
00:03:56,320 --> 00:04:00,000
So it is available for x86 architecture.

46
00:04:00,190 --> 00:04:07,380
And arm architecture also, but we are going to select 64 bit x86.

47
00:04:08,020 --> 00:04:09,790
So we are going to say select.

48
00:04:11,770 --> 00:04:19,860
Then you need to specify which processor you want to use, a lot of options are there in our case,

49
00:04:19,870 --> 00:04:28,010
we will keep it to t2.Micro, in which it is going to give us one virtual CPU, 1GB RAM although other

50
00:04:28,040 --> 00:04:28,420
you can also choose.

51
00:04:28,430 --> 00:04:35,790
like this is going to give you a 8 virtual cpu and 32GB RAM.

52
00:04:36,160 --> 00:04:41,200
But again, we want to keep our resources running under Free tier.

53
00:04:41,770 --> 00:04:44,950
So this comes under your free tier t2.micro.

54
00:04:45,310 --> 00:04:46,390
So we are going to choose.

55
00:04:46,900 --> 00:04:56,100
So we are going to say next configure detail, how many instances we just want one network subnet settings.

56
00:04:56,280 --> 00:05:02,050
OK, then what are you going to say add storage.

57
00:05:04,340 --> 00:05:10,250
Here, you can specify because by default, when you're going to launch a Linux machine cloud,

58
00:05:10,250 --> 00:05:15,950
it is going to give you 8GB, you can increase the size, but for this experiment, 8GB is more

59
00:05:15,950 --> 00:05:16,650
than sufficient.

60
00:05:16,940 --> 00:05:20,780
So we're going to keep as it and then add tag.

61
00:05:21,830 --> 00:05:22,550
What do you mean

62
00:05:22,550 --> 00:05:27,080
by tag like when we implement the physical servers, we name our servers.

63
00:05:27,260 --> 00:05:33,300
So some time in AWS, thousands of machine might be running.

64
00:05:33,320 --> 00:05:38,150
So we want to identify those machine so we can add the tag.

65
00:05:38,570 --> 00:05:44,510
How we can add the tag like name then we can specify.

66
00:05:47,330 --> 00:05:48,080
Apache.

67
00:05:50,050 --> 00:05:53,120
Server, anything you can specify.

68
00:05:55,980 --> 00:05:58,400
Then configure security group.

69
00:05:58,650 --> 00:06:05,610
Now, that is the most important thing in configures group mean by default when you are installing the

70
00:06:05,630 --> 00:06:09,960
Linux, it is automatically going to openssh port.

71
00:06:10,450 --> 00:06:16,750
But what other ports we need, we need because we have to implement HTTP servers.

72
00:06:16,950 --> 00:06:18,300
We need a http.

73
00:06:19,140 --> 00:06:24,660
So we are going to do http also then we will be doing https also.

74
00:06:27,460 --> 00:06:36,850
So it is opening 22, 80, and 43 ports, then review and lunch, and it is going to give you the

75
00:06:36,850 --> 00:06:38,830
information that everything is OK.

76
00:06:40,120 --> 00:06:49,360
You can double check all the things, then what you can say lunch, and then you have to select the

77
00:06:49,360 --> 00:06:51,790
key pair that you have already created.

78
00:06:52,030 --> 00:06:55,870
If you are not already created, what you can do, you can create it here.

79
00:06:56,440 --> 00:07:02,740
And then you have to acknowledge then you have to say launch instance, in every case we have already done

80
00:07:02,740 --> 00:07:04,980
this, then what we have to do.

81
00:07:05,290 --> 00:07:07,470
So in my case, I'm going to cancel it.

82
00:07:08,350 --> 00:07:14,200
So when we are going to lunch after two or three minutes, what it will show, it will show you the

83
00:07:14,200 --> 00:07:15,660
status that it is running.

84
00:07:16,330 --> 00:07:18,510
So then you are going to click it.

85
00:07:19,480 --> 00:07:22,800
Now you have to find out the details about this machine.

86
00:07:23,500 --> 00:07:30,820
The most important thing is because these all machines are given one private address, also public address

87
00:07:30,820 --> 00:07:31,180
also.

88
00:07:31,330 --> 00:07:37,120
So you have to note down this public address, once you have noted down this public address.

89
00:07:37,600 --> 00:07:43,300
Now, you need to connect with this instance which is running in this region ohio region.

90
00:07:43,900 --> 00:07:51,180
So you have to access it from the local machine because my local operating system is window.

91
00:07:51,400 --> 00:07:55,180
So what I have to do, I have to click on this.

92
00:07:55,180 --> 00:07:56,310
Putty tool is there.

93
00:07:57,040 --> 00:08:06,820
So here we are going to type the address, whatever addresses which has been allocated, then connection.

94
00:08:07,150 --> 00:08:14,050
Sometimes when there is inactivity for sometime, your connection with that machine will get lost.

95
00:08:14,350 --> 00:08:19,300
So you can specify this keepalive value what will happen.

96
00:08:19,960 --> 00:08:26,440
It will automatically keep on sending keepalive message that connection will not get terminated.

97
00:08:27,340 --> 00:08:34,660
Then you have to specify the data also, here by default, when you create that machine, one user

98
00:08:34,660 --> 00:08:38,740
get created the name of that user is EC2 user.

99
00:08:40,040 --> 00:08:52,700
then you have to specify your private key, in our case, the private key browse it is in some folder

100
00:08:52,700 --> 00:08:54,400
on desktop, vipin folder is there.

101
00:08:54,490 --> 00:09:01,840
So I am going to specify that now please remember when you are doing this, when we are going to say

102
00:09:01,840 --> 00:09:09,550
open the font size will be a little bit very small so you can go into the appearance and you can change

103
00:09:09,550 --> 00:09:10,270
the font.

104
00:09:11,830 --> 00:09:14,020
We are keeping a little bit larger font.

105
00:09:14,020 --> 00:09:18,880
So I'm saying, okay, then we are going to say open.

106
00:09:20,140 --> 00:09:23,050
Now what it will do, it will try to open.

107
00:09:23,680 --> 00:09:28,300
And if you are first time you are going to access this.

108
00:09:28,900 --> 00:09:34,720
So it will show you one message that whether it is safe to connect that machine.

109
00:09:34,720 --> 00:09:36,580
So there you are going to say yes.

110
00:09:37,300 --> 00:09:40,320
So by default, we are into which directory.

111
00:09:41,860 --> 00:09:44,200
Let us little bit change the color of this.

112
00:09:45,040 --> 00:09:55,060
So I will go into, we will see whether there are certain settings that change settings appearance.

113
00:09:56,470 --> 00:09:59,920
So color i just want to change.

114
00:10:02,130 --> 00:10:02,790
Colours.

115
00:10:05,440 --> 00:10:08,260
So we will see what colors.

116
00:10:11,970 --> 00:10:13,170
Default.

117
00:10:13,700 --> 00:10:22,580
OK, I'm keeping it default, but it need not changing, so we will see a later here how to change this.

118
00:10:23,070 --> 00:10:28,810
So here what we are doing where we are just running this pwd command.

119
00:10:29,110 --> 00:10:31,830
Now, we are log in as a EC2 user.

120
00:10:32,310 --> 00:10:40,110
So now what we would like we would like to log in as root user because Certain Command, you can do only

121
00:10:40,110 --> 00:10:44,500
with this as a root user so you can specify sudo -s.

122
00:10:45,210 --> 00:10:47,520
Now, we have logged in as a root user.

123
00:10:48,270 --> 00:10:56,870
So now the first thing is you have to install the software and for that you can use the yum install httpd

124
00:10:58,980 --> 00:11:04,590
like we did in our local machines same way, same command.

125
00:11:04,590 --> 00:11:04,970
will run.

126
00:11:06,180 --> 00:11:12,780
And then what you can do after that, we can verify with which command?

127
00:11:13,210 --> 00:11:14,940
rpm -q.

128
00:11:17,250 --> 00:11:24,210
And we can check the package, whether httpd packages there or not, in our case, it is

129
00:11:24,300 --> 00:11:25,300
already installed.

130
00:11:26,070 --> 00:11:36,030
So what we will do, we will go into /var/www/html directory, here.

131
00:11:36,030 --> 00:11:42,500
We are going to create one page, how we are going to create one page in this way.

132
00:11:44,690 --> 00:11:47,300
index.html.

133
00:11:49,290 --> 00:12:00,630
Then what we are going to say, we are going to type likethis thing Apache Web.

134
00:12:02,360 --> 00:12:06,140
Server, what you can specify.

135
00:12:08,460 --> 00:12:11,790
Running on.

136
00:12:14,620 --> 00:12:23,820
cloud you can specify, please remember, in our case, we are showing all these things, we have

137
00:12:23,820 --> 00:12:25,250
already created this thing.

138
00:12:25,560 --> 00:12:34,470
So these all slides are there whatever steps we are performing that mean this is the thing that how we

139
00:12:34,470 --> 00:12:34,830
did.

140
00:12:35,160 --> 00:12:36,600
launched instance.

141
00:12:36,960 --> 00:12:42,390
Then we selected the AMI then t2 tier, one instance.

142
00:12:43,230 --> 00:12:50,670
Then we selected that, you can say hard disk, then name Apache Web server, then we open

143
00:12:50,680 --> 00:12:50,910
those port.

144
00:12:50,910 --> 00:12:55,940
here we name our security group as Web server description Apache Web server.

145
00:12:57,030 --> 00:13:01,440
Then that was the review screen, then launch.

146
00:13:01,440 --> 00:13:03,390
We choose that,.

147
00:13:03,840 --> 00:13:08,760
We specify the key then this was when it was launching.

148
00:13:09,810 --> 00:13:14,040
Then it was showing one menu view instance, when we clicked on The View instances.

149
00:13:14,430 --> 00:13:17,370
What it was showing, it was showing this screen.

150
00:13:17,370 --> 00:13:29,310
So we noted down the address and that is we specify EC2 user, then that ip address

151
00:13:29,310 --> 00:13:30,570
port is 22.

152
00:13:31,650 --> 00:13:37,500
Then we change the font size to 18, then we specify the key.

153
00:13:38,020 --> 00:13:39,210
And this was the screen.

154
00:13:40,500 --> 00:13:50,040
And with sudo -s, we logged in as a root user then rpm query httpd, initially it was not installed, so

155
00:13:50,040 --> 00:13:55,160
we installed by yum -q install httpd in quite mode.

156
00:13:55,950 --> 00:13:57,210
So this was the screen.

157
00:13:57,540 --> 00:14:02,580
It installed certain dependent package also, and it was asking for the conformation.

158
00:14:02,580 --> 00:14:03,630
So we specified.

159
00:14:03,630 --> 00:14:11,960
Yes, like in the local lab we implemented, then we have going to into the /var/www/html directory and then we created

160
00:14:11,960 --> 00:14:14,730
the file Apache web server is running in cloud.

161
00:14:15,810 --> 00:14:20,730
So here also what we are trying to do again, we are saying.

162
00:14:22,900 --> 00:14:25,300
in.

163
00:14:26,560 --> 00:14:26,950
cloud.

164
00:14:28,650 --> 00:14:29,880
So we can save.

165
00:14:32,820 --> 00:14:38,430
Clear the screen, then which command you're going to run systemctl.

166
00:14:41,530 --> 00:14:48,270
restart httpd because here already .

167
00:14:49,030 --> 00:14:55,630
First it is running, so you have to restart in real what command you have to run.

168
00:14:57,100 --> 00:14:58,270
These are the command.

169
00:14:58,270 --> 00:15:06,150
We are going to run for temporary running httpd server, you have to run systemctl start httpd systemctl

170
00:15:06,150 --> 00:15:14,620
enable httpd, then we can verify it with the IP address, whether it is working properly

171
00:15:14,620 --> 00:15:15,010
or not.

172
00:15:15,640 --> 00:15:19,040
So we will go to the browser and specify this address.

173
00:15:19,480 --> 00:15:21,250
So let us go into the browser.

174
00:15:23,260 --> 00:15:26,980
So we are going to specify the address http://

175
00:15:30,130 --> 00:15:38,890
the address of the virtual machine 52.15.85..

176
00:15:41,030 --> 00:15:42,130
32.

177
00:15:44,610 --> 00:15:52,130
So this is a apache web server running in cloud that mean our Apache Web server is properly running.

178
00:15:55,020 --> 00:16:01,530
That was the verification, and if you want to change the configuration settings, please remember all

179
00:16:01,530 --> 00:16:13,890
the files are same like you can open with vi editor vi /etc/httpd/conf/httpd.conf.

180
00:16:16,990 --> 00:16:26,350
Same file are there, same thing we can configure in cloud like we did in so we will not be again repeating

181
00:16:26,350 --> 00:16:26,860
those things.

182
00:16:26,950 --> 00:16:30,790
We just wanted to show you how to launch one instance in cloud.

183
00:16:31,630 --> 00:16:38,650
So this is our instance properly working and we are able to access the page as we have shown.

184
00:16:39,100 --> 00:16:44,590
So both we have covered a little bit practical also, and we have shown you the slide.

185
00:16:44,590 --> 00:16:48,580
So very easy to launch in the cloud, your Web server.
