Securing the kernel
Stepi
The “asm”, “linux”, and “scsi” subdirectories are a soft link to the real include kernel source header directories needed for our Linux architecture, for example “/usr/src/linux/include/asm-i386″ for “asm”.
• Type the following commands on your terminal:
[root@deep src]# cd /usr/include/
[root@deep include]* rm -rf asm linux scsi [root@deep include]* In -s /usr/src/linux/include/asm-i386 asm [root@deep include]* In -s /usr/src/linux/include/linux linux [root@deep include]* In -s /usr/src/linux/include/scsi scsi
This is a very important part of the configuration: we remove the “asm”, “linux”, and “scsi” directories under 7usr/include” then build a new links that point to the same name directories under the new Linux kernel source version directory. The “include” directory contains important header files needed by your Linux kernel and programs to be able to compile on your system.
Step 2
Make sure you have no stale .o files and dependencies lying around.
• Type the following commands on your terminal:
[root@deep include]* cd /usr/src/linux/
[root@deep linux]# make mrproper
NOTE: These two steps above simply clean up anything that might have accidentally been left in the source tree by the development team.
You should now have the sources correctly installed. You can configure the Linux kernel in one of three ways. The first method is to use the make config command. It provides you with a text-based interface for answering all the configuration options. You are prompted for all the options you need to set up your kernel.
The second method is to use the make menuconfig command, which provides all the kernel options in an easy-to-use menu. The third is to use the make xconfig command, which provides a full graphical interface to all the kernel options.
Step 3
For configuration in this chapter, you will use the make config command because we have not installed the XFree86 window Interface on our Linux server.
• Type the following commands on your terminal to load the kernel configuration: [root@deep /]# cd /usr/src/linux/ (if you are not already in this directory). [root@deep linux]# make config rm -f include/asm ( cd include ; In -sf asm-i386 asm) /bin/sh scripts/Configure arch/i386/config.in #
# Using defaults found in arch/i386/defconfig #
Страниц: 1 2