solaris修改主机名和IP地址
2013-10-15 17:03
295 查看
修改IP地址
临时修改IP地址:ifconfig用来配置网卡的IP地址,改动后即生效,但并不保存,下次启动后失效。
#ifconfig -a--->得出网卡的名字,一般第一块100M网卡名为hme0
#ifconfig hme0 down--->先把网卡hme0的服务暂时停止
#ifconfig hme0192.168.1.100 netmask 255.255.255.0 up --->启动网卡
永久修改IP地址:
修改两个配置文件:
第一修改:/etc/hosts
$ cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
192.168.1.188 dsg loghost
第二修改:/etc/inet/ipnodes
$ cat /etc/inet/ipnodes
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
192.168.1.188 dsg loghost
第三,修改掩码/etc/netmasks
$ cat /etc/netmasks
#
# The netmasks fileassociates Internet Protocol (IP) address
# masks with IP networknumbers.
#
# network-number netmask
#
# The termnetwork-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both thenetwork-number and the netmasks are specified in
# "decimaldot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
192.168.1.0 255.255.255.0
第四:重启系统
reboot
修改主机名
临时修改hostnamehostname在7、8、9上,
永久
要修改6个文件,重启生效
/etc/hosts
/etc/hostname.hme0
/etc/nodename
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/net/tilts/hosts
/etc/nodename -----在此处修改主机名,输入要修改的主机名,重启生效,并且确保
/etc/hosts
/etc/hostname.xxx(xxx代表你的网卡的名称)
/etc/nodename
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/net/tilts/hosts
这几个文件中的主机名一致。
在10上,
永久
只需要修改3个文件,重启生效,后三个没有用了。
/etc/hosts
/etc/hostname.hme0
/etc/nodename
使主机名立即生效:hostname 主机名
相关文章推荐
- 修改Solaris系统的主机名和IP地址
- solaris 修改IP地址及主机名
- Solaris - 修改IP和主机名
- Unix Study--Solaris 10修改主机IP和主机名
- linux 修改IP地址,网管,主机名,DNS
- Linux下修改主机IP地址的三种方法
- Solaris修改IP和主机名
- RedHat 7 配置IP地址与修改主机名
- 修改APACHE中,关于主机IP地址修改的问题
- Linux 0-1 修改主机名及IP地址
- Red Hat/CentOS 如何修改IP地址和主机名
- 配置LINUX主机IP地址并修改hosts文件和远程桌面
- Linux之CentOS--修改主机名与IP地址,实现可直接ping主机名
- pc机取得并修改arm linux IP地址 网关 子网掩码 主机名等信息
- Android修改主机名和IP地址问题
- 配置IP地址、修改主机名、修改DNS解析讲解
- 如何在Solaris10下修改IP地址(Solaris更改IP地址的方法)
- 修改Solaris 10主机名步骤
- VMWarevSphere Client 克隆虚拟机、变更IP地址、变更主机名、修改MAC地址
- Solaris - 修改IP和主机名