In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Unix Study--Solaris 10 modifies host IP and host name
For the Solaris system, the host ip and hostname information are stored and managed through a series of configuration files (text), and the relevant configuration can be completed by modifying these configuration files through the editor.
1. Modify the host ip
1. Configure the hosts file
[root@solaris186:/] # cat / etc/hosts# Internet host table::1 localhost127.0.0.1 localhost192.168.8.11 solaris186 loghost [root@solaris186:/] # hostnamesolaris186 [root@solaris186:/] # vi / etc/hosts# Internet host table#::1 localhost127.0.0.1 localhost192.168.8.11 node1 loghost
2. View the network card information
[root@solaris186:/] # ifconfig-alo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843 mtu 1500 index 2 inet 192.168.8.11 netmask ffffff00 broadcast 192.168.255 ether 8:0:27:28:b1:8c
3. Modify hostname.e1000g0
[root@solaris186:/] # cat / etc/hostname.e1000g0 solaris186 [root@solaris186:/] # vi / etc/hostname.e1000g0 node1 [root@solaris186:/] # cat / etc/hostname.e1000g0 node1
4. Modify netmasks (subnet mask)
[root@solaris186:/] # cat / etc/netmasks## 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.0192.168.8.0255.255.255.0
5. Modify the gateway configuration
[root@solaris186:/] # vi / etc/defaultrouter192.168.8.1 [root@solaris186:/] # cat / etc/defaultrouter192.168.8.1 [root@solaris186:/] # netstat-nrRouting Table: IPv4 Destination Gateway Flags Ref Use Interface- -192.168.8.0 192.168.11 U 11 e1000g0 224.0.0.0 192.168.11 U 10 e1000g0 127.0.0.1 127.0.0.1 UH 1 50 lo0
Summary:
Configuration files related to host ip
/ etc/hosts
/ etc/hostname.xxxx (network card name)
/ etc/netmaks
/ etc/defaultrouter
/ etc/inet/ipnodes
Second, modify the host name
1. Configure the hosts file
[root@solaris186:/] # cat / etc/hosts# Internet host table::1 localhost 127.0.0.1 localhost 192.168.8.11 node1 loghost
2. Modify hostname.e1000g0
[root@solaris186:/] # cat / etc/hostname.e1000g0 solaris186 [root@solaris186:/] # vi / etc/hostname.e1000g0 node1 [root@solaris186:/] # cat / etc/hostname.e1000g0 node1
3. Modify nodename
[root@solaris186:/] # cat / etc/nodenamesolaris186 [root@solaris186:/] # vi / etc/nodenamenode1 [root@solaris186:/] # cat / etc/nodenamenode1
4. View ipnodes
[root@solaris186:/] # cat / etc/inet/ipnodes # # Internet host table#::1 localhost 127.0.0.1 localhost 192.168.8.11 node1 loghost
Summary:
Configuration files related to hostname
/ etc/hosts
/ etc/hostname.xxxx (network card name)
/ etc/nodename
/ etc/inet/ipnodes
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.