PHP 설치하는 방법을 알고 싶습니다.

dgkim의 이미지

저는 Apache와 PHP를 주로 컴파일해서 설치하는 방법을 사용해 왔습니다.

apache의 경우는 configure 옵션을 복잡하게 주지 않고, --enable-shared=max 만 사용합니다.

php의 경우도 마찬가지로 configure 과정을 사용하지만...

기능이 더 필요할 때 컴파일 하는 것이 불편한 것 같습니다.

그래서 좀더 편리한 방법으로 기능을 추가할 수 있는 방법을 알고 싶습니다.
(RPM으로 패키징해 나오는 것이 있는 것으로 봐서, 뭔가 방법이 있을 것 같아서)

아래는 현재 제가 최근 configure한 상태입니다.
'./configure' '--with-apxs2' '--with-config-file-path=/usr/local/apache2/conf' '--with-openssl' '--enable-ftp' '--with-gd' '--with-gettext' '--with-iconv' '--with-ldap' '--with-xml' '--with-dom' '--with-zlib' '--enable-mbstring=all' '--enable-mbregex' '--enable-mbstr-enc-trans' '--with-png' '--with-jpeg' '--with-mime-magic' '--with-mysql=/usr/local' '--with-imap' '--with-imap-ssl' '--with-kerberos'
IMAP을 추가하면서, 컴파일을 새로하게 된 것이지요..

feanor의 이미지

새 모듈을 추가하실 때마다 --with-xxx 옵션을 줘서 다시 컴파일하실 필요 없습니다.

예를 들어, --with-ldap 없이 컴파일한 PHP에 ldap.so를 추가하려고 한다면, 같은 버전의 PHP 소스를 받아서

$ cd ext/ldap
$ phpize

를 실행합니다. Configuring for: ... 하면서 PHP API 버전이 나오고요, 그 다음에는

$ ./configure
$ make
$ make install

하시면 됩니다.

--feanor

kfmes의 이미지

feanor님 감사합니다 :oops:

----------------------------------------

dgkim의 이미지

feanor wrote:
새 모듈을 추가하실 때마다 --with-xxx 옵션을 줘서 다시 컴파일하실 필요 없습니다.

예를 들어, --with-ldap 없이 컴파일한 PHP에 ldap.so를 추가하려고 한다면, 같은 버전의 PHP 소스를 받아서

$ cd ext/ldap
$ phpize

를 실행합니다. Configuring for: ... 하면서 PHP API 버전이 나오고요, 그 다음에는

$ ./configure
$ make
$ make install

하시면 됩니다.

--feanor


제가 지식이 짧은지라 더 여쭙겠습니다.

make install까지 잘 되는 듯 합니다만..

더 손댈 것은 없는 것인가요?

방금 mhash를 설치했습니다.

그리고 phpinfo();를 확인해서는 확인이 되지 않기에..
(mhash가 phpinfo()로 확인가능한지도 모릅니다만...)

feanor의 이미지

make install 다음에는 php.ini 에 extension=name.so 줄을 추가해주고 아파치를 재시작하면 phpinfo() 에서 확인이 될 것입니다.

--feanor

dgkim의 이미지

feanor wrote:
make install 다음에는 php.ini 에 extension=name.so 줄을 추가해주고 아파치를 재시작하면 phpinfo() 에서 확인이 될 것입니다.

--feanor


예.. 잘 되내요..

extension_dir을 설정할 줄 몰라서, 절대 경로로 했다는 것을 제외하면....

mHash 설치성공

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.