Linux Basics: Day01

Linux operating system knowledge :
 1, elementary 2, intermediate 3, advanced 4, * additional information *
 
 1, the primary
  principle 1.1, OS operating system
  1.2, begin to understand the frequently used commands (system management base command)
   boot off
   Time Management Clock hwclock CAL DATE
   LS CD pwd ....
  1.3, object structures, object of the management
   tree Tree
   CD: .. ~ -.
  1.4, file management, file search, the file attributes
  1.5, manage users and user groups
   SU the sudo
   ACL
   0,077,770
  1.6 disk management
   file system principle
   fdisk - parted
   LVM
   RAID
  1.7, Linux network management
   network knowledge
   ip
   the ping
   netstat
   SS
   ifconfig
   ifup / ifdown
   route
   ...
  1.8 * * process management
   process management: 1, process thread
    2, the process of program
    3, common processes and daemons
    . . .
   the pstree PS
   Top
   Uptime
   the vmstat
   htop
   ...
  1.9, iptables - Firewall
   four table pentachain
   four tables: filter nat mangle raw
   pentachain: prerouting input forward output postrouting 
 2, intermediate
  2.1, shell script development (Python)
   bash features variable text processing logic statements Three Musketeers 
  2.2, nfs (rpc) smb the TFTP iscsi the FTP
  2.3, dns service
  2.4, the Telnet OpenSSH OpenSSL
  2.5, httpd (HTTP protocol)
  2.5, LAMP - MySQL (* learn alone *)
  2.6, nginx (website reference module)
  knowledge 2.7, the cached site! ! !
  2.8 Other service dhcp ...
 3, advanced
  3.1, 1 cluster, cluster-based application layer heartbeat + nginx reverse proxy
     the HA RHCS ....
   2, three and four keepalived + lvs
  3.2, virtualization - Cloud
   1, Xen
   2, Kvm - oVirt
   3, OpenStack
   4, Docker - K8S (platform automation operation and maintenance --docker cluster management)
  3.3, big data
   1, hadoop cluster
    HDFS distributed cluster file system - mass data storage problem of
    map-reducer preliminary deal to solve the problem of data (we need massive amounts of data by the MR installed for the KV structure)
    JAVA
   2, ELK ES
    mass data (log) processing system
 4, other content
  4.1 monitoring platform
    zabbix
   back-end data processing and storage | zabbix platform | front-end data
   shared storage, data platform PHP front-end module
   cacti 
   nagios   
  4.2, automated operation and maintenance
   ansible
   Puppet
   saltstack
   ...
  
  4.3, Python development
 
System Basis
System Basis:
 1, three members
  CPU: arithmetic memory controller
   1 + 1 = 2 times space
   interrupts
  the memory: the CPU data from the read only memory, and a volatile memory data (page Page)
  the IO: Control bus data bus (a IO, the developer is called)
 2, OS principle
  Figure
  Note: What operating system?
  
 3, OS management
  GUI - graphical KDE XFCE the GNOME
  CLI - Command Line Interface shell
   common shell program
   SH - bash
   csh
   tcsh
   ksh
   zsh
  CAT / etc / shells
 
 4, call the
  System Call
  API
 
 5, historical knowledge of the operating system
  see the blog
 6, the open-source system
  GNU - GPL
   loose GPL agreement
  the Apache
  BSD 
 7, Linux version of Common Publishers
 
Basic commands
Command base
 1, use the command
 basic format:
   Command Option Action Object
 * Extended:
  Subcommand Options target
  QEMU-KVM the Create / PAUSE / STOP ...
  Docker
 
 2, get command help
  ring0 - ring3
  built-in command - run ring0
  outside configuration commands - run ring3
  
  expansion: virtualization - ring -1 ring 0 - ring 3 - hardware assisted virtualization (intel vt-x amd xxx)
  1,
  built-in command
   help command
  external fame and fortune
   command --help / -h
  2, man - Manual Manual
   / usr / share / man ... all the help manual is a file compression
   8 Level - 1
   each level corresponding content do not want the same, and each command there may only be one or several of help content;
   1: Indicates user commands - the use of some form of command or parameter usage of ordinary users;
       2: the system calls - check command associated with the System call
   . 3: library calls - commands associated libraries
   4: special file (device file)
   5: file format (configuration file syntax)
   6: game
   7: miscellaneous (miscellaneous)
   . 8: management command (/ sbin, / usr / sbin, / usr / local / sbin) only administrators have permission to use the command, because they can modify the hardware device parameters;
   whatis command
    to view the commands supported by the man class type;
   User Commands - user command
   NAME - name; generally display this command
   synopsis - Summary; usage command
   DESCRIPTION - Description; various parameters for the command, and its interpretation;
   AUTHOR - Author;
   COPYRIGHT - Copyright ; hair version information
   sEE ALSO - View another
   
   more man calls for file viewing
    1 / content - default content developed down to find
    2 ,? Content - up to find the specified content default
     - n a
     a a N
  3 view info information
   / usr / share / doc /. . .
   Help document storage command (and related documents from history)
   generally do not look
  4, install third-party software
   README
  5, Baidu Google
 3, the basic command system
  3.1, PATH environment variable
   echo the PATH $
  3.2, commonly used commands 
   a Date Clock hwclock Cd pwd LS STAT Cat tac File
   DATE view the system clock
    frequently used commands in the file
    % letter
    % F 2019-08-26
    % D 08 / 26/19
    % H
    % m% m
    % S
   clock hwclock hardware clock CAL
    hwclock -s // the system clock and the hardware clock synchronization, clock synchronization as hardware
   extensions: ntp server
    yum install ntp
    to modify the file /etc/ntp.conf to achieve the client and server time synchronization;
   cd pwd
    directory:. .. ~ -
    PWD OLDPWD
    basename
    dirname
   LS
    it involves a lot of file attribute information
    -i inode information (file system-related)
    the -l file type of file permissions (your main group belongs to other special permission bits) number of links to your main hard belongs to group files (directory) size Mtime file name (directory name)
        - plain text file
        d directory file
          l soft link file --------------------------------------------- ------------------------------------ connected file character length
         s (socket file) - -------------------------------------------------- ----------------------------------- major number minor numbers
        b block device file ----- -------------------------------------------------- ---------------------------------- major number minor numbers
       c character device file streaming device file
       p conduit document
   file to view files of specific file type
    plain text files ASCII file
   stat time to view the file information
    Touch -C
   CAT tac
          Check file contents
          cat can combine multiple lines of input redirection
    -n
  Other common commands
   the WHO w whoami whereis whatis Which 
   the WHO w whoami current system login user information
   whereis
    view commands absolute path
    to view the man's help documentation path
   Which
   whatis
   the HALT reboot the init the init 0 the shutdown poweroff 6
   the shutdown now // immediately shut down
   shutdown -r now // immediately restart
   shutdown 17:00 // 17:00 shutdown when
   the shutdown -r 17:00 
   the shutdown +5 // first after the command execution 5 minutes off
   shutdonw -c // cancel the shutdown command
    to understand: shutdown call is poweroff
   the HALT - the HALT directly off
   poweroff - will make the process of checking off
   reboot - restart
   init 0 / init 6
 
The directory structure and directory management
Linux directory structure:
 1, the rules directory created
  * FHS filesystem hierarchy standard *
  specifies the Linux operating system, those directories are sure to have a
  / boot / bin / sbin / etc / sys / proc / mnt / media / usr / option / var / home / root / tmp / dev
 2, the structure of the directory
  tree
  / - rootfs root file system
           after system startup, the hard disk to be used need to have drivers, drivers for installation grub1.5 phase (when / -> ramdisk);
           complete 1.5 disk drive installation stage, this time, you can mount the real root file system;
           and the file system that we installed in the system, specify the root partition; this partition, called the root file system;
  have root later, other directories are at the root;
  this structure, we called tree structure;
 3, common directory
  / boot - boot program storage, and system files (you can separate partition)
  / etc - the default configuration file directory
   / etc / opt: a software program installed in the / opt directory profile now is not much use
   / etc / X11: in C under Linux graphical interface displays / S structure 11 is his version X is an agreement, which is the basic graphical display specifications;
   / etc / sgml page label statement
   / etc / xml page label language
    KVM HTTP hadoop
    <the X-> parameter = value </ the X->
  / bin / sbin - store command files
  / sys / proc - process file system (pseudo file directory, virtual directory)
  / mnt / Media - / mnt mount disk, mount the long-term needs of the device file to mount this directory / media file on a temporary device to mount / media directory
  / home / root - the average user's home directory root user's home directory
  / var dynamic file local (subject to modified files) stored - log
   / var / log / journal devoted to the store
  / tmp directory temporary files for all users to use the
   files in this directory is not accessed for 30 days will be automatically delete
  / option used to store third-party software programs (now rarely used)
  / lib / lib64 library file directory
  / dev device file directory
  / usr / Linux system in another independent kingdom
   / usr / bin
   / usr / sbin
   / usr / local local hierarchy (directory is empty after installation) replaced / opt directory early third-party programs are installed in the directories below;
 4, managing directory of
  4.1, the problem with an absolute path relative path
  related commands 4.2 directory
   mkdir -pv also create multi-level directory
   rmdir only removes empty directories
   rm -r // delete directory
   tree -d only just display the directory file
   mv can change the name of the directory
   cp -R can copy the catalog file

Guess you like

Origin www.cnblogs.com/why098/p/11415023.html