`
phinecos
  • 浏览: 343545 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Ubuntu Server 网络配置

 
阅读更多

实验室内部搭建了个网站,放在虚拟机中Ubuntu Server下,需要进行配置以便局域网内都可以访问。

0)虚拟机改成"桥接"模式.

1)修改IP

打开 /etc/network/interfaces

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudovim/etc/network/interfaces

加入以下语句:

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->autoeth0
ifaceeth0inetstatic
addressxxx
.xxx.xxx.xxx#IP地址
netmaskxxx
.xxx.xxx.xxx#子网掩码
gatewayxxx
.xxx.xxx.xxx#网关

(2)修改DNS

修改网卡 DNS 地址的方法

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudovim/etc/resolv.conf

改为如下内容:

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->searchlocaldomain
nameserver
172.16.3.4希望修改成的DNS
nameserver
172.16.3.3希望修改成的DNS

3)最后一步,也是最重要的一步。

rc.local里加入这个重启网络配置的命令:

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudo/etc/init.d/networkingrestart

分享到:
评论

相关推荐

    ubuntu server常用配置方法

    本文档是ubuntu server常用的网络配置方法和安装gcc的方法,以及更新源。

    ubuntu sever配置网络

    主要是介绍了ubuntu server的ip与网络设制上网

    ubuntu_server配置

    本手册适用对象: 像我一样的用Linux不久的又...“Ubuntu Server的安装”、“配置服务器网络”,“搭建第一个Blog”、“搭建FTP”和“建立多个虚拟 主机”这五个方面入手,循序渐进的来带领大家快速入门Ubuntu Server。

    Ubuntu 20.04无法连接网络(网络图标丢失)的解决方案_罗伯特祥的博客-CSDN博客_ubuntu20没有网络设置图标.mhtml

    Ubuntu 20.04无法连接网络(网络图标丢失)的解决方案_罗伯特祥的博客-CSDN博客_ubuntu20没有网络设置图标.mhtml

    ubuntu server最佳方案(文字版).zip

    第1篇 拥抱UbuntuServer 第1章 敲开Linux Server的大门 2 1.1 Linux到底是什么 2 1.2 为何选Linux,不选 1.2 Windows 3 1.2.1 Linux可以定制 4 1.2.2 Linux比Windows稳定 4 1.2.3 Linux比Windows响应快 4 ...

    ubuntu无线网络配置

    Linux 下wlan配置以及命令应用介绍 iwconfig 进行参数配置 iwlist 搜索无线网络

    韩立刚UbuntuServer11.10教学教程和PPT

    教程名称:韩立刚 Ubuntu Server 11.10教学教程和PPT课程目录:【】第1章 Ubuntu概述2【】第2章 Ubuntu的安装2【】第3章 基本命令和文件系统2【】第4章 软件管理2【】第5章 配置Ubuntu网络【】第6章 配置Apache...

    Ubuntu18.04下的KVM网络配置(附各种问题解答)

    Ubuntu18.04下的KVM网络配置(附各种问题解答),有实验过程,步骤,截图,问题解答

    vmware 上ubuntu server连接外网的实现方法

    注意这个ip,要在linux网络配置中ip网段要一样,然后在vmware 中打开虚拟网络编辑器界面,在“”编辑“”菜单下 因为我的虚拟机设置中网络适配器选的是NAT模式如下图,这个信息是在vmware左边栏中右键安装的虚拟机...

    Ubuntu.18.04.2 LTS.rar

    文章:《NAT网络配置》 地址:https://blog.csdn.net/Supreme_Sir/article/details/85201152 说明: ubuntu-18.04.2-live-server-amd64 虚拟机文件(VMware 12)。 已完成静态IP、国内软件源配置。 用户:root ...

    Ubuntu 18.04 Server 设置静态IP 的方法

    Netplan是Ubuntu 17.10中引入的一种新的命令行网络配置实用程序,用于在Ubuntu系统中轻松管理和配置网络设置。它允许您使用YAML抽象来配置网络接口。它可与NetworkManager和systemd-networkd网络守护程序(称为渲染...

    PXE网络安装centos+ubuntu.exe

    Centos搭建PXE,安装部署操作系统centos+ubuntu 个人笔记,

    wireless-ap-raspi:在Raspberry Pi的Ubuntu Server上设置无线访问点

    网络:版本:2以太网:eth0:dhcp4:true可选:true wifis:wlan0:dhcp4:true可选:true访问点:“ mallab-Precision-7820-Tower”:密码:“ YowLEMSw” sudo netplan-调试适用 networkctl 3 wlan0 wlan可路由...

    Ubuntu Hadoop 0.20.2 安装配置说明

    文档中使用 Ubuntu Server 12.04 x64 + JDK 1.7.0 u5 + Hadoop 0.20.2 及 5 台虚拟机做为演示测试环境。希望能对大家带来帮助。本文档适合初学者,指引初学者或初次接触 Hadoop 的人成功安装 Hadoop ,使用代码执行...

    Ubuntu Webserver Image:为Web服务器配置的预安装Ubuntu服务器。-开源

    mbITme.de希望创建一种简单的方法来开始使用服务器,网络和linux。 这是Virtualbox的完整的预安装和预配置映像。 您只需修改安装路径和密码即可上手。 根据以下图片进行安装:...

    Ubuntu Server 10.04修改Apache的默认目录的方法

    在Ubuntu Server 10.04中默认由apt方式安装的Apache,指定网页主目录位于:/var/www。而我需要将其更改为: /home/www。因为我的系统/var所分到的空间太少,而我又有提供通过web方式提供网络存储的需要。比较糟糕的...

    mysql-server_8.0.21-1ubuntu20.04_amd64.deb-bundle.tar

    mysql rpm安装资源包方式按集配置引言:讲道理,有点怂了,所以我就想到了通过写博客(课程笔记)的形式去学习它,虽然写博客会让我多花几倍的时间去学习它,但是当我完成一篇博客所获得的成就感和你们对于我的认同...

    Ubuntu服务器入门指南.pdf

    详细介绍Ubuntu server 安装、管理、网络配置、防火墙配置、FTP 服务器、HTTPD - Apache2 Web 服务器、邮件服务、Squid - 代理服务器、CVS 服务器、数据库等等。

Global site tag (gtag.js) - Google Analytics