Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Monday, September 14, 2009

Oracle on Linux needs access to /proc? Only for Enterprise Manager?

So, on some of our systems oracle runs as the oracle user, and the /proc filesystem is off limits for standard user accounts. This hasn't affected much...however I came across the error:
Error retrieving information from EMD. Exception: oracle.sysman.emSDK.emd.comm.MetricGetException: Could not open /proc/partitions

today...Hrm. Wonder what thats hurting...Probably nothing as everything seems to be running properly.

In addition...uname must be unrestricted in order for Oracle Wallet Manager (owm) to function. Probably lots of other java stuff too.

Linux, sudo, and environment variables

Our DBA came to me and said he was having some problems with sudo. A little background, we recently upgraded our test systems to the latest version of RedHat Enterprise Linux.  We have a pretty complicated setup with Oracle and Fujitsu NetCOBOL and a lot of customizations for our site.  My latest round of updates with the systems prompted me to enact a new baseline security policy.  One of the features of this new baseline policy is that it requires us going to a new procedure for issuing super user commands... Used to we'd just su, as thats how it had always been done here on HPUX and other UNIX Operating Systems.  With little separation of duty due to such a small staff, the DBA and others have all frequently pitched in to help with administration tasks.

Anyway, enforcing su provides a lot of benefit, even if it does mean we have to change the way we're doing some things.  Our system relies a lot upon environment variables being carried over from one environ to the other, and some of our system users and the tasks they perform depend largely upon those envars.  So, it came to pass that there is a directive in the sudoers file that allows (or, by default, disallows) environment variables passing through with sudo execution. This is "Default env_reset" - Changed to "Default !env_reset" to say ! = NO! Don't reset the envars when using sudo!

This solved our issue, and the DBA was able to complete the upgrades.

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