"ZTS와 pthreads를 지원하는 PHP 컴파일 설치"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
6번째 줄: 6번째 줄:
==libxml2-devel 설치==
==libxml2-devel 설치==
* 아래에서 ./configure 수행시 이 패키지가 필요하므로 미리 설치한다.
* 아래에서 ./configure 수행시 이 패키지가 필요하므로 미리 설치한다.
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum install libxml2-devel
[root@zetawiki ~]# yum install libxml2-devel
====================================================================================
====================================================================================
23번째 줄: 23번째 줄:
Total download size: 1.8 M
Total download size: 1.8 M
Is this ok [y/N]: y
Is this ok [y/N]: y
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
... (생략)
... (생략)
Installed:
Installed:
30번째 줄: 30번째 줄:


Complete!
Complete!
</source>
</syntaxhighlight>


==준비==
==준비==
* http://php.net/downloads.php 에서 최신 버전 확인
* http://php.net/downloads.php 에서 최신 버전 확인
* 아래 명령어 작성
* 아래 명령어 작성
<source lang='bash'>
<syntaxhighlight lang='bash'>
VERSION=5.5.14
VERSION=5.5.14
cd /usr/local/src
cd /usr/local/src
45번째 줄: 45번째 줄:
make install
make install
cp php.ini-development /etc/php.ini
cp php.ini-development /etc/php.ini
</source>
</syntaxhighlight>


==실행==
==실행==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# VERSION=5.5.14
[root@zetawiki ~]# VERSION=5.5.14
[root@zetawiki ~]# cd /usr/local/src
[root@zetawiki ~]# cd /usr/local/src
59번째 줄: 59번째 줄:


2014-07-17 16:25:18 (4.72 MB/s) - “php-5.5.14.tar.gz” saved [17160225/17160225]
2014-07-17 16:25:18 (4.72 MB/s) - “php-5.5.14.tar.gz” saved [17160225/17160225]
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki src]# tar zxvf php-$VERSION.tar.gz
[root@zetawiki src]# tar zxvf php-$VERSION.tar.gz
... (생략)
... (생략)
66번째 줄: 66번째 줄:
php-5.5.14/README.EXT_SKEL
php-5.5.14/README.EXT_SKEL
php-5.5.14/UPGRADING
php-5.5.14/UPGRADING
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki src]# cd /usr/local/src/php-$VERSION
[root@zetawiki src]# cd /usr/local/src/php-$VERSION
[root@zetawiki php-5.5.14]# ./configure --prefix=/usr --with-config-file-path=/etc --enable-maintainer-zts
[root@zetawiki php-5.5.14]# ./configure --prefix=/usr --with-config-file-path=/etc --enable-maintainer-zts
74번째 줄: 74번째 줄:
config.status: creating main/php_config.h
config.status: creating main/php_config.h
config.status: executing default commands
config.status: executing default commands
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki php-5.5.14]# make
[root@zetawiki php-5.5.14]# make
... (생략)
... (생략)
83번째 줄: 83번째 줄:
Build complete.
Build complete.
Don't forget to run 'make test'.
Don't forget to run 'make test'.
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki php-5.5.14]# make install
[root@zetawiki php-5.5.14]# make install
Installing shared extensions:    /usr/lib/php/extensions/no-debug-zts-20121212/
Installing shared extensions:    /usr/lib/php/extensions/no-debug-zts-20121212/
95번째 줄: 95번째 줄:
ln -s -f /usr/bin/phar.phar /usr/bin/phar
ln -s -f /usr/bin/phar.phar /usr/bin/phar
Installing PDO headers:          /usr/include/php/ext/pdo/
Installing PDO headers:          /usr/include/php/ext/pdo/
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki php-5.5.14]# mv /etc/php.ini /etc/php.ini_20140717
[root@zetawiki php-5.5.14]# mv /etc/php.ini /etc/php.ini_20140717
[root@zetawiki php-5.5.14]# cp php.ini-development /etc/php.ini
[root@zetawiki php-5.5.14]# cp php.ini-development /etc/php.ini
</source>
</syntaxhighlight>


==참고==
==참고==

2020년 11월 2일 (월) 02:36 기준 최신판

1 개요[ | ]

Compiling PHP 5.5 with ZTS and pthreads Support
ZTS와 pthreads를 지원하는 PHP 컴파일 설치
  • ★★ (주의!) PHP를 컴파일 설치하면 패키지를 수동관리해야 하므로 매우 귀찮아질 수 있다…

2 libxml2-devel 설치[ | ]

  • 아래에서 ./configure 수행시 이 패키지가 필요하므로 미리 설치한다.
[root@zetawiki ~]# yum install libxml2-devel
====================================================================================
 Package              Arch          Version                    Repository      Size
====================================================================================
Installing:
 libxml2-devel        x86_64        2.7.6-14.el6_5.2           updates        1.1 M
Updating for dependencies:
 libxml2              x86_64        2.7.6-14.el6_5.2           updates        800 k

Transaction Summary
====================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 1.8 M
Is this ok [y/N]: y
... (생략)
Installed:
  libxml2.x86_64 0:2.7.6-14.el6_5.2     libxml2-devel.x86_64 0:2.7.6-14.el6_5.2    

Complete!

3 준비[ | ]

VERSION=5.5.14
cd /usr/local/src
wget http://www.php.net/distributions/php-$VERSION.tar.gz
tar zxvf php-$VERSION.tar.gz
cd /usr/local/src/php-$VERSION
./configure --prefix=/usr --with-config-file-path=/etc --enable-maintainer-zts
make
make install
cp php.ini-development /etc/php.ini

4 실행[ | ]

[root@zetawiki ~]# VERSION=5.5.14
[root@zetawiki ~]# cd /usr/local/src
[root@zetawiki src]# wget http://www.php.net/distributions/php-$VERSION.tar.gz
--2014-07-17 16:26:17--  http://www.php.net/distributions/php-5.5.14.tar.gz
... (생략)
Saving to: “php-5.5.14.tar.gz”

100%[==========================================>] 17,160,225  4.72M/s   in 3.5s    

2014-07-17 16:25:18 (4.72 MB/s) - “php-5.5.14.tar.gz” saved [17160225/17160225]
[root@zetawiki src]# tar zxvf php-$VERSION.tar.gz
... (생략)
php-5.5.14/server-tests.php
php-5.5.14/README.EXT_SKEL
php-5.5.14/UPGRADING
[root@zetawiki src]# cd /usr/local/src/php-$VERSION
[root@zetawiki php-5.5.14]# ./configure --prefix=/usr --with-config-file-path=/etc --enable-maintainer-zts
... (생략)
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@zetawiki php-5.5.14]# make
... (생략)
invertedregexiterator.inc
phar.inc

Build complete.
Don't forget to run 'make test'.
[root@zetawiki php-5.5.14]# make install
Installing shared extensions:     /usr/lib/php/extensions/no-debug-zts-20121212/
Installing PHP CLI binary:        /usr/bin/
Installing PHP CLI man page:      /usr/php/man/man1/
... (생략)
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.1
/usr/local/src/php-5.5.14/build/shtool install -c ext/phar/phar.phar /usr/bin
ln -s -f /usr/bin/phar.phar /usr/bin/phar
Installing PDO headers:          /usr/include/php/ext/pdo/
[root@zetawiki php-5.5.14]# mv /etc/php.ini /etc/php.ini_20140717
[root@zetawiki php-5.5.14]# cp php.ini-development /etc/php.ini

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}