CentOS 7 开机加载内核模块

来源:互联网 发布:2016中国象棋软件排名 编辑:程序博客网 时间:2024/06/06 10:41

以ceph模块为例:

  1. #cd /etc/sysconfig/modules/
  2. #vim ceph.modules
  3. 在文件中添加如下内容 
    #!/bin/sh 
    /sbin/modinfo -F filename ceph > /dev/null 2>&1 
    if [ $? -eq 0 ]; then 
        /sbin/modprobe ceph 
    fi
  4. #chmod 755 ceph.modules   //这一步至关重要
  5. #reboot

现在重启,在命令行运行

#lsmod | grep ceph

就可以看到ceph模块被加载到系统中 :)

这只是加载模块的一种方式

原创粉丝点击