技術(shù)員聯(lián)盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機(jī)純凈版,64位旗艦版,綠色軟件,免費(fèi)軟件下載基地!

當(dāng)前位置:主頁 > 教程 > 服務(wù)器類 >

linux 關(guān)閉停用ipv6方法

來源:技術(shù)員聯(lián)盟┆發(fā)布時(shí)間:2018-09-25 00:00┆點(diǎn)擊:

  .修改/etc/sysconfig/network 相應(yīng)網(wǎng)卡,追加:

 代碼如下      

NETWORKING_IPV6=no

 

  2.修改/etc/hosts,把ipv6的那句本地主機(jī)名解析的也注釋掉:

 代碼如下      

#::1   localhost localhost6 localhost6.localdomain6

 

  3.創(chuàng)建文件/etc/modprobe.d/ipv6off.conf(名字隨便起)

  注:RHEL6.0之后沒有了/etc/modprobe.conf這個(gè)文件

 代碼如下      

alias net-pf-10 off
options ipv6 disable=1

 

  4. 重啟系統(tǒng),然后確認(rèn):

 代碼如下      
[root@test ~]# lsmod | grep -i ipv6
[root@test ~]# ifconfig | grep -i inet6
 

  如果上述2個(gè)命令執(zhí)行的結(jié)果沒有任何顯示,那么說明ipv6已經(jīng)被完全禁止了。

  其它:

  在不加載ipv6模塊的方法里,有人會(huì)有類似這樣的設(shè)置方法:

 代碼如下      
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
 

  雖然這樣在系統(tǒng)重啟后,ipv6的確沒被加載,但是因?yàn)榈诙洌谟械陌姹镜南到y(tǒng)里,當(dāng)我們重啟網(wǎng)絡(luò)的時(shí)候,會(huì)出現(xiàn)錯(cuò)誤:FATAL: Module off not found.

  RedHat 5.x

  To disable IPv6 in a virtual machine running RedHat 5.x:

  1.Log in as root or superuser.

  2.If the /etc/sysconfig/network file contains the line NETWORKING_IPV6=yes, change the line to:

  NETWORKING_IPV6=no

  3.In the file /etc/modprobe.conf, add this line:

  options ipv6 disable=1

  4.Save the file and reboot the system.

  After you disable IPv6, you should be able to install and configure VMware Tools successfully.