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后
使用wget下载文件时可能十分缓慢,你也可使用mwget进行加速,其中m代表多线程的意思。
安装环境:CentOS 7
1.安装mwget
wget http://jaist.dl.sourceforge.net/project/kmphpfm/mwget/0.1/mwget_0.1.0.orig.tar.bz2
tar -xjvf mwget_0.1.0.orig.tar.bz2
cd mwget_0.1.0.orig
执行./configure
./configure
如果出现 error: C++ compiler cannot create executables 说明没有安装c++编译器 安装一个c++编译器就可以了
yum install gcc-c++
如果执行./configure 出现 configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
需要安装0.35.0以上的版本
yum install intltool
然后做最后的安装
make
make install
安装完毕后 可以使用mwget下载
mwget https://www.Python.org/ftp/python/3.8.0/Python-3.8.0b4.tgz
下面的截图为wget
评论