First part: server hardware
Operation and Maintenance Core Responsibilities: Website data can not be lost, site 724-hour operation, improved user experience-fast access
Simple computer Composition:
1) server-related knowledge:
1.1) Server Classification:
Rack-Mount Servers
Blade Type Server
Tower-Type Server
1.2) Size of the server:
U---The height of the unit server
1u–-4.5cm
1.3) Model of the server:
Dell R710 2U Two-way 16G 6300G RAID level
1.4) The brand of the server:
DELL, IBM, HP, Lenove, Wave, Dawn, super-
2) Power supply:
AB Road (get current from multiple Transformers)
Ups*2 Set
Diesel Generator + oil tank
Emergency Oil Supply Agreement
3) CPU:
Zhi Qiang Xeon
Lu
4) Memory
4.1) Features of Memory:
Where data is temporarily stored-the data in the power-off memory is lost
4.2) program, Process daemon
4.3) Enhance the user experience
Large Web portal (data placed in memory)
Small-to-medium (normal data on disk)
4.4) The difference between buffer and cache
Write buffer
Read cache
5) Disk:
5.1) disk is the place where data is permanently stored
5.2) Classification according to working principle
Mechanical disk
Solid-state Drives
5.3) Disk Interface
SAS: Enterprise Server default Standard
SATA: Data that is not very important for home or storage
6)RAID卡/阵列卡 6.1)特点 获得更高的容量 获得更强的性能 获得更高的安全性 6.2)常见的raid级别 Raid0 Raid1 7)远程控制卡 7.1)优点:不用再跑机房了 7.2)硬件分类 独立 集成 7.3)功能分类 Exress版本 Enterprise版本 8)操作系统组成 外围的应用 命令解释器 内核
Part II: Linux Development
1) Operating system composition
Peripheral applications
Command interpreter
Kernel
2) Linux development process
2.1) Unix Birth
2.2) People: Tan Ningbong
Mini
For teaching
2.3) People: Stallman
Goal: Create an open source, free system
FSF: Free Software Foundation
Project: GNU
Rules and regulations: GPL
2.4) People: Torvalds Torvalds
Founder of Linux kernel
Linux:gnu Software +linux Kernel gnu/linux
3) GNU
Gnu=gnu ' s not unix
Core: Bash,gawk,gcc,emacs
4) GPL
gpl-General Public License
All software can be freely spread, open source
Anyone can change the open source software at will, but it must be issued after the modification.
5) Linux distribution options:
Ubuntu
Redhat and CentOS Differences
Redhat free to download, use
Redhat Update software, demand service
CentOS is the same as Redhat
Get rid of Redhat logo and charge items
Fedora
Part III: Learning Environment/Working environment preparation
1) Server Remote connection Environment preparation
1.1) Check the server IP address is unobstructed
1.2) Turn off the security components
Selinux
Iptables
1.3) Remote Connection service check
Port 22nd is open
Check if the SSH process is turned on
2) Disk Partitioning method
2.1) General-data not important
/boot Directory 200M
Swap swap partition (virtual memory) is 1.5 times times memory (memory less than 8G) 8G (memory >=8g)
/root directory How much left to give
2.2) When the data is important
/boot Directory 200M
Swap swap partition (virtual memory) is 1.5 times times memory (memory less than 8G) 8G (memory >=8g)
/root directory 40-200g
How much is left to/data?
3.3) do not know the weight is not important
/boot Directory 200M
Swap swap partition (virtual memory) is 1.5 times times memory (memory less than 8G) 8G (memory >=8g)
/root directory 40-200g
Remaining space reserved, not partitioned, when used on demand
3) Installation Minimized installation method
Minimal (minimized installation)
Yum checks the package group to be installed: Yum grouplist "package Group"
Part IV: The first wave of command
1) Linux Basic knowledge
Command line composition
Command composition
Linux directory features: Want to path and absolute path
Alias:
Temporary entry into force: alias rm= ' echo command RM BNY '
Permanent entry:/etc/profie # #修改这个配置文件 Source/etc/profile
Part V: Linux system optimization
1) View System version
Cat/etc/redhat-release
Uname-r
Uname-m
2) Add user Switch User
Add User: Useradd
Change Password: passwd
View Current User: WhoAmI
3) Modify SELinux
Temporary closure: Setenforce 0
Permanently closed:/etc/selinux/config
4) Iptables
Close:/etc/init.d/iptables stop
Boot from: chkconfig iptables off
Part VI: directory structure
1) Basic Operation:
1.1) features of the directory structure:
Start with the root together
The device below Linux is not mounted and cannot be used
1.2) NIC configuration file
IPADDR IP Address
Onboot whether this NIC will start automatically when restarting the server
Bootproto determines how you get the IP (manual input, DHCP fetch)
DNS: Mapping relationships between domain names and IP addresses
Allow NIC configuration to take effect:/etc/init.d/network restart
1.3) DNS configuration file
DNS role: Domain name resolution: URL/Domain translated to IP address
Global DNS configuration:/etc/resolv.conf
Nic configuration file/etc/sysconfig/network-scripts/ifcfg-eth0
The network card configuration file takes precedence over the/etc/resolv.conf #实时生效, the network card inside the DNS restart network card after the effective
1.4) How to modify host name
View Host Name: hostname
Temporarily modify host Name: hostname Oldboy
Permanently modify host Name:/etc/sysconfig/network
1.5) 3 Ways to install software in Linux
Yum:yum install-y Tree
RPM:RPM-IVH Tree
Compile and install:./configure make && make install
1.6) A directory that must be known in Linux
First NIC configuration file:/etc/sysconfig/network-scripts/ifcfg-eth0
DNS configuration file:/etc/resolv.conf
IP address and hostname mapping relationship:/etc/hosts
boot automatically hangs in partition:/etc/fstab
Environment variables for the system:/etc/profile
Alias storage location:/ETC/BASHRC
System software/service Management command, storage location:/ETC/INIT.D
Run-level configuration file:/etc/inittab
The program or command that holds the boot from:/etc/rc.local
Modify host name file:/etc/sysconfig/network
Installing the default installation directory at compile time:/usr/local
System normal log:/var/log/message
User Login information:/var/log/secure
System Mount Information:/proc/mounts
System Load Information:/PRO/LOADAVG
System Memory Information:/pro/meminfo
System CPU Information:/pro/cpuinfo
Part VII: The second wave of command
1) Basic knowledge points
PATH environment variable
Single quote-double quote-back Quote
Operating level:
Modify RunLevel: Init 3
Permanent modification:/etc/inittab
Meaning of each runlevel:
0 shutdown status (do not set the RunLevel to 0 permanently)
1 single-User mode troubleshooting
2 Multi-user mode (Cannot use NFS software)
3 full Multi-user mode (text mode, command line mode)
4 Not used
5 Graphical interface Mode X11
6 reboot (do not set the RunLevel to 6 permanently)
2) Linux boot process:
1, power on and press the switch, into the post (BIOS) detect memory, hard disk, CPU and so on is normal (hardware self-test)
2, MBR boot, when the hard drive starts, the BIOS is usually the first sector to turn to the first hard disk, that is, the master boot Record (MBR).
3, Grup menu, the above record different version of the kernel, you can manually select.
4, load the kernel (in the Grup menu choose which to load which kernel, do not choose to load the default. )
5. Run the init level (the first process inside the system)
6. Read/etc/inittab configuration file (configuration file has init level configuration, default is 3, full multi-user mode)
7. Execute/etc/rc.d/rc.sysinit System initialization script (must be initialized regardless of which runlevel the system is enabled for)
8, execute/etc/rc.d.rc script, depending on the operating level of the system, start different software when booting.
9, start the Mingetty process, (Mingetty process, is the user login system when a verification process)
3) Compression and decompression
3.1) Tar
Tar ZCF creating a compressed package
Tar tf View Compressed Package Contents
Tar XF Decompression
-C Specify the decompression path
3.2) Zip/unzip
This format is supported by default for Linux and Windows
4) Find
-MAXDEPTH Specifies the maximum depth to find
-mtime Specifying a time range
-name the file name of the lookup
-size File Size
5) awk
-F Specify delimiter
Basic Linux Knowledge