In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Linux system to see the currently loaded modules? How to view a module information and related parameters? Load a module? lsmodinfomodprobe 2, Linux system boot file path is/etc/rc.d/3, Linux commonly used boot loader is LILO and GRUB4, Linux system, Generally can be used. 5, Brief description of linux boot process CentOS6:1, POST power-on self-test 2, BootSequence select boot item 3, Enter grub boot stage, Stage 1.0, Stage 1.5, Stage 2.0 stage, Stage 2.0 stage will load grub configuration file, Load operating system menu, Load kernel file, Load ramfs virtual file system, Transfer to kernel 4, Then enter kernel boot stage, Execute/sbin/init5, 6, How to view BIOS version, Machine model, Serial number on linux system? Check out the Card driver version? biosdecode #See BIOS information Server model: dmidecode| grep Product Motherboard Serial Number: dmidecode| grep 'Serial Number' |grep -v Not NIC driver version: ethtool -i ens337, How to modify kernel parameters?# Show all current ne kernel parameters [root@localhost ~]# sysctl -a#Temporary modification [root@localhost ~]# echo 1 > /proc/sys/net/ipv4/ip_forward#Permanent modification [root@localhost ~]# echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/ip_forward.conf[root@localhost ~]# sysctl -p /etc/sysctl.d/ip_forward.confnet.ipv4.ip_forward = 18. What are the operating levels of Linux systems? What level is the single-user status? 7 levels (init is the old way, CentOS7 recommends systemctl switch management) 0: shutdown 1: single user mode 2: multi-user mode, no NFS network support 3: command line mode, normal mode 4: reserved 5: graphical mode, normal mode 6: restart 9, description/etc/rc.local and/var/log/message two pieces of content is what to do?/ /etc/rc.local: Description/etc/rc.local and/var/log/message What does the content do?/ var/log/message: Store CentOS x system log information 10. Write the Linux system shutdown command after 10 minutes and restart command after 10 minutes. shutdown +10 -h or shutdown -h 10shutdown +10 -r or shutdown -r 1011, linux system to see whether the carrier is a physical machine (physical machine) or virtual machine? dmidecode |grep ProductPPT1, How to crack root password #CentOS6 Single user mode (Turn on press e, kernel line and then press e, enter 1 after entering, enter) directly passwd to #CentOS7 single user mode (boot press e, linux16 line plus rw,init=/sysimage/bin/sh, enter, root change password, root create.autorelabel,exit exit restart) 2, destroy the local grub stage1, and then repair the CD rescue mode in rescue mode Root: CentOS6 with grub-install /dev/sda repair CentOS 7 with grub-install /dev/sda repair 3, delete vmlinuz and initramfs after the file boot method, two ways to recover #Method 1: CD boot, cut the root after hanging CD, copy two files from CD to/boot directory #Method 2: CD boot, root cut, mount CD, rpm install kernel-version.rpm from CD, add--force option 4. Add a new hard disk on which to build a system that can run kernel and bash separately
Reference: blog.51cto.com/14012942/2434184
1. The new hard disk is divided into two areas2. Both are formatted as ext43. Two directories are hung separately, one as boot partition and the other as root partition4. Use grub-install to generate grub files from stage1.0 to stage2.0 into boot directory. Note that the option--root-directory=... Option, CentOS7 Yes--boot-directory=... 5. cp vmlinuz and initramfs of the current operating system to the boot partition of this disk 6. Handwriting grub.conf7. Creating relevant directories under another partition, using copycmd script to copy the desired commands 5. Customizing linux and busybox on the USB disk to enable the system to boot and have networking functions 6. Deleting all files in/etc/fstab and/boot directory, and restoring them
Reference: blog.51cto.com/11886307/2377515
If the system is mounted on a logical volume, cgchange -ay activates the logical volume in rescue mode, and then lvs looks at the location of the logical volume to mount it.
#Not a big problem The first CD rescue, manually mount the hard disk handwritten fstab The second CD rescue, rpm reload the kernel, grub-install or grub2-install to generate grub files, and finally if it is CentOS7 directly grub2-mkconfig to generate configuration files, CentOS6 handwritten grub.conf7, compile and install the kernel, start the ntfs software system function
Reference: blog.51cto.com/14012942/2434398
1. To compile and install httpd services, implement service unit components
Waiting for replenishment
2. Crack centos7 Command Any key to pause startup at startup Press e key to enter edit mode Move cursor to the line at the beginning of Linux16, add kernel parameter rd.break Press ctrl-x to start mount -o mount,rw /sysroot chroot /sysroot passwd root touch /.autorelabel exit reboot Any key to pause startup at startup Press e key to enter edit mode Move cursor to the line at the beginning of Linux16, Change to rw init=/sysroot/bin/sh press ctrl-x to boot chroot /sysroot passwd root touch /.autorelabel exit reboot3. Modify default boot kernel to new compiled kernel #View [root@localhost ~]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg0 : CentOS Linux (5.2.11-1.0-laowang_linux_x86_64) 7 (Core)1 : CentOS Linux (4.4.190-1.el7.elrepo.x86_64) 7 (Core)2 : CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)3 : CentOS Linux (0-rescue-dd6fe5c491024a9486fa9acf832f21a6) 7 (Core)#Settings 5.2 Kernel Limited Boot [root@localhost ~]# grep -i default /etc/default/grubGRUB_DEFAULT=0#Regenerate grub profile [root@ localhost ~] localhost ~]#grub2-mkconfig -o/boot/grub2/grub.cfg 4. Temporarily disable SELinux setenforce05. Enter emergency mode at startup. Press the arrow keys on the boot interface, select the first line, press "e (edit)" to edit it. Move the cursor to the line at the beginning of Linux16, move the cursor to ro (read-only), and change ro to rw. Press Ctrl+X again and the system will enter emergency mode. 6. Uninstall the compiled and installed new kernel
Reference: blog.51cto.com/14012942/2434398
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.