Wednesday, August 26, 2009

Enable Oracle Application Server to run on port <1024 on HPUX

Below are the instructions, probably a little too detailed, on how to enable oracle to start httpd as root then fork to user specified in httpd.conf (em -> advanced properties -> httpd.conf) - For most people, Since Oracle App server is just a modified apache...Task 1 is the only thing you really have to do. You can then add the port in EM, and add the vhost directive in either ssl.conf or whatever file you're sourcing vhosts from.
--
Task 1: Enable Oracle HTTP Server to Run as Root for Ports Set to Less Than 1024 (Unix Only)
If you are on a UNIX system and you are changing the Listen port to a number less than 1024, perform these steps before you change the Oracle HTTP Server Listen port.
By default, Oracle HTTP Server runs as a non-root user (the user that installed Oracle Application Server). On UNIX systems, if you change the Oracle HTTP Server Listen port number to a value less than 1024, you must enable Oracle HTTP Server to run as root, as follows:
  1. Log in as root.
  2. Run the following commands in the middle-tier Oracle home:


    cd ORACLE_HOME/Apache/Apache/bin
    chown root .apachectl
    chmod 6750 .apachectl

Task 2: Use the portconfig Command to Change the Oracle HTTP Server Listen Ports
Use the following procedure to change the Oracle HTTP Server HTTP or HTTPS listen port:
  1. Set the ORACLE_HOME environment variable to the home directory of the Oracle Application Server instance where the Oracle HTTP Server resides.
    For example:


    (UNIX) setenv ORACLE_HOME /dev0/private/oracle/appserv1/ 

  2. On UNIX systems, set the LD_LIBRARY_PATH, LD_LIBRARY_PATH_64, LIB_PATH, or SHLIB_PATH environment variables to the proper values. The actual environment variables and values that you must set depend on the type of your UNIX operating system.

  3. Create an alias (on UNIX systems) to represent the portconfig command.
    For example, to execute the command as an alias on UNIX systems, enter the following command:


    alias portconfig '$ORACLE_HOME/jdk/bin/java -cp 
    $ORACLE_HOME/sysman/webapps/emd/WEB-INF/lib/emd.jar:
    $ORACLE_HOME/dcm/lib/dcm.jar:
    $ORACLE_HOME/sso/lib/ossoreg.jar
    oracle.sysman.ias.sta.tools.PortConfigCmdLine \!*'

  4. Use the newly created portconfig command as follows:


    portconfig -oracleHome ORACLE_HOME 
    -oldPort old_port
    -newPort new_port
    [-sso -url http://sso_host:port -user http_server_admin_user
    [-site name_of_sso_partner_application]
    [-admin mod_osso_admin_user]
    [-vHost path_to_mod_osso_configuration_file]]
    [-webCache] [-debug]
    {-start | -restart}

    For example, on UNIX systems:


    portconfig -oracleHome $ORACLE_HOME -oldPort 7777 -newPort 7778 -webCache

No comments:

Post a Comment