Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4188
  • Last Modified:

Configure Oracle Apache

Running Oracle on 64 bit AMD machine using Red Hat 3 ES.
The apache configuration step failed.
When i go the the apache directory and try starting apache i get:

[oracle@dwrep bin]$ id
uid=503(oracle) gid=503(oinstall) groups=503(oinstall),504(dba)
[oracle@dwrep bin]$ ./apachectl start
/u01/app/oracle/product/9.2.0/Apache/Apache/bin/httpd: error while loading share d libraries: libdb.so.2: cannot open shared object file: No such file or directo ry
./apachectl start: httpd could not be started
[oracle@dwrep bin]$ ./apachectl configtest
/u01/app/oracle/product/9.2.0/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
[oracle@dwrep bin]$
[root@dwrep root]# find / -name libdb.so.2 -print
/usr/lib64/libdb.so.2

How do i get rid of this problem?

0
xoxomos
Asked:
xoxomos
  • 8
  • 6
2 Solutions
 
periwinkleCommented:
Why are you starting apache as user oracle?  Try Su'ing to root, and retry starting.
0
 
xoxomosAuthor Commented:
/u01/app/oracle/product/9.2.0/Apache/Apache/bin
[root@dwrep bin]# ls
ab             apxs       htpasswd    log_server_status  stopJServ.sh
apachectl      dbmmanage  httpd       rotatelogs         tcpset.sh
apachectl.tmp  htdigest   logresolve  startJServ.sh
[root@dwrep bin]# ./apachectl start
/u01/app/oracle/product/9.2.0/Apache/Apache/bin/httpd: error while loading share
d libraries: libdb.so.2: cannot open shared object file: No such file or directo
ry
./apachectl start: httpd could not be started


0
 
periwinkleCommented:
Hmmm - when you installed apache, did you specify that path to the libraries?  Is that library in your own path?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
xoxomosAuthor Commented:
No and  no.  I did put it in the LD_LIBRARYPATH but not PATH.  I thought the PATH was for executables, but I'll try it in the morning.
0
 
periwinkleCommented:
Sorry, the library path, not the path -let me see if I can find the syntax for you.
0
 
kalosiCommented:
Either add the following line into your /etd/ld.so.conf

/usr/lib64

and run ldconfig afterwards or export the path via LD_LIBRARY_PATH

running ldd $ORACLE_HOME/Apache/Apache/bin/httpd should return something like this (you will have the 64bit libraries)

[oracle@rhel bin]$ ldd httpd
        /etc/libcwait.so => /etc/libcwait.so (0xb75e7000)
        libdms2.so => /opt/oracle/10.1.0as/lib/libdms2.so (0xb75cf000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb75b5000)
        libdb.so.2 => /usr/lib/libdb.so.2 (0xb75a6000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7591000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb756f000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7541000)
        libdl.so.2 => /lib/libdl.so.2 (0xb753e000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7407000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)
[oracle@rhel bin]$
0
 
periwinkleCommented:
Sorry - it's taken me a bit of time to come back to you.

The changes should be made when running configure - use:

./configure --libdir=/usr/lib64

and then run:

make clean
make
0
 
xoxomosAuthor Commented:
Which directory should  i be in to run the ./configure.
I don't see any configure except for source files.
0
 
periwinkleCommented:
That's correct - you'll need to recompile apache to look for files in that directory.
0
 
periwinkleCommented:
(correction: that should read 'library files' not 'files')
0
 
xoxomosAuthor Commented:
But I don't find a configure executable.  There is no place that I see that I could enter ./configure unless I go into a
/usr/src/redhat/BUILD/gcc............  Then there are a bunch of configures.
0
 
periwinkleCommented:
How did you build Apache?
0
 
xoxomosAuthor Commented:
I did not build it.  Any Apache stuff was part of the .tar file from Oracle.  Probably is different from the actual Apache.
0
 
periwinkleCommented:
Hmmm- the problem is that your library is in a different directory than where it is expected to be.  That expectation is generally ruled by how it was compiled.

Did you try Kelosi's recommendation?  I suspect s/he meant /etc/ld.so.conf Instead of  /etd/ld.so.conf  if that helps.
0
 
xoxomosAuthor Commented:
Yes.  Since posting this Oracle has released a 64 bit 10g server  for linux and this was just installed yesterday.  In 10g the Apache is not included and is a seperate install which I will be doing shortly.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now