Oracle® Application Server Quick Administration Guide
10g Release 2 (10.1.2) B14126-02 |
|
Previous |
Next |
This chapter provides procedures for changing the network configuration of an Oracle Application Server host.
It contains the following topics:
The following procedures for changing network configurations are presented in this chapter:
Changing Your Hostname, Domain Name, or IP Address
This section describes how to update Oracle Application Server when changing the hostname, domain name, or IP address of a host.
Moving Between Off-Network and On-Network
This section provides procedures for moving an Oracle Application Server host on and off the network. You may use DHCP or a static IP address when on the network. You can use these procedures, for example, if you installed Oracle Application Server on your laptop and would like to plug in to different networks to use it.
Changing Between a Static IP Address and DHCP
This section provides procedures for changing from a static IP address to DHCP, and from DHCP to a static IP address. You might use these if you install on a static IP address but then decide you would like to use DHCP so you can be more mobile, or if you are using DHCP and must plug in to a network using a static IP address.
After you have installed Oracle Application Server, there may come a time when you want to change the hostname, domain name, or IP address of the host. Depending on your installation type, you may perform some or all of these operations.
Table 6-1 summarizes the installation types that support hostname, domain name, and IP address changes, and provides pointers to the appropriate procedures.
Table 6-1 Supported Procedures for Hostname, Domain Name, and IP Address Changes
Installation Type | Changing the Hostname or Domain Name | Changing the IP Address |
---|---|---|
Middle tier |
Supported Refer to Section 6.2.1, "Changing the Hostname or Domain Name of a Middle-Tier Installation" |
Supported Simply change the address in your operating system. No updates to Oracle Application Server are required |
Infrastructure: Identity Management and Metadata Repository |
Not supported |
Supported Refer to Section 6.2.2, "Changing the IP Address of an Infrastructure Containing a Metadata Repository" |
Infrastructure: Metadata Repository only |
Not supported |
Supported Refer to Section 6.2.2, "Changing the IP Address of an Infrastructure Containing a Metadata Repository" |
Infrastructure: Identity Management only Applies to Identity Management containing the following in any configuration: Oracle Internet Directory, OracleAS Single Sign-On, Oracle Delegated Administration Services, Oracle Directory Integration and Provisioning |
Supported |
Supported |
OracleAS Certificate Authority |
Supported |
Supported Simply change the address in your operating system. No updates to Oracle Application Server are required |
This section describes how to change the hostname, domain name, or both, of a host that contains any of the following middle-tier installation types:
J2EE and Web Cache
Portal and Wireless
Business Intelligence and Forms
Note: This procedure is not supported for OracleAS Developer Kits. |
The following sections describe the procedure:
Things to Know Before You Start
Review the following items before you start:
If any installations contain Oracle Content Management Software Development Kit, then you must perform additional steps. Refer to Oracle Content Management SDK Administrator's Guide before starting this procedure.
If the middle-tier instance is registered with Oracle Internet Directory, then you must supply the cn=orcladmin
password during the procedure.
Consider changing the log level before running the chgiphost
command so you can view more detailed information. See Section 6.2.3.1, "Setting the Log Level for chgiphost" for more information.
If your old hostname is a string that is likely to appear in a configuration file, then the chgiphost script may encounter problems when trying to update the configuration files. Refer to Section 6.2.3.2, "Customizing the chgiphost Script" for information about how to avoid this problem.
Write down the old hostname and IP address before you begin. You will be prompted for these values.
Oracle recommends that you perform a backup of your environment before you start this procedure. Refer to Chapter 9, "Backup and Recovery".
Task 1: Prepare Your Host
Prepare your host for the change by removing instances from OracleAS Clusters and stopping all processes:
If the host contains a middle-tier instance that is part of an OracleAS Cluster, then remove the instance from the OracleAS Cluster. You can add the instance back into the cluster at the end of the procedure.
See Also: Oracle Application Server High Availability Guide for instructions on removing instances from an OracleAS Cluster |
If the host contains an instance that stores the file-based repository used by an OracleAS File-Based farm, you must remove all instances from that farm, even if they reside on other hosts. This is because the repository ID will change when you change the hostname. As a result, you must remove all instances from the farm, change the hostname (which will change the repository ID), then add the instances back to the farm at the end of this procedure using the new repository ID.
To remove an instance from an OracleAS File-Based Farm, run the following command in the instance Oracle home:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl leavefarm
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl leavefarm
If the host contains a J2EE and Web Cache instance that is part of an OracleAS File-Based Farm (that uses a repository on another host) or an OracleAS Database-Based Farm, then remove the instance from the farm:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl leavefarm
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl leavefarm
You can add the instance back to the farm at the end of the procedure.
If the host contains a middle-tier instance that is part of an OracleAS Web Cache cluster, then remove the instance from the cache cluster. You can add the instance back into the cache cluster at the end of the procedure.
See Also: Oracle Application Server Web Cache Administrator's Guide for instructions on removing caches from a cache cluster |
Shut down each middle-tier instance on the host by running the following commands in each Oracle home:
On UNIX systems:
ORACLE_HOME/bin/emctl stop iasconsole ORACLE_HOME/opmn/bin/opmnctl stopall
On Windows systems:
ORACLE_HOME\bin\emctl stop iasconsole ORACLE_HOME\opmn\bin\opmnctl stopall
If the middle-tier instance was part of an OracleAS File-Based Farm, then ensure the DCM daemon is running in the file-based repository instance. This applies whether the repository instance is on the same host or a different host.
To verify if the DCM daemon is running, then run the following command in the file-based repository Oracle home:
On UNIX systems:
ORACLE_HOME/opmn/bin/opmnctl status
On Windows systems:
ORACLE_HOME\opmn\bin\opmnctl status
To start the DCM daemon:
On UNIX systems:
ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=dcm-daemon
On Windows systems:
ORACLE_HOME\opmn\bin\opmnctl startproc ias-component=dcm-daemon
Ensure Oracle Application Server processes will not start automatically after restarting the host by disabling any automated startup scripts you may have set up, such as /etc/init.d
scripts.
Ensure the Oracle Internet Directory that is used by the middle-tier is running.
Task 2: Change the Hostname
Update your operating system with the new hostname, domain name, or both. Consult your operating system documentation for more information about how to perform the following steps. You can also change the IP address, if desired.
Make the updates to your operating system to properly change the hostname, domain name, or both.
Restart the host, if necessary for your operating system.
Verify that you can ping the host from another host in your network. Be sure to ping using the new hostname to ensure everything is resolving properly.
Task 3: Run the chgiphost Command
Follow these steps for each middle-tier instance on your host. Be sure to complete the steps entirely for one middle-tier instance before you move on to the next.
Log in to the host as the user that installed the middle-tier instance.
Ensure your ORACLE_HOME
environment variable is set to the middle-tier Oracle home.
On UNIX systems, set the LD_LIBRARY_PATH
, LD_LIBRARY_PATH_64
, LIB_PATH
, or SHLIB_PATH
environment variables to the proper values, as shown in Table 1-1. The actual environment variables and values that you have to set depend on the type of your UNIX operating system.
Run the following commands in the middle-tier Oracle home:
On UNIX systems:
cd ORACLE_HOME/chgip/scripts
./chgiphost.sh -mid
On Windows systems:
cd ORACLE_HOME\chgip\scripts
cmd /c chgiphost.bat -mid
The chgiphost
command prompts for information, as shown in Table 6-2. Note that the prompts may provide values in parentheses. You can enter a different value, or press the return key to accept the suggested value.
Table 6-2 Prompts and Actions for chgiphost -mid
Prompt | Action |
---|---|
Enter fully qualified hostname (hostname.domainname) of destination |
Enter the new fully-qualified hostname. This may be a new hostname, domain name, or both. |
Enter valid IP Address of destination |
If you changed the IP address of the host, then enter the new IP address. Otherwise, enter the current IP address. |
Enter valid IP Address of source |
If you changed the IP address of the host, then enter the old IP address. Otherwise, enter the current IP address. |
|
Enter the |
Verify that the tool ran successfully by checking for errors in the files in the following directory:
On UNIX systems:
ORACLE_HOME/chgip/log
On Windows systems:
ORACLE_HOME\chgip\log
Task 4: Restart Your Environment
Restart the middle-tier instances and restore your configuration back to the way it was before you started the procedure.
Start each middle-tier instance on your host by running the following commands in each Oracle home:
On UNIX systems:
ORACLE_HOME/opmn/bin/opmnctl startall ORACLE_HOME/bin/emctl start iasconsole
On Windows systems:
ORACLE_HOME\opmn\bin\opmnctl startall ORACLE_HOME\bin\emctl start iasconsole
If you removed any instances from an OracleAS Web Cache cluster at the beginning of this procedure, then add them back to the cache cluster.
See Also: Oracle Application Server Web Cache Administrator's Guide for instructions on adding caches to a cluster |
If the host contained an instance that stored the file-based repository used by an OracleAS File-Based farm:
Obtain the new repository ID for the new farm by running the following command in the Oracle home of that instance:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl getRepositoryID
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl getRepositoryID
Recreate the OracleAS File-Based Farm by adding that instance to the new farm using the new repository ID obtained in the preceding step. The repository_ID
is of the form hostname
:port
.
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl joinfarm -r repository_ID
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl joinfarm -r repository_ID
Add all instances on other hosts back to the new farm using the command in the preceding step.
If you removed any J2EE and Web Cache instances from an OracleAS File-Based Farm (that uses a repository on another host) at the beginning of this procedure, then add each one back as follows:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl joinfarm -r repository_ID
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl joinfarm -r repository_ID
In the preceding command, repository_ID
is the hostname:port value returned by running the following command in the file-based repository Oracle home:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl getRepositoryID
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl getRepositoryID
If you removed any J2EE and Web Cache instances from an OracleAS Database-based Farm at the beginning of this procedure, then add each one back as follows:
On UNIX systems:
ORACLE_HOME/dcm/bin/dcmctl joinfarm
On Windows systems:
ORACLE_HOME\dcm\bin\dcmctl joinfarm
If you removed any instances from an OracleAS Cluster at the beginning of this procedure, then add them back to the cluster.
See Also: Oracle Application Server High Availability Guide for instructions on adding instances to an OracleAS Cluster |
If you disabled any processes for automatically starting Oracle Application Server at the beginning of this procedure, then enable them.
Task 5: Update OracleAS Portal, OracleAS Wireless, OracleAS Single Sign-On, and Oracle Ultra Search
You must update OracleAS Portal, OracleAS Wireless, OracleAS Single Sign-On, and Oracle Ultra Search when you change the hostname.
Update OracleAS Portal with the new OracleAS Wireless service URL.
If you change the hostname, the OracleAS Wireless server URL will also change to use this new hostname. Therefore, you must update OracleAS Portal with the new OracleAS Wireless service URL. For more information, refer to "Updating the OracleAS Wireless Portal Service URL Reference" in Oracle Application Server Portal Configuration Guide.
Update OracleAS Single Sign-On (SSO) server with the new OracleAS Wireless SSO Partner URL.
If you change the hostname, the OracleAS Wireless SSO Partner URL uses the new hostname. Therefore, you must update OracleAS Single Sign-On with the new OracleAS Wireless SSO Partner URL.
Rather than manually changing the SSO settings, Oracle recommends that you re-register the OracleAS Wireless server with SSO using the following command line tool:
(UNIX) Oracle_Home/wireless/bin/reRegisterSSO.sh (Windows) Oracle_Home\wireless\bin\reRegisterSSO.bat
This tool, which prompts you through the registration process, not only updates the OracleAS Wireless URL in the SSO server, but it also updates the SSO URL in the OracleAS Wireless server.
Re-register OracleAS Portal as an Oracle Ultra Search Content Source.
If you change the hostname, the OracleAS Portal URL will also change to use this new hostname. Therefore, you must update Oracle Ultra Search with the new OracleAS Portal URL. In Oracle Ultra Search, the OracleAS Portal URL is used to register OracleAS Portal as a crawlable content source. For more information, refer to "Registering OracleAS Portal as a Content Source" in Oracle Application Server Portal Configuration Guide.
Task 6: Manually Update the Hostname in Files
If you edited a file and entered the hostname as part of a user-defined parameter such as the Oracle home path, then the hostname is not automatically updated by running the chgiphost
script. To update the hostname in such cases, you need to edit the files manually. For example, the plsql.conf
file may contain an NFS path including the hostname, such as: /net/dsun1/private/...
.
The chgiphost
script also does not edit the hostname references in the documentation files. You will need to manually edit these files to update the hostname. Examples of such files are the following files in the ORACLE_HOME
/Apache/Apache/htdocs
directory:
index.html.de
index.html.es_ES
index.html.fr
index.html.it
index.html.ja
index.html.ko
index.html.pt_BR
index.html.zh_CN
index.html.zh_TW
This section describes how to change the IP address of a host that contains either of the following Infrastructure installation types:
Metadata Repository only
Identity Management and Metadata Repository
The following sections describe the procedure:
Things to Know Before You Start
Review the following items before you start the procedure:
Write down the old IP address before you begin. You will be prompted for this during the procedure.
Oracle recommends that you perform a backup of your environment before you start this procedure. Refer to Chapter 9, "Backup and Recovery".
Task 1: Shut Down Middle-Tier Instances
Shut down all middle-tier instances that use the Infrastructure installation, even if they are on other hosts, using Application Server Control Console.
Task 2: Prepare Your Host
Prepare your host for the change by stopping all processes.
Set the ORACLE_HOME
and ORACLE_SID
environment variables.
Shut down the Infrastructure:
On UNIX systems:
ORACLE_HOME/bin/emctl stop iasconsole ORACLE_HOME/opmn/bin/opmnctl stopall
On Windows Systems:
ORACLE_HOME\bin\emctl stop iasconsole ORACLE_HOME\opmn\bin\opmnctl stopall
Shut down the listener and database:
lsnrctl stop sqlplus /nolog SQL> connect SYS as SYSDBA SQL> shutdown
Verify that all Oracle Application Server processes have stopped.
Ensure Oracle Application Server processes will not start automatically after a restarting the host by disabling any automated startup scripts you may have set up, such as /etc/init.d
scripts.
Task 3: Change the IP Address
Update your operating system with the new IP address, restart the host, and verify that the host is functioning properly on your network. Consult your operating system documentation for more information about how to do this.
Make the updates to your operating system to properly change the IP address.
Restart the host, if required by your operating system.
Verify that you can ping the host from another host in your network. Be sure to ping using the new IP address to ensure everything is resolving properly.
Task 4: Update the Infrastructure
Update the Infrastructure on your host with the new IP address.
Log in to the host as the user that installed the Infrastructure.
Set the ORACLE_HOME
and ORACLE_SID
environment variables.
On UNIX systems, set the LD_LIBRARY_PATH
, LD_LIBRARY_PATH_64
, LIB_PATH
, or SHLIB_PATH
environment variables to the proper values, as shown in Table 1-1. The actual environment variables and values that you have to set depend on the type of your UNIX operating system.
Start the database and listener:
sqlplus /nolog SQL> connect SYS as SYSDBA SQL> startup SQL> quit lsnrctl start
Start OPMN:
(UNIX) ORACLE_HOME/opmn/bin/opmnctl start (Windows) ORACLE_HOME\opmn\bin\opmnctl start
Start Oracle Internet Directory:
(UNIX) ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=OID process-type=OID (Windows) ORACLE_HOME\opmn\bin\opmnctl startproc ias-component=OID process-type=OID
Run the following commands in the Infrastructure Oracle home:
(UNIX) cd ORACLE_HOME/chgip/scripts ./chgiphost.sh -infra (Windows) cd ORACLE_HOME\chgip\scripts cmd /c chgiphost.bat -infra
The chgiphost
command prompts for the old and new IP address.
Verify that the tool ran successfully by checking for errors in the files in the following directory:
(UNIX) ORACLE_HOME/chgip/log (Windows) ORACLE_HOME\chgip\log
Task 5: Restart Your Environment
Start the remaining components of the Infrastructure and start any middle-tier instances that use it:
Start the Infrastructure:
On UNIX systems:
ORACLE_HOME/opmn/bin/opmnctl startall ORACLE_HOME/bin/emctl start iasconsole
On Windows Systems:
ORACLE_HOME\opmn\bin\opmnctl startall ORACLE_HOME\bin\emctl start iasconsole
If a middle-tier instance is on the same host as the Infrastructure, then you need to run the chgiphost
command on the middle-tier instance before restarting the middle-tier processes.
If you disabled any processes for automatically starting Oracle Application Server at the beginning of this procedure, enable them.
This section contains the following special topics that apply to changing the hostname or domain name of an Oracle Application Server host:
By default, the console log level for the chgiphost
command is SEVERE. This causes only critical information to be printed while running chgiphost
. If you would like to view additional progress information, then set the console log level to CONFIG as follows:
Edit the following file:
(UNIX) ORACLE_HOME/chgip/config/chgip.log.properties (Windows) ORACLE_HOME\chgip\config\chgip.log.properties
Change the java.util.logging.ConsoleHandler.level
parameter to CONFIG
:
java.util.logging.ConsoleHandler.level = CONFIG
By default, the chgiphost
script updates key configuration files in the Oracle home with the new hostname. If any of the following cases apply to your installation, then you may want to consider customizing the behavior of the chgiphost
script:
You have created additional configuration files that contain the hostname and would like the chgiphost
script to update those files.
To update these files, add their full path name to the following file before running chgiphost
:
(UNIX)ORACLE_HOME/chgip/config/hostname.lst (Windows)ORACLE_HOME\chgip\config\hostname.lst
Your old hostname is very short (one or two letters) or is a string that is likely to appear in a configuration file
Before running chgiphost
, examine each of the files listed in hostname.lst
to determine if the old hostname exists in any settings in those files. If you find a match, then you can correct those settings after you run chgiphost
.
Your Oracle home contains the hostname in its full path.
In this case, the chgiphost
script may not update your configuration files properly. You can avoid this problem by using a Java utility called FileFixer, which searches for specific text strings in a file by matching regular expressions, and updates them to their new values. Note that FileFixer searches for patterns one line at a time. It cannot match patterns across lines.
To use FileFixer:
Make a copy of the following file:
On UNIX systems:
ORACLE_HOME/chgip/config/hostname_short_sample.lst.xml
On Windows systems:
ORACLE_HOME\chgip\config\hostname_short_sample.lst.xml
Edit your copy of the file to specify the regular expression matching required for your old and new hostnames. The file contains an example of how to do this.
Specify the file when running the chgiphost
script. For example, on UNIX:
./chgiphost option -hostnameShortXml full_path_to_your_xml_file
For example, if you named your file /mydir/my_sample.lst.xml
, and you are updating a middle-tier installation on UNIX, then run chgiphost
as follows:
./chgiphost -mid -hostnameShortXml /mydir/my_sample.lst.xml
When you upgrade from Windows 2000 to Windows 2003, lower-case letters in your hostname may be changed to upper-case letters. For example, if your hostname is myhost
before the upgrade, then it may be changed to MYHOST
. If this occurs, then some Oracle Application Server processes may not function properly.
To resolve this problem, you do not need to run the chgiphost
command to update Oracle Application Server. You can simply add an entry with the lower-case hostname to the hosts file:
OS_path\system32\drivers\etc\hosts
For example, if your fully-qualified hostname was myhost.mydomain
before the upgrade, and your IP address is 1.2.3.4, then add the following line:
1.2.3.4 myhost.mydomain myhost
This section describes how to recover from typical errors you might encounter when using the chgiphost
script. It contains the following scenarios:
Scenario 1: You Specified the Wrong Destination Name
Suppose you ran the chgiphost
script but specified the wrong destination name. In this case, you can remedy the error by running chgiphost
again. Here are the details.
Suppose the current source hostname is loire985, the incorrect destination hostname you specified is mqa985, and the correct destination hostname is sqb985. Initially, you ran chgiphost.sh
with source = loire985 and destination = mqa985.
To recover from this error:
Run chgiphost.sh
with source = mqa985 and destination = sqb985.
Run chgiphost.sh
again with source = loire985 and destination = sqb985.
Scenario 2: You Encountered an Error when Running chgiphost.sh
For example, you will get an error message if you enter the wrong password for Oracle Internet Directory. In this case, you should run chgiphost
again, with the same source and destination hostnames as before, and ensure to supply the correct password when prompted.
If you encounter an error when running chgiphost
, then you should fix the error and run chgiphost
again.
This section describes how to move an Oracle Application Server host on and off the network. The following assumptions and restrictions apply:
The host must contain an Infrastructure and middle-tier instance, or a J2EE and Web Cache instance that does not use an Infrastructure, that is, the entire Oracle Application Server environment must be on the host.
DHCP must be used in loopback mode. Refer to Oracle Application Server Installation Guide for more information.
Only IP address change is supported; the hostname must remain unchanged.
Hosts in DHCP mode should not use the default hostname (localhost.localdomain
). The hosts should be configured to use a standard hostname and the loopback IP should resolve to that hostname.
A loopback adapter is required for all off-network installations (DHCP or static IP). Refer to Oracle Application Server Installation Guide for more information.
This procedure assumes you have installed Oracle Application Server on a host that is off the network, using a standard hostname (not localhost
), and would like to move on the network and use a static IP address. The IP address may be the default loopback IP, or any standard IP address.
To move onto the network, you can simply plug the host into the network. No updates to Oracle Application Server are required.
This procedure assumes you have installed on a host that is off the network, using a standard hostname (not localhost
), and would like to move on the network and use DHCP. The IP address of the host can be any static IP address or loopback IP address, and should be configured to the hostname.
To move onto the network, connect the host to the network using DHCP and configure the hostname to the loopback IP address only.
Follow this procedure if your host is on the network, using a static IP address, and you would like to move it off the network:
Configure the /etc/hosts
file so the IP address and hostname can be resolved locally.
Take the host off the network.
There is no need to perform any steps to change the hostname or IP address.
Follow this procedure if your host is on the network, using DHCP in loopback mode, and you would like to move it off the network:
Configure the /etc/hosts file so the IP address and hostname can be resolved locally.
Take the host off the network.
There is no need to perform any steps to change the hostname or IP address.
This section describes how to change between a static IP address and DHCP. The following assumptions and restrictions apply:
The host must contain an Infrastructure and middle-tier instance, or a J2EE and Web Cache instance that does not use an Infrastructure, that is, the entire Oracle Application Server environment must be on the host.
DHCP must be used in loopback mode. Refer to Oracle Application Server Installation Guide for more information.
Only IP address change is supported; the hostname must remain unchanged.
Hosts in DHCP mode should not use the default hostname (localhost.localdomain
). The hosts should be configured to use a standard hostname and the loopback IP should resolve to that hostname.