Linux system administration
Because we believed from the outset that we are in
book is a personal computer, must be given some attention
problems of Linux server administration. After all, you will not have Linux system
Administrator, to turn to when faced with
any problem. I want only the very beginning recall
that, in most cases, to configure the system must
have root access to root.
And one more preliminary remark, which
help you better understand and master the principles of administration Linux:
Any configuration of the OS can be performed by editing
script files (or scripts), and configuration files
read scripts. And those and others (ie, scripts, and
configuration files) are simple text files.
Of course, in Linux there are various special tools
configuration and Linux systems administration (such as linuxconf or
printtool), but the results of these programs still
recorded in the same configuration files. Figuratively speaking, about
Linux (and UNIX in general) can say "this is almost entirely
processor text. If from the outset to remember about this
features can be much easier to learn the issues of Linux remote administration and Linux network administration.
The way, if you want to simplify your work
editing configuration files, immediately after the installation of OS
Linux install Midnight Commander. This significantly
facilitate your search and editing configuration files, as
you can use built-in editor of the program (not
to mention the fact that the search for the file you want too much easier).
The main tasks of the system administration. Processes and their IDs
The responsibilities of system administrator usually
include the following tasks:
- Connection and configure the hardware devices;
- Install and update software;
- Launch and configure system-wide services (configuration
system);
- User management
- Process management;
- Allocation of resources;
- Security.
Issues connecting and configuring hardware
tools and procedures for installing and updating software
ensure we consider in the next two chapters. Other problems
system administration will be briefly discussed in this
section. We begin by considering how the boot process is
OS. The fact that this phase largely determines the mode of follow-
of the system and its configuration. If you are able to influence the process
BitTorrent, then you already can achieve the desired configuration
system after downloading.
Related links:
But to understand the procedure, the bootstrap
must have the most general idea of what a process
system, since this concept will be constantly used in
later.
In the first approximation we can assume that
process - it is loaded into the RAM program.
But this is not exactly correct to say that "the process
executes the program. " The fact that Linux first
start the process, which loads into memory the program
from the specified file, and it begins to implement it. This means that
each process must be started (as they say -
"Generated") by some other process. That is, for each
process is uniquely determined by its "parent" (or
"Ancestor"), for which this process is a "child"
(Or "descendant"). If you want to see the "tree"
running processes on your system, run pstree .
The output of this command allows you to see that the "father" of all
processes in the system (or "tree root processes)
is the process init ,
which first started after booting the kernel.
Each process in the system has a unique
ID - PID, appointed by the process at startup.
The process with ID 1 performs a program init .
It is for this ID system distinguishes processes. Each
running process at any time is in one of
the following states: active (R), suspended (T) or "asleep"
(S). The current state of the process is called the status of the process.
Related links:
Also identifier and status for each
process in the special structure of the kernel saves the following
(The following list is far from complete):
- Full command line to process tasks performed;
- Information about the process's allocated address space;
- Link to the current working directory and root directory of the process
(The latter serves to limit access of the file
structure);
- Table open process files
- So-called process environment, ie, list
specified for the process variables with their current values;
- Attributes that define the rights and privileges of the process,
- Table of signal handlers;
- Indication of the parent process;
- User mask (umask) or access mask -
indication of what rights should be removed when creating a new file
or directory from the standard set of rights assigned to the file
(Catalog).
Since Linux - system
tasking, can be simultaneously running many processes.
Incidentally, the word "simultaneously" is used not
correct, because in fact at a time
runs only one process. ( For accuracy it should be noted
in multiprocessor systems, on which Linux can
work can be performed simultaneously by several processes, but we
consider only uniprocessor systems ). Planner
processes allocated to each process a small quantum of time and
After this quantum transfers control to the next process.
Time slice allocated to each process, so small that
Users create the illusion of simultaneous execution of many
processes. And to some of the most important processes,
receive more CPU time for each process
set priority.
Related links:
users can "communicate" with
processes by sending them signals. The processes also communicate with each
another through signals. When we press the key combination
>+< C > ,
to complete a program, we actually send
respective process signal "Shut."
In conclusion, the process sends a signal to the parent process of its
completion. However, there are cases when the parent process ends
earlier child. Processes that do not have a parent called
"Orphans". "Orphans" are adopted automatically
process init ,
who picks up signals on their completion. If the process is the parent
for some reason can not receive a signal of the completion of a child
process, then the child process is transformed into "zombies" and
acquires the status of Z. Zombie process does not take up the CPU time
(Ie, their execution is terminated), but the corresponding
nuclear structure is not exempt. Destruction of such processes -
One of the responsibilities of system administrator. Finally, the process
may be a long time "to fall asleep, which can not interrupt.
The status of such processes is denoted by D. Delete them can
only when you restart the system.
special type of processes are the demons. Actually
There is nothing special. This is just the processes that run in
background, without displaying any data to the terminal. Demons
typically used to perform service functions, service
requests from other processes, not necessarily running on
this computer.
must not forget that the processes can run
("Inside"), the separate threads (thread), or streams.
Threads - a parallel run of one program,
which are implemented as Linux processes that run with a special
flag. From the standpoint of the system, they differ from other processes
only because they do not create a separate environment, they
executed from within the parent process.
Read more:
|