您的位置:首页 > 其它

修改Solaris 10主机名步骤

2012-04-01 09:26 417 查看
http://dancfan.blogbus.com/logs/54602671.html

1、

bash-3.00# hostname

tianyu

bash-3.00# pwd

/etc

bash-3.00# vi hosts

"hosts" [Read only] 5 lines, 76 characters

#

# Internet host table

#

127.0.0.1 localhost

192.168.1.119 tianyujiajia loghost

2、

bash-3.00# vi hostname.e1000g0

"hostname.e1000g0" 1 line, 7 characters

tianyujiajia

3、

bash-3.00# vi nodename

"nodename" 1 line, 7 characters

tianyujiajia

~

4、重启 init 6

5、检查已经修改成功

-bash-3.00$ hostname

tianyujiajia

-bash-3.00$

Solaris 10修改网卡IP地址

修改前IP

bash-3.00# ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 192.168.1.119 netmask ffffff00 broadcast 192.168.1.255

ether 0:c:29:11:af:6c

1、

bash-3.00# vi hosts

"hosts" [Read only] 5 lines, 82 characters

#

# Internet host table

#

127.0.0.1 localhost

192.168.1.118 tianyujiajia loghost

2、

bash-3.00# pwd

/etc/inet

bash-3.00# vi ipnodes

"ipnodes" [Read only] 6 lines, 91 characters

#

# Internet host table

#

::1 localhost

127.0.0.1 localhost

192.168.1.118 tianyu loghost

3、

bash-3.00# pwd

/etc

bash-3.00# vi netmasks ---由于此次修改的IP和以前是同网段的,所以这里的文件可以不需要修改

"netmasks" [Read only] 15 lines, 382 characters

#

# The netmasks file associates Internet Protocol (IP) address

# masks with IP network numbers.

#

# network-number netmask

#

# The term network-number refers to a number obtained from the Internet Network

# Information Center.

#

# Both the network-number and the netmasks are specified in

# "decimal dot" notation, e.g:

#

# 128.32.0.0 255.255.255.0

#

192.168.1.0 255.255.255.0

4、

bash-3.00# pwd

/etc

bash-3.00# vi defaultrouter ---由于此次修改的IP和以前是同网段的,所以这里的文件可以不需要修改

"defaultrouter" 1 line, 14 characters

192.168.1.254

5、重启init 6

修改后IP

bash-3.00# ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 192.168.1.118 netmask ffffff00 broadcast 192.168.1.255

ether 0:c:29:11:af:6c
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: