Solaris 基础网络配置命令记录如下:
1. 配置ssh允许root登录
vi /etc/sshd/sshd_config
PermitRootLogin yes
重启ssh服务
svcadm restart ssh
2. 网络配置
1) 配置IP地址及主机名
# vi /etc/hosts
#
::1 localhost
127.0.0.1 localhost
192.168.50.200 vmtest loghost
2)配置主机名
# cat /etc/nodename
vmtest
3) 配置子网掩码
# cat /etc/netmasks
192.168.50.0 255.255.255.0
4) 配置网关
# cat /etc/defaultrouter
192.168.50.2
5) 配置DNS解
# mv nsswitch.conf nsswitch.bak
# mv nsswitch.dns nsswitch.conf
配置DNS
# cat /etc/resolv.conf
nameserver 202.100.192.68
3. solaris PING命令
# ping -s www.baidu.com
PING www.baidu.com: 56 data bytes
64 bytes from 115.239.210.27: icmp_seq=0. time=122. ms
64 bytes from 115.239.210.27: icmp_seq=1. time=87.9 ms
64 bytes from 115.239.210.27: icmp_seq=2. time=97.2 ms
ctrl+c 取消
本文出自 “koumm的linux技术博客” 博客,请务必保留此出处http://koumm.blog.51cto.com/703525/1263898