站内搜索

workerdance.com — Trusted craft, unfailing commitment
返回文章列表
系统运维

Redhat linux 无法上网

本文写于 2014 年,文中涉及的软件版本可能已有变化,核心排查思路仍可参考。

虚拟机中安装了Redhat linux 5, 有图形化界面, 使用firefox无法访问网络

  1. 确保VM相关的服务已启动(services.msc)

  2. VM -> Settings… -> Network Adapter:

勾选Connected和Connect at power on

Network connection: NAT: Used to share  the host’s IP address

  1. 用root用户执行netconfig命令

[root@localhost ~]# netconfig

在弹出的以下界面中, 按回车键(Enter)

P.S.: 如果netconfig命令无法使用, 多数是这个命令的软件包没有安装, 参考http://www.jbxue.com/LINUXjishu/3801.html进行安装

  1. 在弹出的对话框中, 按空格键选中“Use dynamic IP configuration (BOOTP/DHCP)” -> 按Tab键将光标定位到OK -> 回车确定即可

  1. 执行命令重启网络即可

[root@localhost ~]# service network restart

参考文章:

workerdance
workerdance

记录开发与运维中的实践和踩坑。