RHCE学习笔记-133-1

news2025/4/13 3:41:12

RH133-01
installation
光盘引导后,在提示符下输入:linux askmethod
可以支持:local cdrom,hard drive,nfs image,ftp,http方式
cpu on x86 2个物理超线程CPU
使用smp or hugemem kernel可以支持 32个物理cpus
内存
标准x86 kernel 4G
smp i686/athlon kernel 16G
hugemem SMP kernel 64G
block devices
/dev/had IDE drives
/dev/sda SCSI drives
/dev/fd0 standard floppy
character devices
/dev/tty[0-6] virtual consoles
/dev/st0 SCSI tape drive

只有在硬盘安装,光盘安装,NFS安装时才可以使用图形安装,也是默认的安装方式。
/ must include /etc, /lib /bin /sbin /dev
swap space is typically 2* physical RAM
typical mount points: /boot /home /usr /var /tmp /usr/local /opt
RAID

LVM:Logical Volume Manager,由IBM的AIX发展而来
PV—VG(virtual disk)—PE—LV
可以动态放大lv
SElinux options and control
disabled 停用SElinux
Warm 仅警告,而不套用安全规则
Active 套用安全规则

Package Selection
安装套件,如果空间足够的话,建议选择所有
By predefined components 默认套件
Individually 自定义安装
验证安装
dmesg and /var/log/dmesg查看系统信息
/var/log/messages 当系统发生错误时会把所有错误信息记录在此目录下,打开查看有无错误
/root/install.log
可以在引导光盘启动后在提示符后输入noprobe
也可以输入linux dd启动额外的驱动安装模式
system-config-* 设置工具
system-config-date,system-config-dispaly等等。。。
system initialization and service
boot sequence overview
BIOSMBR(Boot Loader)Kernelinit(pid=1)根据run levels执行相应的程序
BIOS initialization
Peripherals detected (POST)
Boot device selected
First sector of boot device read and executed
Boot loader
可以安装在如下2个地方
Install within a drive’s Master Boot Record
Install within a partition’s boot sector
Boot Loader
1st Stage - small,resides in MBR or boot sector
2nd Stage - loaded from boot partition
如果MBR被其他程序如SPFDisk占据了,那么boot loader会存在boot分区的boot sector来载入boot loader
Grub and grub.conf
GRUB – the GRand Unified Bootloader
Command-line interface available at boot prompt
Boot from ext2/ext3,ReiserFS,JFS,FAT,minix, or FFS filesystems
Supports MD5 password protection
/boot/grub/grub.conf
default=0 #默认使用哪个
timeout=5 #超时时间
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#背景图案
hiddenmenu
#隐藏菜单
title CentOS (2.6.18-8.el5)
#标题
root (hd0,0)
#硬盘位置,/boot所在分区
kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
#ro是只读的方式挂载/,也可以使用root=/dev/sdb2,就是/所在分区,也可以使用lvm的格式来表示, rhgb=Red Hat graphical boot,在开机时会以图形的界面取代传统的画面,在开机过程中可以更改.或删除rhgb。quiet是在开机过程中不显示错误信息,如果想显示,删除掉quiet即可.
initrd /boot/initrd-2.6.18-8.el5.img
#载入initrd-2.6.18-8.el5.img里的内容,此文件内存放驱动程序

在开机时选中要启动的linux,按a,进入grub append> ro root=LABLE=/ rhgb quiet
更改为grub append> ro root=LABLE=/ 1
就可以进入单用户模式,也就是不需要root的密码就可以进入系统,进入后使用passwd可以修改root的密码.用在忘记root密码时操作.
我们可以在grub.conf里设置密码来保护grub.conf,可以在hiddenmenu上一行添加password redhat,此时就设置了grub的密码为redhat
密码可以支持MD5加密,在系统中输入grub-md5-crypt,提示输入2次密码,然后把加密过的密码复制下来,在grub.conf中添加
password --md5 $1 9 r G t 0 9rGt0 9rGt0Dkp/tkpLsrhwB1FdaDKqY

Kernel initializationg
Kernel boot time functions
Device detection
Device driver initialization
Mounts root filesystem(/) as read only
Loads initial process (init)
Init initialization
Init reads its config:/etc/inittab
Initial run level

id:5:initdefault:

System initialization scripts

si::sysinit:/etc/rc.d/rc.sysinit

run level specific script directories

l5:5:wait:/etc/rc.d/rc 5

把5传递给/etc/rc.d/rc这个script,实际上是执行/etc/rc.d/rc5.d/*
Trap certain key sequences

Trap CTRL-ALT-DELETE

#ca::ctrlaltdel:/sbin/shutdown -t3 -r now 设定同时按这三个键时执行的命令
Define UPS power fial / restore scripts
#pf::powerfail:/sbin/shutdown -f -h +2 “Power Failure; System Shutting Down”
#pr:12345:powerokwait:/sbin/shutdown -c “Power Restored; Shutdown Cancelled”
电源失败和恢复是执行的命令
Generate gettys on virtual consoles
使用
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
来生成6个virtual consoles
Initiazile X in run level 5
在run level为5时,怎样初始化x window的指令
#x:5:respawn:/etc/X11/prefdm –nodaemon
总的流程
id:5:initdefault-/etc/rc.sysinit/etc/rc.5d/和/etc/rc.local /sbin/mingetty/etc/X11/prefdm
Run levels
Run level Effect
0 halt(Do not set initdefault to this)
1,S,emergency single-user modes(Only the root user can be logged on)主要做一些维护系统的工作. 1: init/etc/rc.sysinit/etc/rc1.d/

S:init/etc/rc.sysinit
Emergency: initsome /etc/rc.sysinit(执行必要的,不会全部执行)
2 Multi-user,without NFS networking.
3 Full multi-user mode.(includes networking)(text mode)
4 User definable,but duplicate of runlevel 3 by default
5 X11(includes networking)
6 Reboot(Do not set initdefault to this)
可以使用以下几种方式来选择哪一种runlevel
更改/etc/inittab
passing an argument from the boot loader 在开机时传一个参数给kernel
running init x after boot (where x is the desired run level)
Show current and previous run levels
/sbin/runlevel
/etc/rc.d/rc.sysinit
Important tasks include:
Activate udev and selinux 启用热插拔的设备如U盘和启动selinux
Set kernel parameters in /etc/sysctl.conf
Set the system clock
Loads keymaps定义键盘
Enables swap partitions
Sets hostname 设定在/etc/sysconfig/network
Root filesystem check and remount 检查/目录有没有问题,并重新挂载成可读可写的状态
Activate RAID and LVM devices
Enable disk quotas
Check and mount other filesystem
Cleans up stale locks and PID files 清除开机时的缓存文件
/etc/rc.d/rc
不同run level对应的rcx.d里要执行的程序,其实这些程序都是连接到init.d文件夹下的程序,不同的run level执行不同的init.d下的程序集
Daemon Proessses
A daemon process is a program that is run in the background,providing some system service
Two types of daemons
Standalone
分为2类:1在开机时由init直接启动的. 2 system V daemon 如 httpd
Transient – controlled by the “super-daemon” xinetd
Transient类型的服务必须由xinetd来代替用户请求来呼叫相应的服务.
System V Script
Run level defines which services to start
Each run levels has a corresponding directory
The system V init scripts reside in:
/etc/rc.d/init.d
Symbolic links in the run level directories call the init.d scripts with a start or stop argument
ls -l /etc/rc3.d/
K开头的是Kill,代表是kill所连接的这个服务,也就是不启动。S开头的是Start,代表要启动所连接的这个服务,K或S后面的数字代表了执行的先后顺序,数字越小的越先执行,总的来说是K先执行,然后再执行S.
System V Scripts服务启动和停止都使用同一个程序,不同的是后面参数不一样.
/etc/rc.d/rc.local
Run after the run level specific scripts
Common place form custom modification
ls -l /etc/rc*.d/*local
Virtual Consoles
Defined in /etc/inittab
Accessed with Ctrl-Alt-Fn
/dev/ttyn:virtual console n
/dev/tty0:the current virtual console
echo hello > /dev/tty3
echo hello > /dev/tty0
Default Red Hat Enterprise Linux configuration:
12 consoles defined,总共定义了12个tty
Consoles 1-6 accept logins,1-6可以使用
X server starts on first available console,usually 7
Controlling Services
Utilities to control default service startup
ntsysv:a console-base interactive utility
如果在ntsysv命令后没有加任何参数,默认只修改当前的level.如果要设定其他run level,必须在ntsysv后加参数,如ntsysv --level 3 5
chkconfig: a fast,versatile command line utility
chkconfig gpm --level 123 off
system-config-services:graphical utility that requires an X interface
Utilities to control services manually
Service: immediately start or stop a standalone service
建议使用绝对路径/etc/init.d/gpm stop,
支持所有linux版本,还有其他参数,reload=restart,status
Chkconfig: immediately starts and stops xinetd-managed services
chkconfig telnet --list
chkconfig telnet off
System-config-services: graphical utility that requires an X interface
System Stutdown
Shutting down the system(关机)
shutdown -h now
halt
poweroff
init 0
以上4个命令都会在关机之前执行sync.
System Reboot
Rebooting the system
shutdown –r now
reboot
init 6
Ctrl+Alt+Del
kernel service and configuration
Kernel Modules
Modules kernel components
kernel的模块是外挂在kernel上的,这样可以灵活的扩展kernel的功能,同时不增加kernel的大小,Modules有2个功能1.电脑周边设备的驱动. 2.提供一些额外的档案系统
在载入kernel的时候可以设置kernel modules
存放在/lib/modules
controlling modules
使用命令lsmod—列出目前载入的modules,
modprobe可以让我们临时载入某个modules
Kernel Modules Configuration
Modules examination:/sbin/modinfo 显示模块信息及授权同意书签署情况
Modules Configuration:/etc/modprobe.conf
可以设置:aliases,parameters,actions
Ethernet interface,sound card,usb controller
Modules Dependencies:modules.dep,depmod 模块的依赖性,记录在/lib/modules/$(uname –r)/modules.dep里,也可以使用depmod –a来查看所有模块的依赖性
Manual Control:insmod,rmmod
insmod可以载入某个module,跟modprobe差不多,不同的是modprobe会载入此mod依赖的mod,而insmod不会。rmmod删除某个module
The /proc filesystem
/proc is a virtual filesystem containing information about the running kernel
Contents of “files” under /proc may be viewd using cat
如:cat /proc/cpuinfo
Provides information on system hardware,networking settings and activity,memory usage and more
/proc subdirectories
/proc/scsi/ 包含了SCSI设备的信息
/proc/sys/ 包含了kernel的参数
/proc// 会用数字的形式显示在屏幕上,包含了所有执行中的程序的信息
The /proc/sys/ subdirectories allows administrators to modify certain parameters of a running kernel
如忽略ping包,命令行输入: echo “1” > /proc/sys/net/ipv4/icmp_echo_ignore_all,
cat /proc/sys/net/ipv4/icmp_echo_ignore_all确认修改,ping测试一下
然后再改回0,ping测试一下.
/proc/sys configuration with sysctl
/proc/sys modifications are temporary and not saved at system shutdown
The sysctl command manages such settings in a static and centralized fashion:
/etc/sysctl.conf
使用sysctl –p命令来查看并使内容生效
sysctl is called at boot time by rc.sysinit and uses settings in /etc/sysctl.conf
General Hardware Resources
当系统开机的时候,会在屏幕上看到kernel的引导信息,系统会通过klogd这个服务来写入到ring buffer,我们可以使用dmesg这个命令来查看ring buffer里的内容.ring buffer的空间是有限的,当ring buffer写满以后会把这些信息写入到/var/log/dmesg,这样避免信息被覆盖.
dmesg and /var/log/dmesg
kudzu
可以用来维护系统当中已经检测到的硬件的资料库,当系统检测到有新的硬件加入进来或有硬件移除时,kudzu会自动设定我们的系统或引导管理者来设定这个设备.并把检测到的设备写入到/etc/sysconfig/hwconf中,kudzu会使用/usr/share/hwdata/里面的硬件资料来检测目前系统里面的硬件设备.
之后系统会把检测到的设备的详细信息存储到/proc里去.
hwbrowser提供了图形界面的检测工具,我们可以通过这个工具来检测系统里有哪些硬件设备.
System Bus Support
PCI Bus PCI是x86主机当中主要的插槽
/sbin/lspci 此命令可以查看当前有哪些设备插在PCI插槽中
而这些PCI设备的信息会存储在/proc/bus/pci/中
ISA BUS 大部分ISA设备都支持热插拔Plug and Play
如果在系统中检测到ISA设备的话,会将这些设备的信息存储在/proc/isapnp/中
Hotswappable Bus Support
USB and IEEE 1394 Buses
当系统检测到有设备连接到USB接口或1394插槽中时,会自动启动/sbin/hotplug,并从/etc/hotplug/目录下载入相应的设备驱动程序
然后把这个设备的信息写入到/proc/bus/子目录中
可以使用/sbin/lsusb这个命令来查看有哪些设备插在USB插槽中
RHEL 4版本会自动挂载USB设备到/dev/usb
PCMCIA Bus
当系统检测到有设备连接到PCMCIA插槽中时,会自动执行/sbin/cardmgr,并从/etc/pcmcia目录中加载相应的驱动程序.
然后把这个设备的信息写入到/proc/bus/pccard/目录中
如果想要控制PCMCIA的设备可以使用/sbin/cardctl这个命令,这个命令可以帮我们监控PCMCIA插槽的状态
System Monitoring and Process Control
top,gnome-system-monitor 显示进程状态
vmstat reports virtual memory stats 显示swap的使用状况
free 也可以显示虚拟内存的使用,但是没有vmstat详细,可以同时看到物理和虚拟内存
renice 调整某个进程的执行优先级,nice用来调整某个应用程序的优先级
在这里插入图片描述

nice用在应用程序上,就是说当我们执行某个应用程序的时候就要同时指定它的优先级,renice用在进程上,只有当进程已经运行时才能用renice.
kill 可以把系统信息传输给一个进程
kill -l
Filesystem Management
System Initialization:Device Recognition
MBR contains:
Executable code to load operating system
MBR 512 bytes boot loader:446 bytes partition table 16*4 bytes 2 bytes
Space for partition table information,including
Partition id:0x5 extended
0x82 Linux swap
0x83 Linux
0x8e Linux LVM
0xfd Linux Raid auto
Starting cylinder for partition
Number of cylinders for partition
Disk Partitioning
Linux kernel中,一个IDE硬盘最多支持63个partions,SCSI最多支持15个partitions
Why partitions drives?
Containment,performance,quotas(配额只能在分区上用,而不是硬盘),recovery
Managing Partitions
fdisk
更改分区以后系统提示重启才会使用新的分区表,现在kernel在用旧的分区表.
其实在没有重启也可以使用新的分区表.
partprobe命令重新初始化内存中的分区表,也就是让新的分区表生效,可以格式化新的分区。
Managing Data:Filesystem Creation
格式建立的分区:mke2fs [options] device
Options:
-b 设定block size大小,默认是1k,最大4k
-c 在格式化之前先检查有没有bad blocks
-i 设定每个inode是多少bytes
-N 直接设定inodes总数量
-m 保留多少给supper user(root),默认5%
-L 在分区上设置label
-j 建立ext3的分区
使用命令dumpe2fs /dev/sda4 查看分区信息
Journaling for ext2 filesystem:ext3
将ext2转换为ext3.
tune2fs –j /dev/sda5
ext2与ext3格式一样,ext3有日志,写入数据时过程不一样.
ext3里有3种日志模式(journaling modes)
ordered:the default,journals only meta—data
journaled:journals as well as meta—data
writeback:journal updates are not automatic,but gives better performance
Managing Data:Filesystem Lables
e2label命令
e2label /dev/sda1 查看sda1的label
e2label /dev/sda6 date
Managing Data:mount
mount
可以使用mount –L /data /data 使用label来挂载
Managing Data:mount options
mount [-t vfstype] [-o options] device mount_point
-t vfstype (vfat,ext2,ext3,iso9660) 通常不需要指定,Linux自动会判断
-o
suid 允许挂载的文件系统使用suid or sgid 的特殊权限
dev 允许挂载的设备建立devices files,建立/dev/*
exec 允许挂载filesystem后执行里面的执行文件
auto 在电脑启动后自动挂载
nouser 只允许supper user挂载
Default options for the ext2/ext3 filesystem:
rw,suid,dev,exec,auto,nouser,async
Managing Data:Unmounting Filesystems
卸载时可使用 umount device | mount_point
必须没有使用,可以使用fuser to check and/or kill processes
fuser -v /opt 查看opt目录读写情况
fuser -km /data 停止对这个filesystem所有动作
Use the remount option to change a mounted filesystem’s options
mount -o remount,ro /data 把/data更改为只读
Managing Data:mount,by example
挂载iso文件 mount -t iso9660 -o ro loop boo.iso /iso
mount –o noexec /dev/sda6 /data
这样就挂载为不可执行。
Managing Data:Connecting Network Resources
挂载网络共享资源,UNIX/Linux主机之间用NFS,Unix/Linux与Microsoft之间使用SMB
NFS:
To discover showmount –e ip 查看某台nfs server上的共享目录
To connection mount ip:/share/dir /mnt/nfs
SMB
To discover smbclient –L ip –N
To connection mount //ip/share_name /mnt/smb –o username=account%password
Managing Data:/etc/fstab
device mount_point FS_type options dump_freq fsck_order
/dev/sdb /media/cdrom ext3 defaults 0(dump次数) 0=never,1=daily,2=every other etc 0 fsck检查顺序1-9,相同情况下按照顺序.0是不检查
/ 通常会是1,即第一位检查
mount光驱,软驱时,会自动检查fstab里关于他们的设置,所以只用
mount /mnt/cdrom
/etc/mtab存储当前mount设置
/etc/auto.master 主要设置文件
在umount时,只要指定目录或设备就可以了,因为linux会根据mtab里内容查找相应的条目
Managing Data:The Auto-Mounter
auomounter是一个daemon程序,当我们存取网络资源的时候自动帮我们挂载起来。可以监控某个如:/mnt,/nfs目录。当我们需要存取这个目录时,例如使用cd命令进入某个目录,会自动挂载相应的目录。如果在一段时间内,默认是60秒发现用户没有使用这个目录,就会自动帮我们把目录卸载,防止太多的人挂载nfs完了不用占用系统资源。
service autofs restart
重启automount服务,涉及到的文件auto.master auto.misc auto.nfs
vi /etc/auto.master
/mnt/nfs /etc/auto.nfs --timeout=60
自动监测的目录 挂载的设置文件 超时时间60秒
cp /etc/auto.misc /etc/auto.nfs
vi /etc/auto.nfs
server1 -ro,soft,intr 192.168.0.144:/var/ftp
/etc/init.d/autofs restart
cd /mnt/nfs/server1
ext2/ext3 Filesystem Attributes
文件系统的属性设置来控制档案的特性
lsattr
chattr
A 当文件修改时,atime记录不会修改
a 只允许增加内容,不允许覆盖,也就是允许>>,不允许>
cat > test
cat >> test
d 使用dump备份时,不备份这个档案
i 只读
j journal,就算档案挂载成ordered或writeback option
S 当档案被修改是立刻做同步
chattr = test 拿掉所有特殊属性
Virtual Memory
SWAP,有2种类型:partition file
Basic setup involves:
create swap partition or file
write special signature using mkswap
add appropriate entries to /etc/fstab
activate swap space with swapon -a,实际上是检查/fstab里关于swap的设置。
Additions
check the swap partition’s status using swapon -s
使用文件来做为swap
dd if=/dev/zero of=/swapfile bs=1M count=100
dd 是转换并复制档案,if=-inputfile,把/dev/zero里的档案当作输入。
of=output,bs=block size
Filesystem Maintenance
如果文件系统有丢失或损坏,可以使用fsck命令,要先umount命令
umount /data;fsck –y /dev/sda6
如果/文件挂载错误失败的话可以:
在系统错误提示下输入root密码,进入sulogin模式下修复系统,提示repair filesystem,vi /etc/fstab,发现编辑是不允许的,可以mount –o remount,rw /dev/sda2,重新挂载后再更改。
将ext2转成ext3
mke2fs -j /dev/sdb1
tune2fs -j /dev/sdb1 不丢失数据,完了之后remount一下
dumpe2fs 检查目前的文件系统信息
dumpe2fs –h /dev/sdb1
Adding a Drive
network configuration
Device Recognition
Linux中会以模块的形式来载入网卡驱动程序,如果开机启动网卡,会同时载入驱动和/etc/modprobe.conf的关于网卡的设置
命名会以如:eth0
/etc/modprobe.conf中,会把逻辑网卡名称对应到系统所检测到的网卡,为网卡取一个逻辑性的名称可以避免我们更换网卡时更改网络设置文件
Network interfaces
Interface names
Ethernet:eth0,eth1,ethN
Token Ring: tr0,tr1,trN
FDDI: fddi0,fddi1,fddiN
PPP: ppp0,ppp1,pppN
Data link layer address:MAC
ifconfig
dmesg
mii-tool
Views and controls the negotiated speed(100baseTX,10baseT)of some Ethernet cards
如果输入mii-tool显示no MII interface found表示不支持
Useful for forcing specific Ethernet speed and duplex settings
Changes with mii-tool should be made on inactive interfaces
先停用再更改
mii-tool -v
mii-tool -F 100baseTx-HD
ifconfig
可以查看更改IP,但是重启会丢失,并不会把更改写入配置文件
ifup / ifdown
ifup eth0
interface Configuration Files
网络设置对应的文件以ifcfg开头,如ifcfg-eth0
/etc/sysconfig/network-scripts
Configuration Utilities
netconfig
可以更改,但是必须借助ifup使其生效,如果在主机上增加一个网卡,必须使用kudzu,netconfig默认产生eth0的配置文件,如果希望产生其他的话使用
netconfig --device eth1
system-config-network=neat
Binding Multiple IP Address
如果绑定少量ip,可以建立ifcfg-ethx:x
cp ifcfg-eth0 ifcfg-eth0:0
vi ifcfg-eth0:0
DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.8.230
NETMASK=255.255.255.0
GATEWAY=192.168.8.253
TYPE=Ethernet
如果要在一个网卡上绑定大量IP的话,可以使用ifcfg range file
ifcfg-ethN-rangeN
可以使用cp ifcfg-eth0 ifcfg-eth0-range0
再修改里面的设置.
vi ifcfg-eth0-range0
DEVICE=eth0-range0
ONBOOT=yes
BOOTPROTO=static
NETMASK=255.255.255.0
TYPE=Ethernet
IPADDR_START=10.0.0.100
IPADDR_END=10.0.0.104
DHCP / BOOTP
DHCP可以分发ip,网关等参数
BOOTP只能分发IP地址.
reboot,ifdown,ifup都可以触发DHCP Discover
Global Network Parameters
/etc/sysconfig/network里的参数会在整个系统生效
NETWORKING=yes | no #有没有提供网络功能
HOSTNAME= #主机名,如果有变更必须reboot
GATEWAY= #默认网关
NISDOMAIN=
Defaults Route
Global default define in:
/etc/sysconfig/network
GATEWAY=xxx.xxx.xxx.xxx
Default gateway can also be define in
/etc/sysconfig/network-script/ifcfg-xxx
GATEWAY=xxx.xxx.xxx.xxx
ifcfg-xxx default overrides Global default routes
Static Routes
Static router优先级比默认网关高,linux automatically creates a network route for connected networks
static routes defined per interface
/etc/sysconfig/network-scripts/route-eth0
/etc/sysconfig/networking/devices/route-eth0
Display with:
route -n
netstat -rn
手动添加static route
route add -net 10.0.1.0 netmask 255.255.255.0 gw 192.168.0.254
重启后会失效,必须设置到/etc/sysconfig/network-scripts/
vi route-eth0
10.0.1.0/24 via 192.168.0.254
修改后需要重启网卡或重启生效
使用图形界面修改网络设置,会覆盖掉原来的配置文件.
Name Resolution
hostname display or set the system’s name
is initially set by rc.sysinit from $HOSTNAME variable
/etc/system/network,更改主机名之后需要重启
/etc/hosts local database of hostname to IP address mappings
Checked before DNS
useful for small isolated networks
vi /etc/nsswitch.conf
改变dns解析顺序
DNS Client Configuration
/etc/resolv.conf
defines which name server to use
Servers are checked in order listed
vi /etc/resolv.conf
search domain.com #当我们使用simple name搜索时自动组成完整的fqdn
nameserve 192.168.0.1
主DNS断线或故障情况下才会向备份DNS查询,如果主DNS在线,但查不到不会向第二台DNS请求
DNS Utilities
host:
host -a sina.com
host www.sina.com.cn
dig:
可以指定向某一台DNS查询某个类型的DNS记录
dig @ns1.redhat.com mx redhat.com
向ns1.redhat.com查询redhat.com这个域的mx类型记录
Network Diagnostics
ping traceroute,mtr netstat

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/153334.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

创建新分支,基于某一分支创建新分支,git push --set-upstream origin

背景: 基于hcc1.2的开发分支拉去hcc_hotfix_1.2.0分支,解读:在仓库中基于某个分支,创建一个新的分支 做法(解决): 1、第一步:git branch hcc_hotfix_1.2.0 2、第二步:g…

葡萄城邀您参与「表格技术开发者新年分享会」,共话表格技术新未来!

数据资产是企业最重要的资产之一,表格也是企业最普遍的数据整理手段。在数字经济时代,各行业飞速发展,拥抱数字化、进行数字化升级已成为大势所趋,企业对协同办公、大数据分析、表格智能化应用等领域的需求也呈爆发式增长&#xf…

GrapeCity Documents Image Viewer JavaScript Crack

GrapeCity Documents Image Viewer 是跨平台 JavaScript 图像查看器 允许用户使用我们的 JavaScript 图像查看器在您的 Web 应用程序中查看和编辑图像。采集 by Ω578867473 支持多种图像格式 适用于所有现代浏览器和框架,包括 Edge、Chrome、Firefox、Opera、Saf…

【UE4 第一人称射击游戏】33-创建一个小地图

上一篇:【UE4 第一人称射击游戏】32-添加击杀AI的提示功能(使用到控件蓝图的动画功能)本篇效果:可以看到左上角完成了小地图的制作步骤:打开名为“FPSHUD”的控件蓝图,拖入一个图像控件,表示迷你…

Diffusion 和Stable Diffusion的数学和工作原理详细解释

扩散模型的兴起可以被视为人工智能生成艺术领域最近取得突破的主要因素。而稳定扩散模型的发展使得我们可以通过一个文本提示轻松地创建美妙的艺术插图。所以在本文中,我将解释它们是如何工作的。 扩散模型 Diffusion 扩散模型的训练可以分为两部分: 正向扩散→在图…

输出全排列(C++版)

目录 输出全排列 一、问题描述 二、运行环境说明 ​三、代码段 四、效果展示 输出全排列 备注:大二(上)数据结构课程设计A题 一、问题描述 请编…

我是如何利用cps平台赚钱的?

你好,我是你们熟悉而又陌生的好朋友梦龙,一个创业期的年轻人 今天跟你做个分享,众所周知互联网是一块非常大的蛋糕,几位互联网巨头也做不到完全吃透,这次梦龙给你分享的是实际的经验,实际的案例分享。 最开…

Spring存储和读取对象 -- 2

Spring存储和读取对象 -- 2前言一、存储 Bean 对象1.1 前置工作:配置扫描路径 (重要)1.2 添加注解存储 Bean 对象1.2.1 五大类注解Bean 命名规则1.2.2 方法注解 BeanBean 命名规则与重命名二、获取 Bean 对象 (对象注入)2.1 属性注入优点分析缺点分析2.2 Setter 注入…

如何在Jetbrain Rider中使用EntityFrameWork (Core) 命令行,如添加迁移和更新数据库

在Visual Studio中,EntityFrameWork命令如Add-Migration和Update-Database通常在包管理器控制台中运行。这在Visual Studio中工作得很好,但不幸的是,它不是可移植的。这些命令是基于powershell的,并且包管理器控制台绑定了Visual …

开源的文档型数据库--MongoDB(安装)

1、简介 MongoDB 是一个开源的、文档数据库管理系统。它提供了高性能、高可扩展性和高可用性。 MongoDB 使用了一种称为 BSON 的二进制形式的 JSON 来存储数据。这使得 MongoDB 可以轻松地存储各种数据类型,包括大型对象和二进制文件。 MongoDB 的一个重要特性是它的…

多线程1.

多线程1 1.如果想对地址空间的堆区做更细腻化的空间管理,怎么办? 搞一个vim_area_struct,他是一个双向链表。每一个节点是一块堆区空间,用链表串起来。 2.如何管理物理内存? 设定一个数据结构,如&#x…

电子会议桌牌

产品特色: 低功耗,常规使用3-5年电池寿命支持空中唤醒,刷新快速,几秒钟内看到结果点阵电子纸屏幕,视角接近180基于Web的应用界面,支持跨平台操作安装简单,快速布置电池供电不需要布线双面显示&…

神经网络模型的参数量和FlOPS

一、FLOPS、FLOPs和GFLOPs的概念 FLOPS:注意S是大写,是 “每秒所执行的浮点运算次数”(floating-point operations per second)的缩写。它常被用来估算电脑的执行效能,尤其是在使用到大量浮点运算的科学计算领域中。正…

重装系统把所有盘格式化教程

在使用电脑的过程中,可能会遇到系统重装的问题,但是有些朋友就觉得之前的分区不太合理,就打算全盘格式化重装系统,那小白一键重装系统怎么把所有盘格式化呢?这需要借助U盘或光盘来引导了。下面就来看看操作教程吧。 工具/原料&a…

2.17 STM32 SysTick—系统定时器

文章目录1、简介2、寄存器2.1 SysTick控制和状态寄存器(STK_CTRL)2.2 重载值寄存器(STK_LOAD)2.3 SysTick当前值寄存器 (STK_VAL)2.4 校准寄存器(STK_CALIB)3、SysTick 定时实验3.1 在标准库中3.2 在HAL库中的初始化4、SysTick 定…

driftingblues7靶机(eyes of network漏洞)

环境准备 靶机链接:百度网盘 请输入提取码 提取码:49by 虚拟机网络链接模式:桥接模式 攻击机系统:kali linux 2021.1 信息收集 1.arp-scan -l 2.探测靶机开放端口和服务情况 nmap -p- -A -T4 192.168.1.108 漏洞利用 1.访…

为什么开发者这么看重SQL?看完这些应用场景你就明白了

看到一个有趣的比喻,用来说明SQL与Excel的差别是什么。 如果把SQL比作火车,把Excel更比作卡车。 卡车灵活自由,高速或乡村小道想去哪就去哪,但即便每天不停歇卡车的运载量也不大,而且容易出交通事故。 火车运载量大…

P2P中的NAT穿越(打洞)方案详解

1、内容概述 P2P即点对点通信,或称为对等联网,与传统的服务器客户端模式(如下图“P2P结构模型”所示)有着明显的区别,在即时通讯方案中应用广泛(比如IM应用中的实时音视频通信、实时文件传输甚至文字聊天等…

【Python基础】篇四之while、for循环及其嵌套、continue、break

while循环基本格式:while 条件:条件满足时做的事1条件满足时做的事2条件满足时做的事省略注:只要条件满足就会一直执行while的条件需得到布尔类型,True表示循环继续,False表示循环结束需要设置循环终止条件&#xff0c…

map 源码思考

go 语言中 map 比较的说,和 slice 有什么区别?如果 map 是从 int 到 int 类型的话,差别还真不大。map 的 key 退化为 slice 的下标,而 value 退化为 slice 的值。 但这样也存在很大的弊端:空间浪费严重。假设 map 中只…