假设要将IP设置为192.168.16.2 网关为192.168.16.250
设置IP:修改/etc/hosts,/etc/inet/hosts和 /etc/inet/ipnodes这三个文件,内容为192.168.16.2 主机名 loghost
修改/etc/hosts即可。其他文件自动修改。
hostname.ce0 hostname.ce1根据网卡不同修改如上文件的ip。
设置子网掩码:更改了/etc/netmasks 192.168.16.0 255.255.255.0
设置缺省网关:添加或者更新文件/etc/defaultrouter,内容为:192.168.16.250
设置主机名:添加了文件/etc/nodename 内容为主机名
重启网卡,不需要重启系统即可生效:# svcadm disable physical # svcadm enable physical
检测IP是否设置成功Ifconfig –a
启动ssh
注意可能需要root权限,然后在运行命令,重启后需要重新启动ssh