INVIS4 Notes
INVIS4 Notes
23.11.2022
—-----------
A server is a computer that provides resources or services to other computers over a network.
S4
Mail Servers : Exchange Server from Microsoft, Zimbra, Postfix
SDLC:
Plan – What is the problem and what resources do you need to solve it?
• Analyze – What do you want from a solution?
• Design – How will you built what you want?
• Develop – Build what you have designed.
• Test – Did you get what you want?
• Implement – Start to use what you built.
• Maintain – Improve what you built.
VI
The SDLC is repeated over the lifetime of an application. It’s used to create, update, fix, and maintain
the application.
Cloud computing is the on-demand delivery of compute power, database, storage, applications, and
other IT resources. These resources are delivered through a cloud services platform via the internet,
with pay-as-you-go pricing
iN
24.11.2022
1. With infrastructure as a service (IaaS), you manage the server, which can be physical or virtual,
and the operating system (Microsoft Windows or Linux). In general, the data center provider
has no access to your server.
2. With platform as a service (PaaS), someone else manages the underlying hardware and
operating systems. In this way, you can run applications without managing underlying
infrastructure (for example, patching, updates, maintenance, hardware, and operating
systems). PaaS also provides a framework for developers that they can build on to create
customized applications.
3. With software as a service (SaaS), you manage your files while the service provider manages
all data centers, servers, networks, storage, maintenance, and patching. You handle only the
software and how you want to use it. You are provided with a complete product that the service
S4
provider runs and manages. Facebook and Dropbox are examples of SaaS. You manage your
Facebook contacts and Dropbox files, and the service providers manage the systems
Public cloud: Here, the resources and services provided by third-party service providers are
available to customers via the Internet.
Private cloud: In a private cloud, the resources and services are managed in-house or by third
parties, exclusively for a particular organization.
Hybrid cloud: It is a combination of both public and private cloud types. The decision whether to
run the services on public or private depends on some parameters such as the sensitivity of the
data and applications, industry certifications and required standards, etc.
Public cloud: Here, the resources and services provided by third-party service providers are available to
VI
customers via the Internet.
Private cloud: In a private cloud, the resources and services are managed in-house or by third parties,
exclusively for a particular organization.
Hybrid cloud: It is a combination of both public and private cloud types. The decision whether to run the
services on public or private depends on some parameters such as the sensitivity of the data and
applications, industry certifications and required standards, etc.
2. If you have a business, how can cloud computing benefit your business?
Cloud computing or cloud services providers (like AWS) provides rapid access to flexible and low-cost IT
resources. With cloud computing, you don’t need to make large upfront investments in hardware. As a business
owner, you do not need to purchase a physical location, servers, storage, or databases.
3. Why are so many companies interested in moving to the cloud? Next, you explore why so many companies
are moving to the cloud
The key takeaways from this lesson are the six advantages of cloud computing:
• Trade capital expense for variable expense
• Benefit from massive economies of scale
• Reduce guessing about capacity
• Increase speed and agility
• Stop spending money on running and maintaining data centers
• Go global in minute
25.11.2022
Intranet or LAN or Private Network- The communication within your network / within your
organization (ONly 1 Network) - Security High, Trusted Network
S4
Internet or Public Network - communication between networks (many / Multiple / millions of network)
- Untrusted, Security Low
• ACL (ACLs)
• Amazon Elastic Block Store (Amazon EBS)
• Amazon Elastic File Store (Amazon EFS)
• Amazon Machine Image (AMI)
• Amazon Relational Database Service (Amazon RDS)
• Amazon Simple Storage Service (Amazon S3)
• AWS Identity and Access Management (IAM)
VI
• Direct-attached storage (DAS)
• Network access control lists (network ACLs)
• Network-attached storage (NAS)
• Relational database management system (RDBMS)
• Storage area network (SAN
iN
28.11.2022
Storage
S3 - SSS - Simple Storage Service
EBS - Elastic Block Store
S4
EFS - Elastic File System
Glacier - Archival data
Compute
EC2 - ECC - Elastic Compute Cloud
Lambda - Serverless compute Service - Used for Background Program Executions (SAAS)
Beanstalk - A Platform for running your application (PAAS)
Database
RDS - Relational Database Services
DynamoDb - NoSQL database tables
VI
Elasticache - To speed up The DB services
Security
IAM - Identity and Access Management
iN
29.11.2022
S4
VI
Vulnerability - Weakness in the code, application or software.. Results to Attacks
30.11.2022
EC2
S4
Public IP : 54.71.149.242 54.149.142.2
VI
iN
01.12.2022
S4
VI
iN
Public IP : 35.93.128.66
AZ : US East-2a
Keyname : vockey
02.12.2022
[ec2-user@ip-10-0-10-116 ~]$ whoami
ec2-user
[ec2-user@ip-10-0-10-116 ~]$ hostname -s
ip-10-0-10-116
[ec2-user@ip-10-0-10-116 ~]$ hostname
ip-10-0-10-116.us-west-2.compute.internal
[ec2-user@ip-10-0-10-116 ~]$ uptime -p
up 6 minutes
[ec2-user@ip-10-0-10-116 ~]$ uptime
04:50:47 up 6 min, 1 user, load average: 0.00, 0.03, 0.00
[ec2-user@ip-10-0-10-116 ~]$
S4
Directory Management
For files
VI
Copy - cp
Move - mv
Remove rm
iN
tar -csvpzf
-c - create archive file
-v - Verify / Verbose
-p - preserve Permissions
-z - use zip compression
-f - File display (Status)
S4
2. More - displays file page by page
3. Head - displays top 10 lines
4. Tail - displays bottom 10 lines
5. Cut - cut the fields with delimiter
6. Sort - sorts ascending / descending file contents
7. Grep - filters specific word or content in a file or search
8. Tr - Translate
9. Awk - filters specific column
10. Sed - streaming editor
11. Wc - word count
VI
> redirection
$ ls -al >file1
$ cat file1 { Displays the contents of file1}
>>redirection means append the contents of file
$ ls -al >>file1
$ cat file1 |less 1st method
$ less file1 #2nd method displays file1 page by page (q -quit , p - previous)
$ more file1 Displays contents of file in page format (q - Quit)
iN
$ head file1 # displays top 10 lines of file1
$ tail file1 # displays bottom 10 lines of file1
end of file
bye
^C
$ cat file3>>file4
S4
$ cat file3>>file4
$ cat file3>>file4
$ cat file3>>file4
Translate - tr
$ cat file4 | tr ‘a-z’ ‘A-Z’ (replaces all small characters with Upper characters
$ cat file4 | tr ‘a’ ‘A’ (replaces small a character with Capital A )
Sort Filter - arranging in order
$ cat passwd |sort # displays contents in alphabetical order
$ cat passwd |sort -r # displays contents in reverse order
Wc Filter - Word count
[ec2-user@ip-172-31-15-186 ~]$ wc file4
VI
48 124 596 file4 # 48 lines, 124 words & 596 Characters / bytes)
Grep filter
$ cat file4 |grep star # displays all lines in file4 which contans word star
Sed filter
$ cat flle4 |sed ‘s/little/big/g’ # displays output replacing little with big from file4 on
to the screen
(s - Search, g - global)
$ cat file4|sed ‘1,10s/little/big/g’ # displays output replacing from line 1 to 10
iN
with big instead of little in file4
AWK Filter
$ ll |awk ‘{print$9,$1,$3}’ # AWK filters ll output and displays
only field 9, 1 & 3 of total 9 fields)
total
file1 ec2-user -rw-rw-r--
file2 ec2-user -rw-rw-r--
file3 ec2-user -rw-rw-r--
file4 ec2-user -rw-rw-r--
file5 ec2-user -rw-rw-r--
passwd ec2-user -rw-r--r--
Task activity
1. System (OS) Process
2. Application Process
3. User defined Process
Every Process has an ID (identification number) which is unique
Daemons - Additional support for the process to run
S4
A Process status can be running, sleeping. Stopped, stale, zombie
$ tty # displays terminal ID eg: /dev/pts/0
$ ps # Process status within your terminal (basic information)
$ ps -ef # f = full listing e= extended information
$ sleep 5 # Keeps the terminal windows in passive mode
$ ps -efl # list long format with additional; -l option (Displays even nice Priority)
S4
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32761 ec2-user 20 0 168836 4296 3784 R 0.3 0.4 0:00.05 top
1 root 20 0 123504 5416 3880 S 0.0 0.5 0:02.08 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00
kworker/0:0H-ev
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.15
kworker/0:1H-ev
VI
9 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00
rcu_tasks_rude_
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00
rcu_tasks_trace
12 root 20 0 0 0 0 S 0.0 0.0 0:00.08 ksoftirqd/0
13 root 20 0 0 0 0 I 0.0 0.0 0:00.11 rcu_sched
14 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
iN
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
19 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 netns
20 root 20 0 0 0 0 I 0.0 0.0 0:00.07
kworker/u30:1-f
Filesystem
S4
sbin - super binary files (root executable files)
sys
usr - application related files
boot - system bootable like kernel, modules, & Bootloader files
etc - System configuration files
local
mnt - external like Network mount is used for mnt
proc - processor file system
run, srv
tmp - temporary file system for users to utilize (like exchange files)
VI
var - various other directories like log files, crashdumps, ftp etc.,
iN
07.12.2022 - File Permissions, Find
File / Directory Permissions
S4
Owner Group Others
-rw-rw-r--
12345678910
1 - Type of File (d - directory, - normal file, l - link file, c - character device file, b - block device file, s -
socket files)
2-10 - file permissions
665 rw-rw-r-x
744 rwxr– r–
444
iN
644 rw-r– r—
775 rwxrwxr-x
$ chmod <permission value> <directory name>
drwxrwxr-x 775 002 (not set)
drw-r–r— 644 133
$ chmod 775 file1 (Example to set file1 with permission 775)
Umask - Usermask (the unset values needs to defined
$ umask 022 (The default permissions for directory is set to 755)
S4
Command search path criteria print, cp , mv
S4
VI
iN
08.12.2022 VI Editor / Shell Scripting -1 / Bash
3 Modes of Operation
1. Command mode (Default)
2. Editor Mode
3. Global Command Mode
S4
x - delete character
o - insert a blank new line
u - undo , undelete
r - replace character
cw - change word
i - insert
nyy - yank line (copy line) (n - number of lines)
p - paste / place
dd - delete line
G - Ground (bottom of document)
1G - Top of document
/<string> - Search string (n - next)
VI
Global command mode command (^: - Editor mode to Global Command Mode)
w - write / save
q - Quit / exit
wq - Write / quit
x - wq - save exit
q! - Force quit without saving
se nu - number bar in the left margin
iN
To execute script1
$ sh script1
Welcome to shell Scripting
[ec2-user@ip-172-31-4-218 ~]$
S4
$ cat script2
# This is Shell script - Batch Script
clear
echo " Hello and welcome to Linux - Shell Scripting "
echo " "
echo " "
echo " Today's date and time is $(date) and my username is $(whoami) "
echo " "
echo " My terminal is $(tty) and this month calendar is $(cal) "
echo " "
VI
echo " "
echo " "
cat greeting
$ cat greeting
########################################################################
iN
###
H A P P Y L E A R N I N G
########################################################################
###
[ec2-user@ip-172-31-4-218 ~]$
S4
$ cat .bash_logout
# ~/.bash_logout
echo " Bye Bye ....."
sleep 5