forked from DAWS-82S/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession-13.txt
More file actions
52 lines (38 loc) · 1.14 KB
/
session-13.txt
File metadata and controls
52 lines (38 loc) · 1.14 KB
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
variables
data types
conditions
functions
loops
plain server --> app runtime(nodejs), create user, create app folder, download the code, install dependencies, create systemctl services, start the application
check user has root access or not
store logs
try to use colors
install mysql server
enable it
start it
set the root password
idempotency --> even you run any number of times, it should not change the result
HTTP GET --> idempotent
HTTP POST --> chance of duplicates or errors, we need to handle this in programming
HTTP PUT --> no problem, but we can say it is already updated
HTTP DELETE --> chance of error, resource not found. Handle this in scripting/programming
deployment --> updating new version
remove old code
download new code
install dependencies
restart the server --> stop and start
delete old logs in linux server
-------------------------------
14 days log files --> will be in server
archive and move to storage servers
delete files older than 14 days from now
only delete .log files
#!/usr/bin/bash
file=temp.txt
while read -r line;
do
echo $line
done < “$file”
1. read the file
2. count the number of words
3. find top 5