技术头条 - 一个快速在微博传播文章的方式     搜索本站
您现在的位置首页 --> Linux --> 如何在关闭某个内核模块

如何在关闭某个内核模块

浏览:2221次  出处信息

有些时候,我们并不需要一些特殊的模块,或者个别模块对我们的硬件支持不是那么好,这就需要在内核将它们关闭,编辑下述文件即可:

以下是代码片段:

[root@imysql.cn ]# cat /etc/hotplug/blacklist
#
# Listing a module here prevents the hotplug scripts from loading it.
# Usually that’d be so that some other driver will bind it instead,
# no matter which driver happens to get probed first.  Sometimes user
# mode tools can also control driver binding.
#
# Syntax:  driver name alone (without any spaces) on a line. Other
# lines are ignored.
#
#diasble usb_storage
usb_storage
#disable edac
i5000_edac
edac_mc

只需要往 /etc/hotplug/blacklist中添加一行,然后重启系统即可生效。
上面的方法适用于AS4的系统,但如果是AS5的系统,方法就不一样了,编辑/etc/modprobe.conf,内容类似:

以下是代码片段:

[root@imysql.cn ]# cat /etc/modprobe.conf
alias eth0 bnx2
#disable lists
alias power_meter off
alias hwmon off

同样地,重启系统即可。
如果想立刻生效,也可以执行rmmod命令,但个别内核模块删除后,报错信息仍然继续产生,想要彻底清净的话,就参照上述方法吧。

建议继续学习:

  1. 在Apache2.2.XX下安装Mod-myvhost模块    (阅读:11474)
  2. Nginx模块开发入门    (阅读:9587)
  3. nginx模块开发    (阅读:4415)
  4. CommonJS 的模块系统,AMD 和 Wrappings, 以及 RequireJS    (阅读:4057)
  5. 搭好了apache模块的开发环境    (阅读:3269)
  6. PHP 模块编写需要注意的一个问题---- php模块及函数名都定义成小写吧    (阅读:3250)
  7. 使用 Perl 来开发 Nginx 的模块    (阅读:3190)
  8. FarmVille(美版开心农场)谈架构:所有模块都是一个可降级的服务    (阅读:3146)
  9. php无法加载pcre.so的解决办法    (阅读:2884)
  10. mysql 的模块不能安装的解决方法    (阅读:2514)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
© 2009 - 2024 by blogread.cn 微博:@IT技术博客大学习

京ICP备15002552号-1