Sun Solaris 修改IP地址或者主机名
2008-12-08 17:51
225 查看
设置ip地址、子网掩码、广播
ifconfig pcn0 192.168.16.197 netmask 255.255.255.0 broadcast 192.168.16.255
设置默认网关
route add default 192.168.16.250
重启机器:reboot
查看主机信息:uname -a
查看主机名:hostname
转载自:http://rainbird.blog.51cto.com/211214/64732
solaris修改IP地址.刚装完solaris10的时候想到这个问题,还很郁闷不知道从哪开始.netconfig命令没有.看IP地址的配置文件不知道在哪,不像linux,连/etc/sysconfig文件夹都没有.不熟悉归不熟悉,研究过后现在已经可以凭着脑子把手工修改IP地址的过程默写下来了.所以,写原创没有侵权的意思,因为是我自己组织的思路.
废话少说,来看solairs10的IP地址及主机名的配置文件.共有四个:
/etc/hostname.pcn0
/etc/hosts
/etc/netmasks
/etc/defaultrouter
有人说/etc/nodname也要配置,这个不知道了,看实际情况吧,反正我只动上面两个就可以了.换IP段的话,要用到第三个./etc/hostname.pcn0这个里面记录的本机的机器名;/etc/hosts是一个指向/etc/inet/hosts的一个软链接,记录的是IP地址和机器名的对应关系;/etc/netmasks是指向/etc/inet/netmasks的一个软链接,里面记录的是网络地址和子网掩码的对应关系.;/etc/defaultrouter看名字就知道了是默认网关.
哈哈知道了这个文件的位置和作用,搞定机器名和IP看你死不死.
现在我的机器名要改成rainbird.我的IP地址要改成192.168.2.5还用C掩码255.255.255.0网关也要改喽.还成192.168.2.254.好了,理清思路开工.vi /etc/hostname.pcn0删除原来的东西,改为rainbird保存退出.vi /etc/hosts 删除除了127.0.0.1那一行以外的其它行(在不用的情况下.)添加一行192.168.2.5 rainbird loghost;为什么要加一个loghost我也不知道,只是知道这样没问题,嘿嘿.题外话了,有知道的兄弟可以指点下;vi /etc/netmasks 删除原来的修改为:192.168.2.5 255.255.255.0;vi /etc/netmasks修改为192.168.2.0 255.255.255.0;vi /etc/defaultrouter改为:192.168.2.254保存退出.OK,验证一下,reboot!
哈哈,这样混着来不知道,您读着理解起来会不会有问题.理一下思路,
和主机名相关的配置文件:
/etc/hostname.pcn0
/etc/hosts
确保这两个文件一一对应的关系没问题的话,修改主机名没问题.
和IP地址相关的配置文件:
/etc/hosts
/etc/netmasks
/etc/defaultrouter
确保了这三个文件里一一对应关系没有问题的话,就正确修改了,IP地址.
OK,今天就到这里,请关注下期.solaris系统服务管理.
Sun Solaris 修改IP地址或者主机名
)_od:[,qV01)如何修改IP地址和主机名
IP地址涉及的文件有: 杭州博客网*w Cu+U^J/o^2Yg
/etc/hosts (change the IP address)
ET!s$~o+Y-Qf#`0/etc/netmasks (if subnetting)
9M p'w7Wp0/etc/defaultrouter (to specify the new gateway for this subnet)
改变主机名涉及的文件有: 杭州博客网6wa.Z oV w
/etc/hosts (change to the new hostname)
g$c5C1R {!~,m6[/h%g0/etc/nodename (change to the new hostname)
7_.dy~4| ~ G/t)j0/etc/hostname.<interface> (where <interface> is the name of the primary 杭州博客网/n y1/kP;s
interface for this system, i.e hostname.hme0 or hostname.le0.
JtP.T;Q2FP"}0Change to the new hostname.) 杭州博客网V$tqW9S kK x,C
/etc/net/ticlts/hosts (change both columns to the new hostname)
7|E+Z%?A+[{-}s.O I0/etc/net/ticots/hosts (change both coluums to the new hostname)
5gSL)bA D&Tw0/etc/net/ticotsord/hosts (change both columns to the new hostname)
TH BZ0ymH@}0改完上述文件之后推荐重起一下机器
ifconfig pcn0 192.168.16.197 netmask 255.255.255.0 broadcast 192.168.16.255
设置默认网关
route add default 192.168.16.250
重启机器:reboot
查看主机信息:uname -a
查看主机名:hostname
转载自:http://rainbird.blog.51cto.com/211214/64732
solaris修改IP地址.刚装完solaris10的时候想到这个问题,还很郁闷不知道从哪开始.netconfig命令没有.看IP地址的配置文件不知道在哪,不像linux,连/etc/sysconfig文件夹都没有.不熟悉归不熟悉,研究过后现在已经可以凭着脑子把手工修改IP地址的过程默写下来了.所以,写原创没有侵权的意思,因为是我自己组织的思路.
废话少说,来看solairs10的IP地址及主机名的配置文件.共有四个:
/etc/hostname.pcn0
/etc/hosts
/etc/netmasks
/etc/defaultrouter
有人说/etc/nodname也要配置,这个不知道了,看实际情况吧,反正我只动上面两个就可以了.换IP段的话,要用到第三个./etc/hostname.pcn0这个里面记录的本机的机器名;/etc/hosts是一个指向/etc/inet/hosts的一个软链接,记录的是IP地址和机器名的对应关系;/etc/netmasks是指向/etc/inet/netmasks的一个软链接,里面记录的是网络地址和子网掩码的对应关系.;/etc/defaultrouter看名字就知道了是默认网关.
哈哈知道了这个文件的位置和作用,搞定机器名和IP看你死不死.
现在我的机器名要改成rainbird.我的IP地址要改成192.168.2.5还用C掩码255.255.255.0网关也要改喽.还成192.168.2.254.好了,理清思路开工.vi /etc/hostname.pcn0删除原来的东西,改为rainbird保存退出.vi /etc/hosts 删除除了127.0.0.1那一行以外的其它行(在不用的情况下.)添加一行192.168.2.5 rainbird loghost;为什么要加一个loghost我也不知道,只是知道这样没问题,嘿嘿.题外话了,有知道的兄弟可以指点下;vi /etc/netmasks 删除原来的修改为:192.168.2.5 255.255.255.0;vi /etc/netmasks修改为192.168.2.0 255.255.255.0;vi /etc/defaultrouter改为:192.168.2.254保存退出.OK,验证一下,reboot!
哈哈,这样混着来不知道,您读着理解起来会不会有问题.理一下思路,
和主机名相关的配置文件:
/etc/hostname.pcn0
/etc/hosts
确保这两个文件一一对应的关系没问题的话,修改主机名没问题.
和IP地址相关的配置文件:
/etc/hosts
/etc/netmasks
/etc/defaultrouter
确保了这三个文件里一一对应关系没有问题的话,就正确修改了,IP地址.
OK,今天就到这里,请关注下期.solaris系统服务管理.
Sun Solaris 修改IP地址或者主机名
)_od:[,qV01)如何修改IP地址和主机名
IP地址涉及的文件有: 杭州博客网*w Cu+U^J/o^2Yg
/etc/hosts (change the IP address)
ET!s$~o+Y-Qf#`0/etc/netmasks (if subnetting)
9M p'w7Wp0/etc/defaultrouter (to specify the new gateway for this subnet)
改变主机名涉及的文件有: 杭州博客网6wa.Z oV w
/etc/hosts (change to the new hostname)
g$c5C1R {!~,m6[/h%g0/etc/nodename (change to the new hostname)
7_.dy~4| ~ G/t)j0/etc/hostname.<interface> (where <interface> is the name of the primary 杭州博客网/n y1/kP;s
interface for this system, i.e hostname.hme0 or hostname.le0.
JtP.T;Q2FP"}0Change to the new hostname.) 杭州博客网V$tqW9S kK x,C
/etc/net/ticlts/hosts (change both columns to the new hostname)
7|E+Z%?A+[{-}s.O I0/etc/net/ticots/hosts (change both coluums to the new hostname)
5gSL)bA D&Tw0/etc/net/ticotsord/hosts (change both columns to the new hostname)
TH BZ0ymH@}0改完上述文件之后推荐重起一下机器
相关文章推荐
- oracle 修改过ip地址或者主机名后服务无法启动的解决办法
- 通过ping 主机名,或者主机名对应的IP地址
- Android修改主机名和IP地址问题
- VMWarevSphere Client 克隆虚拟机、变更IP地址、变更主机名、修改MAC地址
- Oracle LISTENER 主机名修改为IP地址后LISTENER无法监听到实例 oracle监听错误与hosts文件配置
- Afaria服务器修改了域名DNS或者IP地址,需要做哪些配置?
- Shell脚本自动修改Linux网卡地址、IP地址配置、主机名修改
- Linux下修改主机IP地址的三种方法
- 虚拟机修改ip地址和主机名
- Linux 0-1 修改主机名及IP地址
- solaris修改主机名和IP地址
- Shell脚本自动修改Linux网卡地址、IP地址配置、主机名修改
- 修改Solaris系统的主机名和IP地址
- Oracle 主机修改IP地址导致的问题的处理
- Arp工作原理及欺骗原理 局域网的网络流通不是根据IP地址进行,而是根据MAC地址进行传输。 当主机A要和主机B通信时,这时候假定A,B刚开机,或者ARP缓存表是空的。既然谈到通信,那么一般来说,
- Oracle 10g 修改主机名或者IP解决EM无法重启
- ubuntu更改主机名,修改IP地址
- Linux下修改主机IP地址、DNS、主机名的三种方法
- VMWarevSphere Client 克隆虚拟机、变更IP地址、变更主机名、修改MAC地址
- linux修改或者配置IP地址、网络YUM源(针对Centos)