Deployed 6d74e6c with MkDocs version: 1.1.2

This commit is contained in:
Kalyanasundaram Somasundaram
2020-11-23 16:01:47 +05:50
parent 5d5de70663
commit 57cd4bbf39
136 changed files with 2734 additions and 682 deletions

View File

@@ -254,16 +254,16 @@
</li>
<li class="md-nav__item">
<a href="#usergroup-management-in-linux" class="md-nav__link">
User/Group Management in Linux
<a href="#usergroup-management" class="md-nav__link">
User/Group Management
</a>
<nav class="md-nav" aria-label="User/Group Management in Linux">
<nav class="md-nav" aria-label="User/Group Management">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#id-command-in-linux" class="md-nav__link">
id command in linux
<a href="#id-command" class="md-nav__link">
id command
</a>
</li>
@@ -329,37 +329,37 @@
</li>
<li class="md-nav__item">
<a href="#becoming-a-superuser-in-linux" class="md-nav__link">
Becoming a Superuser in Linux
<a href="#becoming-a-superuser" class="md-nav__link">
Becoming a Superuser
</a>
</li>
<li class="md-nav__item">
<a href="#file-permissions-in-linux" class="md-nav__link">
File Permissions in Linux
<a href="#file-permissions" class="md-nav__link">
File Permissions
</a>
<nav class="md-nav" aria-label="File Permissions in Linux">
<nav class="md-nav" aria-label="File Permissions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#chmod-command-in-linux" class="md-nav__link">
Chmod command in linux
<a href="#chmod-command" class="md-nav__link">
Chmod command
</a>
</li>
<li class="md-nav__item">
<a href="#chown-command-in-linux" class="md-nav__link">
Chown command in linux
<a href="#chown-command" class="md-nav__link">
Chown command
</a>
</li>
<li class="md-nav__item">
<a href="#chgrp-command-in-linux" class="md-nav__link">
Chgrp command in linux
<a href="#chgrp-command" class="md-nav__link">
Chgrp command
</a>
</li>
@@ -465,11 +465,11 @@
</li>
<li class="md-nav__item">
<a href="#checking-disk-space-in-linux" class="md-nav__link">
Checking Disk Space in Linux
<a href="#checking-disk-space" class="md-nav__link">
Checking Disk Space
</a>
<nav class="md-nav" aria-label="Checking Disk Space in Linux">
<nav class="md-nav" aria-label="Checking Disk Space">
<ul class="md-nav__list">
<li class="md-nav__item">
@@ -523,20 +523,6 @@
Logs
</a>
</li>
<li class="md-nav__item">
<a href="#applications-in-sre-role" class="md-nav__link">
Applications in SRE Role
</a>
</li>
<li class="md-nav__item">
<a href="#useful-courses-and-tutorials" class="md-nav__link">
Useful courses and tutorials
</a>
</li>
</ul>
@@ -869,7 +855,7 @@
<li class="md-nav__item">
<a href="../../big_data/overview/" class="md-nav__link">
<a href="../../big_data/overview.md" class="md-nav__link">
Overview of Big Data
</a>
</li>
@@ -881,7 +867,7 @@
<li class="md-nav__item">
<a href="../../big_data/usage/" class="md-nav__link">
<a href="../../big_data/usage.md" class="md-nav__link">
Usage of Big Data techniques
</a>
</li>
@@ -905,7 +891,7 @@
<li class="md-nav__item">
<a href="../../big_data/architecture/" class="md-nav__link">
<a href="../../big_data/architecture.md" class="md-nav__link">
Architecture of Hadoop
</a>
</li>
@@ -1153,16 +1139,16 @@
</li>
<li class="md-nav__item">
<a href="#usergroup-management-in-linux" class="md-nav__link">
User/Group Management in Linux
<a href="#usergroup-management" class="md-nav__link">
User/Group Management
</a>
<nav class="md-nav" aria-label="User/Group Management in Linux">
<nav class="md-nav" aria-label="User/Group Management">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#id-command-in-linux" class="md-nav__link">
id command in linux
<a href="#id-command" class="md-nav__link">
id command
</a>
</li>
@@ -1228,37 +1214,37 @@
</li>
<li class="md-nav__item">
<a href="#becoming-a-superuser-in-linux" class="md-nav__link">
Becoming a Superuser in Linux
<a href="#becoming-a-superuser" class="md-nav__link">
Becoming a Superuser
</a>
</li>
<li class="md-nav__item">
<a href="#file-permissions-in-linux" class="md-nav__link">
File Permissions in Linux
<a href="#file-permissions" class="md-nav__link">
File Permissions
</a>
<nav class="md-nav" aria-label="File Permissions in Linux">
<nav class="md-nav" aria-label="File Permissions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#chmod-command-in-linux" class="md-nav__link">
Chmod command in linux
<a href="#chmod-command" class="md-nav__link">
Chmod command
</a>
</li>
<li class="md-nav__item">
<a href="#chown-command-in-linux" class="md-nav__link">
Chown command in linux
<a href="#chown-command" class="md-nav__link">
Chown command
</a>
</li>
<li class="md-nav__item">
<a href="#chgrp-command-in-linux" class="md-nav__link">
Chgrp command in linux
<a href="#chgrp-command" class="md-nav__link">
Chgrp command
</a>
</li>
@@ -1364,11 +1350,11 @@
</li>
<li class="md-nav__item">
<a href="#checking-disk-space-in-linux" class="md-nav__link">
Checking Disk Space in Linux
<a href="#checking-disk-space" class="md-nav__link">
Checking Disk Space
</a>
<nav class="md-nav" aria-label="Checking Disk Space in Linux">
<nav class="md-nav" aria-label="Checking Disk Space">
<ul class="md-nav__list">
<li class="md-nav__item">
@@ -1422,20 +1408,6 @@
Logs
</a>
</li>
<li class="md-nav__item">
<a href="#applications-in-sre-role" class="md-nav__link">
Applications in SRE Role
</a>
</li>
<li class="md-nav__item">
<a href="#useful-courses-and-tutorials" class="md-nav__link">
Useful courses and tutorials
</a>
</li>
</ul>
@@ -1474,7 +1446,7 @@ commands on your own.</p>
<p>An operating system is considered as multi-user if it allows multiple people/users to use a computer and not affect each other files and preferences. Linux based operating systems are multi-user in nature as it allows multiple users to access the system at the same time. A typical computer will only have one keyboard and monitor but multiple users can log in via ssh if the computer is connected to the network. We will cover more about ssh later.</p>
<p>As a server administrator, we are mostly concerned with the linux servers which are physically present at a very large distance from us. We can connect to these servers with the help of remote login methods like ssh.</p>
<p>Since linux supports multiple users, we need to have a method which can protect the users from each other. One user should not be able to access and modify files of other users</p>
<h2 id="usergroup-management-in-linux">User/Group Management in Linux</h2>
<h2 id="usergroup-management">User/Group Management</h2>
<ul>
<li>
<p>Each user in linux has an associated user ID called UID attached to him</p>
@@ -1489,7 +1461,7 @@ commands on your own.</p>
<p>Each group has a group ID called GID associated with it.</p>
</li>
</ul>
<h3 id="id-command-in-linux">id command in linux</h3>
<h3 id="id-command">id command</h3>
<p>id command can be used to find the uid and gid associated with an user.
It also lists down the groups to which the user belongs to.</p>
<p>The uid and gid associated with the root user is 0.
@@ -1615,7 +1587,7 @@ not find the entry for that user in "/etc/passwd" or "/etc/shadow" file.</p>
<p><img alt="" src="../images/linux/admin/image52.png" /></p>
<p>We will now try to add user "shivam" to the group we have created above.</p>
<p><img alt="" src="../images/linux/admin/image33.png" /></p>
<h2 id="becoming-a-superuser-in-linux">Becoming a Superuser in Linux</h2>
<h2 id="becoming-a-superuser">Becoming a Superuser</h2>
<p><strong>Before running the below commands, do make sure that you have set up a
password for user "shivam" and user "root" using the passwd command
described in the above section.</strong></p>
@@ -1666,7 +1638,7 @@ privileges.</p>
<p>We need to use sudo before running the command since it can only be
accessed with the sudo privileges. We have already given sudo privileges
to user “shivam” by adding him to the group “wheel”.</p>
<h2 id="file-permissions-in-linux">File Permissions in Linux</h2>
<h2 id="file-permissions">File Permissions</h2>
<p>On a linux operating system, each file and directory is assigned access
permissions for the owner of the file, the members of a group of related
users and everybody else. This is to make sure that one user is not
@@ -1678,7 +1650,7 @@ at the permissions of /etc/passwd file.</p>
related to file permissions.</p>
<p><img alt="" src="../images/linux/admin/image31.jpg" /></p>
<p><img alt="" src="../images/linux/admin/image57.png" /></p>
<h3 id="chmod-command-in-linux">Chmod command in linux</h3>
<h3 id="chmod-command">Chmod command</h3>
<p>The chmod command is used to modify files and directories permissions in
linux.</p>
<p>The chmod command accepts permissions in as a numerical argument. We can
@@ -1752,7 +1724,7 @@ command.</p>
<p><img alt="" src="../images/linux/admin/image26.png" /></p>
<p>Chmod command can be also used to change the permissions of a directory
in the similar way.</p>
<h3 id="chown-command-in-linux">Chown command in linux</h3>
<h3 id="chown-command">Chown command</h3>
<p>The chown command is used to change the owner of files or
directories in linux.</p>
<p>Command syntax: chown \&lt;new_owner> \&lt;file_name></p>
@@ -1764,7 +1736,7 @@ command.</p>
<p><img alt="" src="../images/linux/admin/image12.png" /></p>
<p>Chown command can also be used to change the owner of a directory in the
similar way.</p>
<h3 id="chgrp-command-in-linux">Chgrp command in linux</h3>
<h3 id="chgrp-command">Chgrp command</h3>
<p>The chgrp command can be used to change the group ownership of files or
directories in linux. The syntax is very similar to that of chown
command.</p>
@@ -1930,7 +1902,7 @@ an additional argument to get the data in human-readable format.</p>
<p>The vmstat command can be used to display the memory usage along with
additional information about io and cpu usage.</p>
<p><img alt="" src="../images/linux/admin/image38.png" /></p>
<h2 id="checking-disk-space-in-linux">Checking Disk Space in Linux</h2>
<h2 id="checking-disk-space">Checking Disk Space</h2>
<p>In this section, we will study about some useful commands that can be
used to view disk space on linux.</p>
<h3 id="df-disk-free">df (disk free)</h3>
@@ -1998,48 +1970,6 @@ which can be very useful for viewing system logs and applications logs
in linux. These logs can be very useful when you are troubleshooting on
the system.</p>
<p><img alt="" src="../images/linux/admin/image58.png" /></p>
<h2 id="applications-in-sre-role">Applications in SRE Role</h2>
<ul>
<li>
<p>Different users will have different permissions depending on their
roles. We will also not want everyone in the company to access our
servers for security reasons. Users permissions can be restricted
with chown, chmod and chgrp commands.</p>
</li>
<li>
<p>SSH is one of the most frequently used commands for a SRE. Logging
into servers and troubleshooting along with performing basic
administration tasks will only be possible if we are able to login
into the server.</p>
</li>
<li>
<p>What if we want to run an apache server or nginx on a server ? We
will first install it using the package manager. Package
management commands become important here.</p>
</li>
<li>
<p>Managing services on servers is another critical responsibility of a
SRE. Systemd related commands can help in troubleshooting issues.
If a service goes down, we can start it using systemctl start
command. We can also stop a service in case it is not needed.</p>
</li>
<li>
<p>Monitoring is another core responsibility of a SRE. Memory and CPU
are two important system level metrics which should be monitored.
Commands like top and free are quite helpful here.</p>
</li>
<li>
<p>If a service is throwing an error, how do we find out the root cause
of the error ? We will certainly need to check logs to find out
the whole stack trace of the error. The log file will also tell us
the number of times the error has occurred along with time when it
started.</p>
</li>
</ul>
<h2 id="useful-courses-and-tutorials">Useful courses and tutorials</h2>
<ul>
<li>Edx Red Hat Enterprise Linux Course - <a href="https://courses.edx.org/courses/course-v1:RedHat+RH066x+2T2017/course/">https://courses.edx.org/courses/course-v1:RedHat+RH066x+2T2017/course/</a></li>
</ul>