I got LPIC-level1 last week, so I will continue to take level2. Therefore, the main points of the test range are summarized below.
sar -b -f / var / log / sa / saXX
-> View XX day report--Bottleneck by focusing on IO on a specific partition-> Try changing to faster storage
--Rebuild kernel / adjust kernel parameters
--swapon -s
-> Check swap (/ proc / swaps)
--4.9-rc1-> rc is Release Candidate (development version) --How to check the version ① ʻuname -r` ② / proc / version file ③ View Makefile
--Some functions are separated from the kernel and modularized (.ko)-> The kernel becomes compact and saves boot time and memory.
depmod
-> modules.dep file (module1.ko: module2.ko module3.ko)
--I want to preprocess or add an alias-> Set in /etc/modprobe.conf or /etc/modprove.d/ filealias eth0 r7257
--kmod-> Kernel feature automatically loads modules when needed--Source code-> / usr / src
--How to upgrade-> ① cp / boot / congig ... x86-64 .config
(copy the previous configuration file to .config)
-> ②make oldconfig
--Kernel configuration-> make menuconfig
--Compile-> make
--Kernel module and kernel installation-> make modules_install
-> make install
--Since the image is created in / boot, use the default kernel.
--DKMS-> Dynamic Kernel Module Support (automatically builds a third party kernel module)
make clean
make mrproper
--sysctl [-w] net.ipv4.ip_forward = 1
(disappears on reboot) / Write to /etc/sysctl.conf (persistent)
--initrd / initramfs (cpio archive + compression)
--Create initial ramdisk-> mkinitrd
/ mkinitramfs
--Initramfs can be created under / boot with the latest CentOS-> dracut
command
lspci -s 2: 0
-> Bus 2 and slot 0 (used for identification) --rules file identification key = match value-> device file created with specified rules --Monitor device detection-> ʻudevadm monitor
SysVinit --init reads / etc / inittab ---> /etc/rc[0-6].d/S85httpd etc. ---> Start login process and end
systemd
--Unit (service / device / mount / swap / target) = processing unit
--First, /etc/systemd/system/defalt.target Unit is processed
---> It is a symbolic link to /lib/systemd/system/XX.target
--Check running services-> systemctl list-units --type = ○○
--/etc/systemd/system/multi-user.target.wants/Unit configuration files (postfix.service, etc.)
GRUB
grub-install
grub
GRUB2
grub2-install
grub(2)-mkconfig
-> /boot/grub/grub.cfg
--Interactive shell-> grub2
--Specify root file system-> linux /boot/vimlinuz-.4.4.0 ro root = / dec / sda1
--Check boot options-> / proc / cmdline
--Start in rescue mode from the installation CD / DVD-ROM
--You have to specify the root directory such as rpm command-> Change the root directory with chroot
--Modify GRUB configuration file-> grub (2) -mkconfig
blkid
--Mount option
--noatime-> Do not update inode access time = speed upmount
/ umount
--Remount-> mount -o remount / data
--sync
-> Write the data in the disk buffer area in memory to disk
--Procedure to create swap area in file ↓dd if=/dev/zero of=/tmp/swapfile bs=1M count=500
mkswap /tmp/swapfile
swapon /tmp/swapfile
--Check swap space-> swapon -s
or cat / proc / swaps
ext
XFS
Btrfs
--Checking btrfs usage-> btrfs filesystem df / mnt
--Snapshot with btrfs-> btrfs subvolume snapshot A B
CD/DVD
--Repair from superblock backup-> ʻe2fsck -b 8193 / dev / sda2`
RAID
mdadm
--Status-> / proc / mdstat
--Settings-> /etc/mdadm.confmdadm --create / dev / md0 --level 5 --raid-devices 3 A B C
LVM
--Partition preparation (parted
)-> Physical volume creation (pvcreate)-> Volume group creation (vgcreate)-> Logical volume creation (lvcreate)-> File system creation (mkfs)-> Mount (mount)
lvcreate -s
)-> Backup (dump 0uf
)
--The snapshot area expands when there is a changehdparm
(IDE) / sdparm
(SATA/SCSI/USB)SSD
--Record in flash memory instead of magnetic disk
--When deleting, just flag the data instead of actually erasing it-> Performance degradation-> fstrim -v /
iSCSI
netstat -l
-> Show only lintening sockets
--netstat -i
-> Display by interfacenc -vz ip address 1-1000
-> Port scan in the range 1-1000make
--Install with sudo make install
(all / install / clean)
--Located in / usr / local / bin--Local backup
mt -f / dev / st0 fsf 5
-> Fast forward tape from current position to 5 data ahead--Remote backup
rsync -auvz --delete -e ssh dir username@hostname:/backupdir
wall
--Set the setting to NAT-> Bridge --ifup interface name --Try to ping
Recommended Posts