Thursday, 18 October 2018

Starting Oracle HTTP Server Instances from the Command Line

Starting Oracle HTTP Server Instances from the Command Line
You can start up Oracle HTTP Server instances from the command line via a script.

Ensure that Node Manager is running.
Enter the following command:
Linux or UNIX: $DOMAIN_HOME/bin/startComponent.sh componentName

Windows: %DOMAIN_HOME%\bin\startComponent.cmd componentName

For example:

$DOMAIN_HOME/bin/startComponent.sh ohs1
The startComponent script contacts Node Manager and runs the nmStart() command.

When prompted, enter your Node Manager password. The system responds with these messages:
Successfully started server componentName...
Successfully disconnected from Node Manager...

Exiting WebLogic Scripting Tool.
Note:

If you encounter any odd system messages upon startup, you can ignore them.

Storing Your Node Manager Password
You can avoid having to enter your Node Manager password every time you launch the server with startComponent command by starting it with the storeUserConfig option for the first time. Do the following:

At the prompt, enter the following command:
$DOMAIN_HOME/bin/startComponent.sh componentName storeUserConfig
The system will prompt for your Node Manager password.

Enter your password.
The system responds with this message:

Creating the key file can reduce the security of your system if it is not kept
in a secured location after it is created. Creating new key...
The username and password that were used for this WebLogic NodeManager
connection are stored in $HOME/.wlst/nm-cfg-myDomainName.props and 
$HOME /.wlst/nm-key-myDomainName.props.
Starting Oracle HTTP Server Instances on a Privileged Port (UNIX Only)
WARNING:

When this procedure is completed, any Oracle HTTP Server processes running from this Oracle Home will be able to bind to privileged ports.

On a UNIX system, TCP ports in a reserved range (typically less than 1024) can only be bound by processes with root privilege. Oracle HTTP Server always runs as a non-root user; that is, the user who installed Oracle Fusion Middleware. On UNIX, special configuration is required to allow Oracle HTTP Server to bind to privileged ports.

To enable Oracle HTTP Server to listen on a port in the reserved range (for example, the default port 80 or port 443) use the following one-time setup on each Oracle HTTP Server machine:

Update the ORACLE_HOME/ohs/bin/launch file by performing the following steps as the super user (if you do not have access to super user privileges, have your system administrator perform these steps):

Change ownership of the file to root:

chown root $ORACLE_HOME/ohs/bin/launch
Change the permissions on the file as follows:

chmod 4750 $ORACLE_HOME/ohs/bin/launch

The steps that require root permissions are now complete.

Modify the port settings for Oracle HTTP Server as described in Managing Ports.

Configure the User and Group directive in httpd.conf.

The configured user ID for User should be the same user ID that created the instance. The configured group ID for Group must be the same group ID used to create the instance. See Oracle HTTP Server Configuration Files. To configure Oracle HTTP Server to run as a different user id see Starting Oracle HTTP Server Instances as a Different User (UNIX Only).

No comments:

Post a Comment