23
System configuration and Log 魏魏魏 (Jerry Wei)

System configuration and Log

  • Upload
    fern

  • View
    54

  • Download
    0

Embed Size (px)

DESCRIPTION

魏凡琮 (Jerry Wei). System configuration and Log. Agenda. Boot process System configuration and log Network tools. Boot process. Linux boot process. System startup. Power On / Reset. BIOS. Stage1 bootloader. Master Boot Record. Stage2 bootloader. LILO 、 GRUB...etc. Kernel. Linux. - PowerPoint PPT Presentation

Citation preview

Page 1: System configuration and Log

System configuration and Log

魏凡琮 (Jerry Wei)

Page 2: System configuration and Log

Agenda

Boot process System configuration and log Network tools

Page 3: System configuration and Log

Boot process

Linux boot process

System startup

Stage1 bootloader

Stage2 bootloader

Kernel

Init

BIOS

Master Boot Record

LILO、 GRUB...etc

Linux

User space

Power On / Reset

Operation

Page 4: System configuration and Log

Boot process

BIOS POST

Hardware init.

Exec bootloader. (boot device)

Page 5: System configuration and Log

Boot process

Stage1 bootloader MBR (Max 2TB)

GPT (Max 18EB, EFI/UEFI-BIOS)

Load stage2 bootloader.

Page 6: System configuration and Log

Boot process

Stage2 bootloader GRUB、 LILO、 isolinux....etc.

Load linux kernel img.

Page 7: System configuration and Log

Boot process

Kernel Image decompressed and initialized.

Detect hardware and load driver.

Mount mountpoint.

/sbin/init.

Page 8: System configuration and Log

Boot process

Init pid 1.

/etc/inittab.

runlevel. /etc/init.d/rcX.d

/etc/rc.local

Page 9: System configuration and Log

Q & A

休息一下

Page 10: System configuration and Log

System Configuration and Log

hostname.

/etc/resolv.conf.

/etc/hosts.

System time.

Crontab.

Log.

Page 11: System configuration and Log

System Configuration and Log

System time date.

ntpd、 ntpd.conf .

ntpdate.

Page 12: System configuration and Log

System Configuration and Log

hostname /etc/hostname

跟 FQDN沒有關係。

Page 13: System configuration and Log

System Configuration and Log

/etc/resolv.conf search domain.

nameserver.

Page 14: System configuration and Log

System Configuration and Log

/etc/hosts /etc/nsswitch.

[ip] [hostname] [host alias]

EX: 192.168.0.1 lab1.ntu.edu.tw lab1

Page 15: System configuration and Log

System Configuration and Log

crontab 工作排程。 /etc/crontab.

crontab -e

Page 16: System configuration and Log

System Configuration and Log

log /var/log

syslogd / rsyslog.

logrotate.

service log.

Page 17: System configuration and Log

Q & A

休息一下

Page 18: System configuration and Log

Network tools

ping、 route、 traceroute、mtr

nslookup、 dig、whois

netstat

ifconfig、 ifup、 ifdown、 ip.

Page 19: System configuration and Log

Network tools

ifconfig (顯示網卡設定資訊 ) 。

ifup、 ifdown (啟用、關閉網路卡介面 ) 。EX: ifup eth0 、 ifdown eth0

EX: ifconfig eth0

ip (綜合指令 ) 。 ip [option] [object] { command | help }EX: ip link set eth0 down

Page 20: System configuration and Log

Network tools

route (路由相關指令 ) 。

traceroute (列出至目標主機的封包狀態 ) 。EX: traceroute 168.95.1.1

EX: route add/del 1.1.1.1/32 gw 192.168.1.3 dev eth0

mtr (同 traceroute)。EX:mtr www.ntu.edu.tw

Page 21: System configuration and Log

Network tools

nslookup (DNS records查詢 ) 。

dig (列出 domain相關資訊 ) 。dig @server name type

nslookup [domain/ip] [dns server]

whois (列出 domain相關資訊 ) 。EX:whois ntu.edu.tw

EX: dig @168.95.1.1 ntu.edu.tw MX

Page 22: System configuration and Log

Network tools

netstat (列出網路連線、路由表 ) 。EX: netstat {-na | -nr | -nap }

Page 23: System configuration and Log

Q & A

謝謝 !