Chinaunix

标题: 修改主机名与配置多个IP [打印本页]

作者: zgbchi    时间: 2008-05-19 16:07
标题: 修改主机名与配置多个IP
6、修改主机名:
  主机名为:sol.test.com ,更改为sol.foo.com,则按顺序修改如下配置文件:
■ /etc/nodename
■ /etc/hostname.*interface
■ /etc/inet/hosts
■ /etc/inet/ipnodes   #仅适用于Solaris 10 的某些发行版。
     #  reboot
7、修改IP
   IP地址为:192.168.30.33  ,更改为192.168.20.33,则按顺序修改如下配置文件:
■ /etc/inet/hosts
■ /etc/inet/ipnodes   #仅适用于Solaris 10 的某些发行版。
# reboot
8、一个接口配置多个IP,假设网卡设备名为:pcn0
    solaris的IP地址的配置文件:/etc/hostname.pcn0,
    方法:
# cp /etc/hostname.pcn0 /etc/hostname.pcn0:1
# echo "192.168.10.200"  >/etc/hostnamepcn0:1
  # reboot
     说明:如果对某个物理网卡配置多个IP,那必须建立多个:/etc/hostname.pcn0:x文件。
  一个文件里只能拥一个IP地址。
     /etc/hostname.pcn0文件格式:
IPADDR/MASK,
192.168.30.22/24

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8988/showart_694375.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2