In this post we shall see how to start Oracle HTTP server (OHS) on privilege port (80)
$ cd $OHS_HOME/instances/$INSTANCE_NAME/bin
$ ./opmnctl stopall
Note: "ohsuser" is name of user through which we have installed/configured OHS.
Step 2) Change to root user with switch user(su) utility.
Step 3) Navigate to below mentioned directory and execute below command.
$ cd $ORACLE_OHS_HOME/ohs/bin
$ chown root .apachectl (change owner)
$ chmod 6750 .apachectl
Note: Please dont confuse with apachectl and .apachectl ( as both this files are at same location)
We need to change permission for .apachectl only.
Step 4) Exit as the root user and relogin using “ohsuser” user.
Make sure port 80 is free using netstat utility.
$ netstat -an | grep 80 ( if no output then port is free and available for use)
Step 5) Edit or change httpd.conf(after taking backup)
$ cd $OHS_HOME/instances/$INSTANCE_NAME/config/OHS/$OHS_NAME
$ cp httpd.conf httpd.conf_ORG
$ vi httpd.conf
Search for Listen and add 80 to it
#OHS Listen Port
Listen 80
Step 6) Start Oracle HTTP Server with following command:
$ cd $OHS_HOME/instances/$INSTANCE_NAME/bin
$ ./opmnctl startall
Step 7) Type and Test URL http://servername:80
- In Unix system Port number < 1024 are special port and reserved for root user.
- Oracle HTTP server by default runs as non-root user.
- If we want to use OHS on priviledged port then we must enable Oracle HTTP server to run as root.
Please perform below steps to run OHS on port 80.
Step 1) Stop Oracle HTTP server with "ohsuser"$ cd $OHS_HOME/instances/$INSTANCE_NAME/bin
$ ./opmnctl stopall
Note: "ohsuser" is name of user through which we have installed/configured OHS.
Step 2) Change to root user with switch user(su) utility.
Step 3) Navigate to below mentioned directory and execute below command.
$ cd $ORACLE_OHS_HOME/ohs/bin
$ chown root .apachectl (change owner)
$ chmod 6750 .apachectl
Note: Please dont confuse with apachectl and .apachectl ( as both this files are at same location)
We need to change permission for .apachectl only.
Step 4) Exit as the root user and relogin using “ohsuser” user.
Make sure port 80 is free using netstat utility.
$ netstat -an | grep 80 ( if no output then port is free and available for use)
Step 5) Edit or change httpd.conf(after taking backup)
$ cd $OHS_HOME/instances/$INSTANCE_NAME/config/OHS/$OHS_NAME
$ cp httpd.conf httpd.conf_ORG
$ vi httpd.conf
Search for Listen and add 80 to it
#OHS Listen Port
Listen 80
Step 6) Start Oracle HTTP Server with following command:
$ cd $OHS_HOME/instances/$INSTANCE_NAME/bin
$ ./opmnctl startall
Step 7) Type and Test URL http://servername:80
No comments:
Post a Comment