更改已配好的Solaris服务器的主机名,IP(Solaris7,8,9,10)
2010-01-22 16:30
651 查看
转自: http://www.sun.com/bigadmin/content/submitted/change_hostname.jsp#overview
Changing a Host Name or IP Address on the Solaris OSRoss Moffatt, August 2007
Contents
Overview
Option 1: Using
sys-unconfig
Option 2: Editing Files
About the Author
Overview This tech tip shows how to change the host name or IP address of a system running the Solaris OS.
This information is sourced in part from Sun InfoDoc 21252, "How to Change the hostname and/or IP Address Without Running the
sys-unconfigCommand". (Editor's note: For more information, please see SunSolve; content is available to registered users with a Sun Service Plan.)
Option 1: [b]Using
sys-unconfig[/b] Using
sys-unconfigresets a number of files back to default, then shuts down the host. What isn't pointed out in the man page is that on reboot, you are asked configuration questions to populate the files. The questions are the same as when a new server is delivered, or when you load the operating system from scratch.
So on boot you will get something like this:
Select the language you want to use: <select your language> Select a Locale, Please make a choice (0 - 59), or press h or ? for help: <select your location> What type of terminal are you using? Type the number of your choice and press Return: <select your terminal type, I use a DEC VT100> F2 continue, F2 continue Network Connectivity Networked [X] Yes DHCP Use DHCP [X] No Primary Network Interface Primary network interface [X] eri0 Host Name <hostname> IP Address <ipaddress> Subnets System part of a subnet [X] Yes Netmask <netmask> IPv6 Enable IPv6 [X] No Set a default Route [X] Specify one Default Route IP Address Router IP Address: <defaultrouter> Confirm Information F2 continue Configure Security Policy: Configure Kerberos Security [X] No Confirm Information F2 continue Name Service Name service [X] DNS Domain Name <dnsdomain> DNS Server Address Servers IP Address: <nameserver1> Servers IP Address: <nameserver2> Servers IP Address: DNS Search List Search Domain: <dnsdomain> Search Domain: Search Domain: Search Domain: Search Domain: Confirm Information F2 continue Time Zone Regions [X] <select your region> Time Zone Time zones [X] <select your time zone> Date and Time > Accept the default date and time or enter new values.
Option 2: Editing Files Host Name Change
Solaris 7之前的, check/edit:
/etc/inet/hosts /etc/nodename /etc/hostname.<interface>where
<interface>is the name of the primary interface, e.g. bge0.
/etc/net/ticlts/hosts /etc/net/ticots/hosts /etc/net/ticotsord/hostsThen reboot the system.
Solaris 7 到 9, check/edit:
/etc/inet/hosts /etc/nodename /etc/hostname.<interface>where
<interface>is the name of the primary interface, e.g. bge0.
/etc/net/ticlts/hosts /etc/net/ticots/hosts /etc/net/ticotsord/hosts/etc/inet/ipnodesThen reboot the system.
Solaris 10, check/edit:
/etc/inet/hosts /etc/nodename /etc/hostname.<interface>where
<interface>is the name of the primary interface, e.g. bge0.
/etc/inet/ipnodesThen reboot the system.
IP Address Change
Solaris 7 之前的, check/edit:
/etc/inet/hosts /etc/hostname.<interfaces>where
<interfaces>are the names of the interfaces, e.g. bge0, bge1, eri0.
/etc/net/ticlts/hosts /etc/net/ticots/hosts /etc/net/ticotsord/hostsIf you are moving to a new subnet, check/edit:
/etc/inet/netmasks /etc/defaultrouter /etc/resolv.confThen reboot the system.
Solaris 7 到 9, check/edit:
/etc/inet/hosts /etc/hostname.<interfaces>where
<interfaces>are the names of the interface, e.g. bge0, bge1, eri0.
/etc/net/ticlts/hosts /etc/net/ticots/hosts /etc/net/ticotsord/hosts/etc/inet/ipnodesIf you are moving to a new subnet, check/edit:
/etc/inet/netmasks /etc/defaultrouter /etc/resolv.confThen reboot the system.
Solaris 10, check/edit:
/etc/inet/hosts /etc/hostname.<interfaces>where
<interfaces>are the names of the interface, e.g. bge0, bge1, eri0.
/etc/inet/ipnodesIf you are moving to a new subnet, check/edit:
/etc/inet/netmasks /etc/defaultrouter /etc/resolv.confThen reboot the system.
About the Author Ross Moffatt has been a UNIX System Administrator for more than 10 years and can be contacted at ross.stuff [at] telstra.com.
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.
相关文章推荐
- SOLARIS10系统开启telnet/FTP/更改主机名称/网卡IP地址
- Unix Study--Solaris 10修改主机IP和主机名
- Unix Study--Solaris 10修改主机IP和主机名
- solaris 10笔记之更改主机名
- Hadoop学习笔记-002-CentOS_6.5_64_克隆系统后更改IP及主机名
- Solaris 10的服务器上配置ssh服务
- 更改服务器群集IP及数据库AlwayOn侦听IP
- apache服务器开启虚拟主机后localhost和ip无法访问的问题
- Solaris修改主机名和ip
- Solaris 10 改ip參考文档之二
- mac系统下(os x 10)手动设置IP提示无效服务器IP的解决方法
- 外网访问 虚拟机下的web服务器 设置主机端口与虚拟机ip和端口的映射
- 解决xmanager不能远程登录Solaris10主机的问题
- Oracle服务器更改IP或机器名后OracleDBConsoleXXX无法启动解决方案
- 如何用 PHP 来获取客户端 IP 和 服务器(主机)的 IP
- 配置基于主机名的虚拟主机实现服务器单IP跑多个web应用
- Hbuilder内更改SVN地址(svn服务器IP变更)
- Fedora10 NAT方式以固定IP共享主机上网
- apache服务器一个ip(如:127.0.0.1)和多个域名(虚拟主机)的绑定
- .NET下得到服务器主机名,IP和当前用户名