首页 技术 正文
技术 2022年11月18日
0 收藏 774 点赞 2,378 浏览 1221 个字

执行命令:

curl http://10.200.0.14:8000/portal.cgi -X POST -d 'username=lishuai&password=test@cetc38&language=0&submit=submit'

以便访问外网

执行命令:

ping www.baidu.com

报错:

name or service not know

首先,添加dns服务器:

vi /etc/resolv.conf

在文件中添加如下两行:

nameserver 8.8.8.8nameserver 8.8.4.4

仍然不行!

打算进行网络配置,首先查看当前网络设置信息:

ifconfig

返回信息:

ifconfig: command not found

打算安装ifconfig:

rpm install ifconfig

返回信息:

Cannot 

打算重新配置源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

返回信息:

wget: command not found

只能手动下载rpm包并安装,首先查看当前CentOS的版本:

rpm -q centos-release

返回信息:

centos-release--3.1611.el7.centos.x86_64

打开网址:http://mirrors.163.com/centos/7/os/x86_64/Packages/

下载文件:

net-tools-2.0-0.24.20131004git.el7.x86_64.rpm

wget-1.14-18.el7.x86_64.rpm

手动安装:

rpm -ivh .el7.x86_64.rpmrpm -ivh net-tools-2.0-0.24.20131004git.el7.x86_64.rpm

下载配置源的文件:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

把原有的源配置文件改为.repo.bak,备份放入文件夹bak

清除源缓存并重新建立:

yum clean allyum makecache

ping现在也能正常使用

引用:

https://www.jianshu.com/p/5c4b5a20b821

https://www.cnblogs.com/areyouready/p/8909665.html

https://www.cnblogs.com/mafeng/p/10689847.html

http://mirrors.163.com/centos/7/os/x86_64/Packages/

https://www.cnblogs.com/Chan94/p/10658756.html

https://www.linuxidc.com/Linux/2018-10/154766.htm

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,996
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,510
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,353
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,137
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,770
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,848