Lecturer Niu Ben
Course Description:
Admin Admin Technology 7 days
Engineer Engineer Technology 6 days
Services Systems & Service Advanced 7 days
Admin Course Schedule:
Introduction to 1.Linux System Installation RHEL7 system, RHEL7 basic operation
2. Introduction to Teaching Environment, command line basics, directory and file management
3. Configure network, package management, text/file lookup
4.NTP time synchronization, tar backup and recovery, managing users and Groups, cron scheduling tasks
5. Permissions and attribution, using LDAP authentication, home directory roaming
6. Zoning planning and use, LVM logical volumes, managing swap Spaces
7. Comprehensive Chuanjiang and comprehensive exercises
First, the basic knowledge
Unix birth Time 1970.1.1 Ken Thompson Ken Thompson and Dennis Ritchie Dennis Ritchie
Linux's father Linus Torvalds Linus Torvalds
*linux= kernel + application =linux kernel + various peripheral software
Second, the common Linux operating system
*linux Release version
1.Red Hat Enterprise Linux 5/6/7
2.Suse Linux Enterprise 12
3.Debian Linux 7.8
4.Ubuntu Linux 14.10/15.04/16.04
Red Hat Series versions
1. Red Hat Linux Enterprise Edition
-Abbreviated Rhel
-Official website http://www.redhat.com
2.Fedora Core Community Edition
-Official website: http://fedoraproject.org
3.CentOS (Community Enterprise Operating System)
-Official website: http://www.centos.org
Third, hard disk initialization
Physical hard drives--partition planning--format--read-write documents
3.1 Hard disk partitioning scheme 3.1.1 MBR (Master Boot Record)/msdos
In theory, 1~4 can be divided into primary partitions, the actual operation is divided into 0~3 primary partition + an extended partition (n logical partition)
3.1.2 GPT (GUID Partition Table)
Up to 128 partitions, or 128 items in the partitioned table, each of which is 128 bytes. (EFI standard requires partition table to have a minimum of 16,384 bytes, which is the size of 128 partition entries)
Maximum capacity can support 1EB=1024TB. 1TB=1024GB 1GB=1024MB
3.2 Formatting 3.2.1 definition
Data in space, stored rules, arranged in a way
3.2.2 File System type
Ext4:rhel6 Default File system, fourth generation extended file system
Xfs:rhel7 default file system, advanced log file system
Swap: Swap space (virtual memory) takes the space of the hard disk as memory, easing the use of real memory pressure
IV. directory Structure 4.1 definition
Tree-shaped structure, all documents
4.2 Root directory
Equivalent to Windows "computer" or "My Computer"
means: "/"
Function: Store all data (starting point of the Linux system)
4.3/dev
Function: Storage of hard disk, keyboard, mouse, optical drive and other equipment files
4.4/etc
Role: Configuration files for Linux systems
4.5 Partitioning Representation method
MBR partition format:
/dev/sda3
HD: Indicates IDE device
SD: Indicates SCSI device
A: Represents the first hard drive
3: Represents a third primary partition
4.6 Access Points
When accessing a device resource, you must pass the access point
V. KVM Virtual Machine Installation 5.1 Installing the first virtual machine
Zoning Recommendations:
/dev/vda1/boot 500M store kernel and boot files
/dev/vda2/100g Storage System
/dev/vda3/data 100G Custom Partition
/DEV/VDA4 All remaining space--extended partition
/dev/vda5 8G Swap
Software selection: Server with GUI functionality
5.2 Virtual Console Switchover
CTRL+ALT+FN key combinations can be switched between TTY
Tty1: Graphical interface
TTY2~TTY6: Character Console
5.3 Pseudo-character terminal
At the end of the terminal is the pseudo-character terminal, opened after the prompt identification of the meaning of the following:
[Current user @ hostname working directory] hostname will only display the first one. Previous content
VI. Basic Command 6.1 complete command format
command word [options] [parameters]
Cat-n/etc/redhat-release
6.2 pwd
View current Working directory
6.3 CD
Switch directories
6.3.1 CD.
Return to previous level directory
6.3.2 CD ~
Returns the user's home directory
CD ~user to enter the user's home directory
/root Root's home directory
/Home Store all the normal user's house directory
/home/user User's home directory
6.3.3 CD-
Returns the directory that was last accessed
6.4 ls
To display the contents of a catalog file
The color of the file in the content represents a different meaning
Black: Text File
Blue: Directory
Cyan: Soft Link
Green: Executable Script
6.4.1 Ls-l
Displays the details of the files in the directory
6.4.2 Ls-a
Show files or directories that contain the beginning of the.
The files in Linux that begin with. are hidden files
6.4.3 Ls-ld
Display the properties of the directory itself
6.4.4 Ls-h
Show file size in a friendly way
6.4.5 LS-LHS
Show files in order from large to small
6.4.6 Ls-i
Displaying the inode for a file
6.5 Cat
Dedicated to viewing text file content
Cat/etc/redhat-release viewing the System release version
6.5.1 Cat <&0 >>aaa
No standard input specified, but standard output was specified to append to AAA file
6.5.2 Cat << "AAA"
When the standard input and output are not specified. The EE is the end of the Mr. Foo cache until the EE character is read, and the cat command ends when the EE character is read. And if the EE character is added "", then the following content if there is a variable symbol, then replace the variable, output as is.
Remember! The bottom-most EE character cannot be added ""
Alternative ways to annotate a script
Cat <<ee >/dev/null
Test file
To you
is a great idea
Ee
Echo Success
Linux System Introduction & partitioning & basic Commands (ADMIN01-1)