ubuntu 网络配置

修改ip:

vi /etc/network/interfaces

auto eth0

iface eth0 inet static

address 192.168.1.120

netmask 255.255.255.0

gateway 192.168.1.1

修改dns:

vi /etc/resolvconf/resolv.conf.d/base (长期)

vi /etc/resolv.conf (临时)

nameserver 114.114.114.114

摘:http://blog.sina.com.cn/s/blog_67be3b450101de44.html

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static

address xxx.xxx.xxx.xxx

netmask xxx.xxx.xxx.xxx

gateway xxx.xxx.xxx.xxx

auto eth0:0

iface eth0:0 inet static

address xxx.xxx.xxx.xxx

netmask xxx.xxx.xxx.xxx

#dns-nameservers 202.102.224.68 202.102.227.68

up route add -net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx eth0

up route add -net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx eth0

up route add -net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx eth0

点赞
收藏

评论区

加载中...

相关推荐

mysql忘记root用户密码找回步骤

修改或找回root密码步骤1.修改MySQL的登录设置:vi/etc/my.cnf在mysqld的段中加上一句:skipgranttables保存并且退出vi。2.重新启动mysqld/etc/init.d/mysqldrestart(servicemysqldrestar

mysql设置远程访问

(1)连接数据库mysqlurootp(2)输入密码(3)切换数据库usemysql;(4)修改root用户hostupdateusersethost'%'whereuser'root';(5)修改mysqld配置文件vi/etc/mysql/mysql.co

CentOS 6.x 网卡配置

1)编辑配置文件,添加修改以下内容\vi /etc/sysconfig/networkscripts/ifcfgeth0  BOOTPROTOstatic  启用静态IP地址ONBOOTyes 开启自动启用网络连接IPADDR192.168.21.129 设置IP地址NETMASK255.255

vsftpd FTP服务器

1.安装vsftp【yumyinstallvsftpd】  2.配置vsftpd配置文件vsftpd.conf在/etc/vsftpd中,配置vsftpd.conf。【vi/etc/vsftpd/vsftpd.conf】1)修改不允许匿名登录   为 2)修改日志文件路径设置 为 3)修改

CDN+集中存储环境搭建

一、cdn部署环境:CentOS6master:172.16.17.1slave\_telcom:172.16.17.2slave\_unicom:172.16.17.31.主服务器配置172.16.17.1修改主配置文件:vi/etc/named.confoptions{    

Ubuntu安装NGINX+PHP

禁止IP6协议vi/etc/modprobe.d/blacklist.conf底部追加blacklistipv6修改软件仓库源mv/etc/apt/sources.list/etc/apt/sources.list.bakvi/etc/apt/sources.listUbuntu14