-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathsession-02.txt
207 lines (139 loc) · 3.73 KB
/
session-02.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
What is DevOps?
Linux importance
waterfall vs agile vs devops
client server architecture
AWS account creation
EC2 server launch
Authentication
---------------------
Laptop --> Username and password
fingerprint
1. What you know
2. What you have
3. What you are
username and password --> what you know
tokens --> What you have, OTP, RSA physical token, software tokens
what you are --> fingerprint, retina scanning, palm
keys or tokens
Cloud servers are remote servers --> they are somewhere in internet
SSH --> Secure shell --> Linux authentication mechanism
port no 22
username/password
username and private-key
what are keys?
------------------
Public vs Private keys
public private key we will generate
Linux Server Launch
--------------------
Linux Torvalds
He bought one laptop
UNIX
strictly coupled with hardware
MAC laptop is software+hardware --> we dont have freedom to choose OS
It is not free, high cost
DOS
blue screen
not free
He started writing OS from the scratch using C language
No strict couple with hardware
free
opensource
Linux is OS/Kernel?
Kernel --> it is a software component that can interact with hardware
few companies developed shell to interact with kernel and few utilities
Kernel+Shell+utilities/apps == OS
Flavours/Distributions
-----------------------
Ubuntu
Suse
IBM
Centos
Fedora
RHEL --> Redhat Enterprise Linux
Arch Linux
Android
Desktop --> graphics
Server --> No graphics only terminal/shell
enterprise --> you will have support from Redhat
opensource/community --> no support, only community support
RHEL=CentOs=Fedora=AWSLinux
Centos8
RHEL-9
EC2 Server Launch
-----------------
Public key and private keys
GitBash --> Mini Linux for windows
SSH Client, Git Client
Windows Home folder
-----------------
C:\Users\<Laptop-Username>
C:\users\user
\ --> Windows
/ --> Linux
pwd --> present working directory
ssh-keygen --> command to create pub and private key
ssh-keygen -t rsa -b 4096 -f <your-file-name>
.pub --> publickey
no extension --> private-key
.pem is for private-key
EC2 Launch
------------
create key in AWS account
Firewall creation
0-65,535 -> 65,536
Delhi --> HYD
flat no, apartment name, street, city, pincode
every process will open one port number...
https://facebook:443 --> there is a https process running inside facebook server or port no 443
a random port will be opened for this chrome tab
facebook 443, I opened a random port 44565
SSH port no 22...only facebook admin staff will have this access
facebook https access --> yes public will have this access
443 --> open for public
22 --> only open for admin staff
0.0.0.0/0 --> internet, open for everyone
CPU
RAM
Storage
OS
54.86.71.109
ssh -i <private-key> user-name@IP
ssh -i daws-78s user-name@IP
port no, ip, username/password
https://facebook.com:443
gitbash --> ssh client
putty, mobaxterm, superputty
$ --> normal user
# --> root access
/c/devops/daws-78s/daws-78s.pem --> absolute
daws-78s/daws-78s.pem --> relative
command-name <options> <inputs>
ls --> list subdirectories
/home/ec2-user --> default folder when logged in
cd --> change directory
/ root directory
/home/ec2-user
ls -l --> long format
ls -lr --> reverse alphabetical order
ls -lt --> latest files
ls -ltr --> starts from old files
ls -la --> all files and directory including hidden
CRUD --> Create Read Update Delete
ls --> read
I want to create files folder
create file
---------------
touch <file-name> --> this will create a file
update --> enter info into file
cat > sample
entr the text you want
once over click enter and ctrl+d
> --> replace old content
>> --> append/add to the old content
Delete
----------------
rm <file-name>
rm -r --> recursive
rmdir --> deletes only empty directory, fails when it has files inside
mkdir --> make directory