[질문] SUN solaris 5.7 에서 apm + oracle 을 설치하는데..

offree의 이미지

안녕하세요.

apm(apache + php , mysql ) 은 정상적으로 설치가 되었습니다.

원래 이 서버가 사용되던 것인데.. apm 을 새 버전으로 업그레이드 하려구요.

그런데.. oracle 7.3.3 버전을 php 에서 with-oracle 로 설치하려고 하는데요.

다음과 같은 에러가 나네요..

--------------------------------------------------------------------------------
In file included from /home/web2003/system/php-4.3.3/ext/oracle/oracle.c:40:
/home/web2003/system/php-4.3.3/ext/oracle/php_oracle.h:22: oratypes.h: No such f
ile or directory
/home/web2003/system/php-4.3.3/ext/oracle/php_oracle.h:23: ocidfn.h: No such fil
e or directory
/home/web2003/system/php-4.3.3/ext/oracle/php_oracle.h:24: ociapr.h: No such fil
e or directory
gmake: *** [ext/oracle/oracle.lo] Error 1
--------------------------------------------------------------------------------

헤더 파일이 없어서 그런것 같은데.. ORACLE_HOME 에는 해당 ocidfn.h 등의 헤더 파일은 없더군요..

oracle 의 설치가 잘 못 된 것 인가요?

제가 설치한 것이 아니라 원래 있던것을 apm 만 업그레이드 할려고 하는 것이거든요..

예전에 어떻게 설치했는지 알 수가 없어서 난감하네요..

설치해 보신분 조언 부탁드립니다.

모두 수고하시구요. ^^

offree의 이미지

해당 header 파일을 찾아서 (예전 php 설치 디렉토리에서) 컴파일을 하긴 했습니다.
이상이 있을지는 모르겠지만요..

그런데 . ora 함수를 써보니 다음과 같은 에러가..

Warning: Oracle: Connection Failed: ORA-12203: TNS:unable to connect to destination in test_oracle.html on line 12

Warning: ora_open(): supplied argument is not a valid Oracle-Connection resource in test_oracle.html on line 13

Warning: ora_commitoff(): supplied argument is not a valid Oracle-Connection resource in test_oracle.html on line 14

Warning: ora_parse(): supplied argument is not a valid Oracle-Cursor resource in test_oracle.html on line 17

Warning: ora_exec(): supplied argument is not a valid Oracle-Cursor resource in test_oracle.html on line 18

Warning: ora_fetch(): supplied argument is not a valid Oracle-Cursor resource in test_oracle.html on line 23

Warning: ora_close(): supplied argument is not a valid Oracle-Cursor resource in test_oracle.html on line 34

Warning: ora_logoff(): supplied argument is not a valid Oracle-Connection resource in test_oracle.html on line 35

php 연동 컴파일의 문제인지.. oracle 접속시의 문제인지 모르겠네요..
ora 함수는 작동을 하긴 하는 것 같은데.. oracle 이 안띄워져서 그런가??

어느쪽의 문제 인것 같나요? oracle 을 모르니 힘이드네요.. ^^
조언 부탁드려요.. 저는 더 테스트를 해봐야 겠습니다.

그럼.

모두 행복하시구요. ^^

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

offree의 이미지

서버에 ps -ef 로 프로세스를 확인해 보니 oracle 관련 프로세스가
없는 것 같아요..

웹서버(현서버 apm+oracle) --> oracle 서버 가 있어서

웹서버 에서는 클라이언트로 oracle 서버에 접속하려고 하는 것이거든요..

그런데 웹서버 쪽에서는 oracle 관련 프로세스가 떠 있어야 하는 것이 아닌지요?

그렇다면 위의 에러도 그것때문인것 같기도 하고..

oracle 관련 프로세스 는 어떤것을 확인해 보면 되는지요?

그럼.

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

supersky의 이미지

예전에 깔아서 써서 잘 기억이 나지 않습니다만 기억나는데로 최대한 답변 드리겠습니다.

1. 컴파일시 Header파일이 없다고 에러가 난다.
php configure시 --with-oci8=/oracle/install/path이 부분에 경로를 제대로 않주신것 같은데요... 아참... --with-oracle로하셨나요? oracle8이면 oci function을 쓰시는게 좋은데...

2. Warning: Oracle: Connection Failed: ORA-12203: TNS:unable to connect to destination in test_oracle.html on line 12
lsnrctrl을 띠워야 하거든요... 꼭 띠우세요...

su - oracle
lsnrctl start이렇게 하면실행됩니다.

도움이 되셨으면 합니다.

void main()
{
printf("Hello World\n");
exit(0);
}
/* 초심으로 돌아가자~~~~~ */

offree의 이미지

우선 답변 감사합니다.

supersky wrote:

1. 컴파일시 Header파일이 없다고 에러가 난다.
php configure시 --with-oci8=/oracle/install/path이 부분에 경로를 제대로 않주신것 같은데요... 아참... --with-oracle로하셨나요? oracle8이면 oci function을 쓰시는게 좋은데...

oracle 8i 가 아니라 7i 더군요. 그래서 --with-oracle 로 ...
헤더 파일은 찾아서 컴파일 까지는 했습니다.(헤더파일이 영 걸리긴 하네요..)

phpinfo 로 oracle 부분도 확인했구요.

supersky wrote:

2. Warning: Oracle: Connection Failed: ORA-12203: TNS:unable to connect to destination in test_oracle.html on line 12
lsnrctrl을 띠워야 하거든요... 꼭 띠우세요...

su - oracle
lsnrctl start이렇게 하면실행됩니다.

lsnrctl 을 띄우고 했는데 같은에러가 나네요..

클라이언트용이 lsnrctl 인가요? 서버에 접속을 하지 못하는 것 같아요..

lsnrctl 을 실행시키고 php 에서 ora 함수를 테스트 하는데..
다음과 같은 메세지가 뜨네요.. 콘솔상에서..


[ blue:/home/oracle/app/oracle/product/7.3.3/bin:104 ] lsnrctl start

LSNRCTL for Solaris: Version 2.3.3.0.0 - Production on 15-SEP-03 14:11:50

Copyright (c) Oracle Corporation 1994.  All rights reserved.



Starting /home/oracle/app/oracle/product/7.3.3/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 2.3.3.0.0 - Production
System parameter file is /home/oracle/app/oracle/product/7.3.3/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/product/7.3.3/network/log/listener.log
Attempted to listen on: (DESCRIPTION=(CONNECT_TIMEOUT=60)(ADDRESS=(PROTOCOL=tcp)
(PORT=7301)(HOST=주소..)))
TNS-12545: Connect failed because target host or object does not exist
 TNS-12560: TNS:protocol adapter error
  TNS-00515: Connect failed because target host or object does not exist
   Solaris Error: 126: Cannot assign requested address

끝부분을 보니 .. 주소를 못 찾는 것 같은데요.. 맞나요?

아 그리고 아까와는 조금 다른 메세지도 같이 뜨네요..

Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name

역시 주소를 못찾는 것인지..

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

offree의 이미지

생각해 보니..

lsnrctl 은 서버용 으로 사용되는 것이 아닌지요?

웹서버(현재 사용..) --> 오라클서버

웹서버에는 oracle 연동을 위한 php 연동함수 를 컴파일 하고
오라클서버에 접속하려는 것이거든요..

혹시 오라클 서버가 막혀있는지 콘솔상에서 확인하려면 어떻게 해야 하나요?
그쪽도 약간 의심이 가네요..

그럼..

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

supersky의 이미지

lsnrctrl 리스너라구하는데요. 위의 내용을 보면요.. 서버주소적는 부분이 있는데요. 빈칸이네요... 환경파일을 설정해 주고 lsnrctrl실행 해야합니다.

Quote:
Starting /home/oracle/app/oracle/product/7.3.3/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 2.3.3.0.0 - Production
System parameter file is /home/oracle/app/oracle/product/7.3.3/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/product/7.3.3/network/log/listener.log
Attempted to listen on: (DESCRIPTION=(CONNECT_TIMEOUT=60)(ADDRESS=(PROTOCOL=tcp)
(PORT=7301)(HOST=주소..)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Solaris Error: 126: Cannot assign requested address

위에서 HOST=주소..이부분입니다.

전반적으로 봤을때 환경설정 파일을 점검해보세요. 그래야할것 같구요..

확인하는 방법은 tnsping인가.... 오래되서 기억력이 감퇴되긴 했는데요.
xxxping란 실행파일이 있을꺼에요.. 그걸로 해보시면 됩니다.

아참...linux면 혹 모르니깐 ipchains나 iptables를 모두 풀고 해보세요.
혹시 필터링 되는지 모르니깐요..

아참... 7.x도 4년전에 설치한적이 있었거든요...
환경변수 설정이 중요합니다. 그거 제대로 되어 있지 않으면 잘 동작도 않하거든요..

즉, oracle계정의 환경변수를 root에도 모두 해주세요. 제 기억이 맞다면 그거해주시면 많은 부분 에러가 나지 않을겁니다.

그럼.. 도움이 되었으면 합니다.

void main()
{
printf("Hello World\n");
exit(0);
}
/* 초심으로 돌아가자~~~~~ */

offree의 이미지

supersky wrote:

위에서 HOST=주소..이부분입니다.

전반적으로 봤을때 환경설정 파일을 점검해보세요. 그래야할것 같구요..

확인하는 방법은 tnsping인가.... 오래되서 기억력이 감퇴되긴 했는데요.
xxxping란 실행파일이 있을꺼에요.. 그걸로 해보시면 됩니다.

예 . 그부분은 제가 수정해 놓은 것입니다.

tnsping 을 해보니

Quote:

Attempting to contact (ADDRESS=(PROTOCOL=tcp)(PORT ...

가 나오고 그다음은 응답이 없네요.. 이것이 정상인가요?

문제가 될만한 부분이..

1. php . 연동시 oracle7i 를 위한 설정시 문제.
해당 header 파일에서..

2. 현 web 서버의 oracle 설정이 잘못되었다.
oracle client 의 설정 등이 잘못되어 정상구동이 안된다.

3. 서버에서 제한을 하였다.
기존 사용용도가 항상 접속하는 것이 아니라서 제한이 있을 수 있음.

1번은 우선은 정상적인것 같고 2와 3이 의심이 가는데요..
3번도 위 테스트(tnsping) 이 정상이라면 2번 클라이언트 측에 어떤 조치를
해야 하는 지..

답변 감사합니다.

oracle 쪽을 더 찾아봐야 겠네요..

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

offree의 이미지

몇가지 oracle 명령으로 확인.

1. adapters


Installed SQL*Net V2 Protocol Adapters are:

   V2 BEQ Protocol Adapter
   V2 IPC Protocol Adapter
   V2 TCP/IP Protocol Adapter
   V2 RAW Protocol Adapter

Installed SQL*Net V2 Naming Adapters are:

   Error!!!  V2 Oracle TNS Naming Adapter not completely installed!
   Adapter present in libsqlnet.a, but missing from nnfgt.o...
   Error!!!  V2 Oracle Naming Adapter not completely installed!
   Adapter present in libsqlnet.a, but missing from nnfgt.o...
   Error!!!  V2 NIS Naming Adapter not completely installed!
   Adapter present in libsqlnet.a, but missing from nnfgt.o...

Installed network security products are:

2. lsnrctl service


LSNRCTL for Solaris: Version 2.3.3.0.0 - Production on 16-SEP-03 00:23:08

Copyright (c) Oracle Corporation 1994.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=7301)(HOST=현재서버IP))
TNS-12224: TNS:no listener
 TNS-12541: TNS:no listener
  TNS-12560: TNS:protocol adapter error
   TNS-00511: No listener
    Solaris Error: 146: Connection refused


3. lsnrctl stat


LSNRCTL for Solaris: Version 2.3.3.0.0 - Production on 16-SEP-03 00:25:12

Copyright (c) Oracle Corporation 1994.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=7301)(HOST=현재서버IP))
TNS-12224: TNS:no listener
 TNS-12541: TNS:no listener
  TNS-12560: TNS:protocol adapter error
   TNS-00511: No listener
    Solaris Error: 146: Connection refused

위의 3가지를 테스트 해 보았는데..
무슨 문제가 있긴 있나 봅니다.
원격지의 오라클서버와 클라이언트인 현 서버에서 무엇인가 문제가 있는데..
설정이 잘못된 것인지..

좀 더 찾아봐야 겠습니다.

그럼.

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

supersky의 이미지

오래전에 했던거라 역시 기억이 잘 나지 않는군요.. ^^
저보다 잘 하시는분이 리플달았으면 좋겠는데~~~~

저의 생각입니다만 확실히 설정이 잘못된것 같습니다.

서버동작은 정상적으로 하는건 확실한가요?
# ps -ef 하면 오라클관련 프로세서가 떠 있으면 정상임.

제가 참고할만한 URL알려드리니깐요. 거기가서 메뉴얼을 한번 보시고 설정을 하시는것이 좋을듯합니다.

http://otn.oracle.co.kr/docs/index.jsp

그럼...

void main()
{
printf("Hello World\n");
exit(0);
}
/* 초심으로 돌아가자~~~~~ */

offree의 이미지

저도 뭔가 설정이 잘못된것 같긴해요..

좀더 살펴 봐야 겠습니다.

감사~~

supersky wrote:

저의 생각입니다만 확실히 설정이 잘못된것 같습니다.

서버동작은 정상적으로 하는건 확실한가요?
# ps -ef 하면 오라클관련 프로세서가 떠 있으면 정상임.

http://otn.oracle.co.kr/docs/index.jsp

사용자가 바꾸어 나가자!!

= about me =
http://wiki.kldp.org/wiki.php/offree , DeVlog , google talk : offree at gmail.com

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.