免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2265 | 回复: 0
打印 上一主题 下一主题

修改主机名和IP要修改的文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-04 23:16 |只看该作者 |倒序浏览
olaris5.8 和5.9环境下,可用 uname -a 查看主机名,然后修改下列六个文件:
1、 /etc/hostname.*
2、 /etc/nodename
3、 /etc/hosts
4、 /etc/net/ticlts/hosts  
5、 /etc/net/ticots/hosts  
6、 /etc/net/ticotsord/hosts
修改完毕后,重启机器即可。
修改IP,要新建文件/etc/hostname.内容为网卡名,可任取,再修改 /etc/hosts 文件内容为IP地址加网卡名,如有多个端口,网卡名不可相同。
Solaris5.10环境下,然后修改主机名和IP的方法:
Changing the IP on Solaris 10 requires editing two files:
1. /etc/hosts
2. /etc/inet/ipnodes
3. /etc/hostname.xxx
Changing the hostname now only requires editing these files:
1. /etc/hosts
2. /etc/nodename
3. /etc/hostname.
is the driver name followed by the instance number of the interface. ie. hme0, bge0, ce0, qfe0
You can find all your network interfaces by drivername and instance# by running the following command: prtconf -D | grep network
Note: the following hosts files are no longer used in solaris 10.
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
Rebooting the computer should bring up the new ip and hostname.修改完毕后,重启机器即可。
================================
如某机IDprom损坏,将会影响到网卡MAC地址的使用,直接影响到IP的设置,可进行:
# cd /etc/rc2.d
# vi S69etherup
ifconfig hme0 ether 0:3:ba:17:4b:e1 up
ifconfig hme0 inet 192.168.10.207 up
# chmod 777 S69etherup
# reboot
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/102731/showart_2018011.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP