Securing and Optimizing Linux:RedHat Edition | All about OS

Configuring and Building a secure, optimized Kernels

Категория: Securing and Optimizing

• To uninstall the linux kernel RPM, use the following command:
[root@deep src]# rpm -e -nodeps kernel-headers kernel
cannot remove /usr/src/linux-2.2.xx - directory not empty cannot remove /lib/modules/2.2.xx - directory not empty [root@deep src]# rm -rf/usr/src/linux-2.2.xx/ [root@deep src]# rm -rf /lib/modules/2.2.xx/
In the steps bellow, we remove manually the empty 7usr/src/linux-2.2.xx” and 7lib/modules/2.2.xx” directories after the uninstallation of the kernels RPM (the RPM uninstall program will not completely remove those directories).
Step 2
Decompress the Linux kernel archive
Now, we must decompress the tar archive of the kernel and remove the Linux tar archive from the system.
[root@deep src]# tar xzpf linux-versiontar.gz [root@deep src]# rm -f linux-versiontar.gz
Step 3
Increase the Tasks (optimization)
To increase the number of tasks allowed (the maximum number of processes per user), you may need to edit the 7usr/src/linux/include/linux/tasks.h” file and change the following parameters.
• Edit the tasks.h file (vi +14 /usr/src/linux/include/linux/tasks.h) and change the following parameters:
NR_TASKS from 512 to 3072 MIN_TASKS_LEFT_FOR_ROOT from 4 to 24
NOTE: The value in the NR_TASKS line denotes the maximum number of tasks (processes) handles that the Linux kernel will allocate per users. Increasing this number will allow you to handle more connections from clients on your server (example: an HTTP web server will be able to serve more client connections). Also, Linux is protected from allocation of all process slots for normal users. There is a special parameter line MIN_TASKS_LEFT_FOR_ROOT reserved
especially for the super-user root that you may set for the number of process reserved to root (24 is a good value).
Step 4

Страниц: 1 2 3 4 5

« Tuning IDE Hard Disk Performance
Securing the kernel »