The kernel module is automatically loaded when centos is started.

Source: Internet
Author: User

Http://bluedata.org/2008/06/14/centos_rhel-auto-load-modules/

The/etc/rc. sysinit file of centos4 (RHEL4) contains the following section:

# Loadmodules (forbackwardcompatibilitywithvars) If [-F/etc/rc. Modules]; then/etc/rc. modulesfi

Therefore, you can create the/etc/rc. Modules file to load the module. For example: VI/etc/rc. Modules

#! /Bin/sh # Thisscriptwillbeloadotheruser-definedmodules.modprobesoftdog

Chmod + x/etc/rc. Modules

However, before the above section of the/etc/rc. sysinit file of centos5 (rhel5) is as follows:

# Load other user-defined modulesforfilein/etc/sysconfig/modules/*. modules; do [-x $ file] & $ file done

You can create an executable file ending with XXXX. modules by referring to the udev-stw.modules under the/etc/sysconfig/modules directory to load the module.

Therefore, create a file named XXX. modules in the/etc/sysconfig/modules directory and assign the permission to 755.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.