centos7 网速很慢解决办法----关闭ipv6

简介: IPv6访问网站 centos7.1下,默认就启用了IPv6,所以可以通过网卡查看里面的。执行ifconfig命令  禁用IPv6 编辑文件 vi /etc/default/grub 修改红色部分修改后如下 (红色部分) GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" G
IPv6访问网站  
centos7.1下,默认就启用了IPv6,所以可以通过网卡查看里面的。执行ifconfig命令 
 



禁用IPv6  
编辑文件 
vi /etc/default/grub 
修改红色部分
修改后如下 (红色部分)

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=1 rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true" 


执行命令(本人测试不行,需要重新启动机器)
grub2-mkconfig -o /boot/grub2/grub.cfg 

验证 
可以再次运行ifconfig 

或者 
Check to see if you’re installation is currently set up for IPv6: 

# cat /proc/sys/net/ipv6/conf/all/disable_ipv6 
If the output is 0, IPv6 is enabled. 
If the output is 1, IPv6 is already disabled. 

或者是文件不存在,则表示IPv6禁用。 

禁用ipv6后


目录
相关文章
|
Linux 数据安全/隐私保护
centOS 7无法连接网络详细解决办法
centOS 7无法连接网络详细解决办法
2736 0
centOS 7无法连接网络详细解决办法
|
Linux 虚拟化 Windows
centos7.x 查询不到ip地址显示【解决办法】
centos7.x 查询不到ip地址显示【解决办法】
1577 0
centos7.x 查询不到ip地址显示【解决办法】
|
Linux
安装CentOS7出现dracut:/#......time解决办法
安装CentOS7出现dracut:/#......time解决办法
1365 0
|
Oracle 关系型数据库 MySQL
centos6安装mariadb失败及解决办法
centos6安装mariadb失败及解决办法
716 4
|
安全 网络安全
gbase8a centos8(kylinv10)加载报登录 ftp失败报错530 Login incorrect 排查过程及解决办法
centos8(kylinv10)加载报登录 ftp失败报错530 Login incorrect 排查过程及解决办法
|
网络协议 Linux
CentOS7 yum安装报错“Could not resolve host: mirrorlist.centos.org;"之解决办法(换源)
CentOS7 yum安装报错“Could not resolve host: mirrorlist.centos.org; Name or service not known“之解决办法(换源)
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
centos6.0下Error:Connectionactivationfailed:DevicenotmanagedbyNetworkManager解决办法
544 0
|
缓存
CentOS8的源在2021年12月31日停止服务: Failed to download metadata for repo ‘appstream‘: 解决办法
因为centOS8于2021年12月31日停止了源的服务,所以不行了。
1959 0
CentOS8的源在2021年12月31日停止服务: Failed to download metadata for repo ‘appstream‘: 解决办法
|
Linux Shell 数据安全/隐私保护
百度搜索:蓝易云【CentOS7系统服务器密码忘记的解决办法?】
总之,以上步骤是在忘记CentOS7系统服务器密码时的一种解决办法,需要谨慎操作。同时,也建议在平时的使用中,定期备份重要数据,以避免意外情况的发生。
762 0
|
关系型数据库 MySQL Linux
CentOS 常见异常及解决办法
在CentOS上部署Django项目时,经常需要安装MySQL数据库引擎,如mysqlclient,在执行pip3 install mysqlclient命令时,可能会报错如下:
CentOS 常见异常及解决办法