方舟笔记

方舟笔记

Change Hostname in CentOS 6.5/7

Change Hostname in CentOS 6.5/7

CentOS 6.5

[1] Change hostname with a commnad (but if rebooting, it will be back).

[root@vpsmate ~]# hostname              # show current hostname
srv1.vpsmate.net
[root@vpsmate ~]# hostname srv2.vpsmate.net         # change hostname
[root@vpsmate ~]# hostname
srv2.vpsmate.net
[2] Change hostname permanently.

[root@vpsmate ~]# vi /etc/sysconfig/network     # change
HOSTNAME=srv2.vpsmate.net
[root@vpsmate ~]# exit
CentOS release 6.5
Kernel xxx
srv2.vpsmate.net login:                 # changed

CentOS 7

[1]Change hostname with a commnad (but if rebooting, it will be back).

[root@vpsmate ~]# hostname                  # show current hostname
srv1.vpsmate.net
[root@vpsmate ~]# hostname srv2.vpsmate.net         # change hostname
[root@vpsmate ~]# hostname
srv2.vpsmate.net
[2] Change hostname permanently.

view source
[root@vpsmate ~]# vi /etc/hostname          # change
srv1.vpsmate.net
[root@vpsmate ~]# exit
CentOS Linux 7
Kernel 3.10.0-123.4.2.el7.x86_64 on an x86_64
srv1 login:                         # just changed
 

DNS服务器

DNS(Domain Name System,域名系统),DNS协议运行在UDP协议之上,使用端口号53。
DNS服务器(国内)
1、阿里DNS
http://www.alidns.com/
223.5.5.5 
223.6.6.6
2、114DNS
http://www.114dns.com/
114.114.114.114 
114.114.115.115
3、OpenerDNS
https://code.google.com/p/openerdns/
42.120.21.30
4、ONEDNS
http://www.onedns.net/
112.124.47.27
DNS服务器(国际)
1、Google Public DNS
https://developers.google.com/speed/public-dns/
8.8.8.8
8.8.4.4
2、OpenDNS
http://www.opendns.com/
208.67.222.222
208.67.220.220

server

CentOS 多网卡配置,网卡重命名

CentOS 多网卡配置
1:添加一块或多块网卡     
2:cd /etc/udev/rules.d/
3:cat 70-persistent-net.rules  #查看网卡的名称 NAME="eth1",并记录MAC等信息。
4:cd /etc/sysconfig/network-scripts
5:cp ifcfg-eth0 ifcfg-eth1
6:vi ifcfg-eth1
7:修改DEVICE=eth0 ,修改HWADDR
8:nmcli con  查看网卡UUID,并修改原来的,或者注释掉UUID  (#UUID)
9:reboot


CentOS 网卡重命名
eth0 rename4

1:cd /etc/sysconfig/network-scripts
2:vi ifcfg-eth1
3:修改DEVICE=eth1
4:cd /etc/udev/rules.d/
5:70-persistent-net.rules  #存储网卡标识
6:vi 70-persistent-net.rules  #编辑
7:reboot

CentOS ETH (1)

CentOS ETH (2)

CentOS ETH (3)

CentOS ETH (4)

在CMD中查询Whois

在CMD中查询Whois
介绍:http://technet.microsoft.com/en-us/Sysinternals/bb897435.aspx
下载1:http://download.sysinternals.com/files/WhoIs.zip
下载2:http://download.sysinternals.com/files/SysinternalsSuite.zip

1:下载解压后,将解压出来的whois.exe放置到 C:/Windows/system32/ 目录下。
2:打开CMD命令行,输入:whois xxx.com 即可查询。
3:也可以放置到其他目录下,使用的时候在CMD命令行下进入该目录。
4:输入:whois xxx.com 即可查询。

whois