20130701

pdns-gui

PDNS-GUI (POWERDNS-GUI) INSTALL GUIDE Centos 5.x

설명드릴 PDNS-GUI는 pdns의  MYSQL backend를 기반으로 운영되는 gui 입니다.



1. Install Apache, PHP, MySQL and PowerDNS server 

 apache2 php5 php5-cli php5-mysql php5-xsl mysql-server pdns-server pdns-backend-mysql

1. apache2 설치
# yum install -y httpd
 Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
addons | 1.9 kB 00:00
base | 1.1 kB 00:00
boost-MIND | 1.2 kB 00:00
extras | 2.1 kB 00:00
lua-MIND | 1.2 kB 00:00
pdns-server-MIND | 1.2 kB 00:00
updates | 1.9 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.3-65.el5.centos.3 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================
Package Arch Version Repository Size
==============================================================================
Installing:
httpd x86_64 2.2.3-65.el5.centos.3 updates 1.3 M

Transaction Summary
==============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.3 M
Downloading Packages:
httpd-2.2.3-65.el5.centos.3.x86_64.rpm | 1.3 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : httpd 1/1

Installed:
httpd.x86_64 0:2.2.3-65.el5.centos.3

Complete!

2. php 설치
# yum install -y php

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.1.6-39.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php
--> Processing Dependency: php-cli = 5.1.6-39.el5_8 for package: php
--> Running transaction check
---> Package php-cli.x86_64 0:5.1.6-39.el5_8 set to be updated
---> Package php-common.x86_64 0:5.1.6-39.el5_8 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved

===============================================================================
Package Arch Version Repository Size
===============================================================================
Installing:
php x86_64 5.1.6-39.el5_8 updates 2.4 M
Installing for dependencies:
php-cli x86_64 5.1.6-39.el5_8 updates 2.2 M
php-common x86_64 5.1.6-39.el5_8 updates 154 k

Transaction Summary
================================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 4.7 M
Downloading Packages:
(1/3): php-common-5.1.6-39.el5_8.x86_64.rpm | 154 kB 00:00
(2/3): php-cli-5.1.6-39.el5_8.x86_64.rpm | 2.2 MB 00:00
(3/3): php-5.1.6-39.el5_8.x86_64.rpm | 2.4 MB 00:00
----------------------------------------------------------------------------------
Total 6.6 MB/s | 4.7 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common 1/3
Installing : php-cli 2/3
Installing : php 3/3

Installed:
php.x86_64 0:5.1.6-39.el5_8

Dependency Installed:
php-cli.x86_64 0:5.1.6-39.el5_8 php-common.x86_64 0:5.1.6-39.el5_8

Complete!

# yum install -y php-mysql
 Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.1.6-39.el5_8 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package php-pdo.x86_64 0:5.1.6-39.el5_8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-mysql x86_64 5.1.6-39.el5_8 updates 91 k
Installing for dependencies:
php-pdo x86_64 5.1.6-39.el5_8 updates 67 k

Transaction Summary
==================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 158 k
Downloading Packages:
(1/2): php-pdo-5.1.6-39.el5_8.x86_64.rpm | 67 kB 00:00
(2/2): php-mysql-5.1.6-39.el5_8.x86_64.rpm | 91 kB 00:00
------------------------------------------------------------------------------------
Total 1.8 MB/s | 158 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pdo 1/2
Installing : php-mysql 2/2

Installed:
php-mysql.x86_64 0:5.1.6-39.el5_8

Dependency Installed:
php-pdo.x86_64 0:5.1.6-39.el5_8

Complete!

에러 처리
 Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
#/usr/bin/mysqld_safe --user=mysql&
pdns-gui 다운로드 (3.3 버전은 실행시 에러남 3.2.로 받을것)

3. pdns-gui 설치
# /var/www/pdns-gui.0.3.2/batch/install.sh
[root@localhost batch]# ./install.sh

This script will install PowerDNS GUI on this server

*************** W A R N I N G !!! ******************
* *
* All existing data in Powerdns MySQL database *
* WILL BE LOST. *
* Make a backup copy before proceeding. *
* *
****************************************************

Press ENTER to continue Ctrl-C to abort...

Enter MySQL host name: localhost
Enter MySQL database name: powerdns
Enter MySQL user name: poweradmin
Enter MySQL password:
>> schema converting "/var/www/pdns-gui.0.3.2/config/schema.yml" to XML
>> schema putting /var/www/pdns-gui.0.3.2/config/generated-schema.xml
>> schema converting "/var/www/pdns-gui.0...lugin/config/schema.yml" to XML
>> schema putting /var/www/pdns-gui.0.3.2...-sfPropelAuditPlugin-schema.xml
>> file+ config/generated-sfPropelAuditPlugin-schema.xml
>> file- /var/www/pdns-gui.0.3.2/plugins...-sfPropelAuditPlugin-schema.xml
Buildfile: /var/www/pdns-gui.0.3.2/lib/symfony/vendor/propel-generator/build.xml
[resolvepath] Resolved /var/www/pdns-gui.0.3.2/config to /var/www/pdns-gui.0.3.2/config

propel-project-builder > check-project-or-dir-set:

propel-project-builder > check-project-set:

propel-project-builder > set-project-dir:

propel-project-builder > check-buildprops-exists:

propel-project-builder > check-buildprops-for-propel-gen:

propel-project-builder > check-buildprops:

propel-project-builder > configure:
[echo] Loading project-specific props from /var/www/pdns-gui.0.3.2/config/propel.ini
[property] Loading /var/www/pdns-gui.0.3.2/config/propel.ini

propel-project-builder > insert-sql:
[phing] Calling Buildfile '/var/www/pdns-gui.0.3.2/lib/symfony/vendor/propel-generator/build-propel.xml' with target 'insert-sql'
[property] Loading /var/www/pdns-gui.0.3.2/lib/symfony/vendor/propel-generator/./default.properties

propel > insert-sql:
[propel-sql-exec] Executing statements in file: /var/www/pdns-gui.0.3.2/data/sql/lib.model.schema.sql
[propel-sql-exec] Executing statements in file: /var/www/pdns-gui.0.3.2/data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql
[propel-sql-exec] Our new url -> mysql://poweradmin:team123@localhost/powerdns
[propel-sql-exec] Executing file: /var/www/pdns-gui.0.3.2/data/sql/lib.model.schema.sql
[propel-sql-exec] Executing file: /var/www/pdns-gui.0.3.2/data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql
[propel-sql-exec] 18 of 18 SQL statements executed successfully

BUILD FINISHED

Total time: 0.3501 seconds
>> file- /var/www/pdns-gui.0.3.2/config/generated-schema.xml
>> file- /var/www/pdns-gui.0.3.2/config/...-sfPropelAuditPlugin-schema.xml
>> chmod 777 /var/www/pdns-gui.0.3.2/cache
>> chmod 777 /var/www/pdns-gui.0.3.2/log
>> chmod 777 /var/www/pdns-gui.0.3.2/web/uploads
>> chmod 777 /var/www/pdns-gui.0.3.2/symfony
>> chmod 777 cache/frontend
>> chmod 777 cache/frontend/cli
>> chmod 777 cache/frontend/cli/config
>> chmod 666 cache/frontend/cli/config/config_app.yml.php
>> chmod 666 cache/frontend/cli/config/config_logging.yml.php
>> chmod 666 cache/frontend/cli/config/config_routing.yml.php
>> chmod 666 cache/frontend/cli/config/config_config_handlers.yml.php
>> chmod 666 cache/frontend/cli/config/config_autoload.yml.php
>> chmod 666 cache/frontend/cli/config/config_databases.yml.php
>> chmod 666 cache/frontend/cli/config/config_settings.yml.php
>> chmod 666 cache/frontend/cli/config/config_php.yml.php
>> chmod 777 web/uploads/assets
>> chmod 666 log/frontend_cli.log




Database initialized...


Now you need to edit your PowerDNS config file
(most likely /etc/powerdns/pdns.d/pdns.local)
to set correct DB connection details

Add the following to your Apache configuration:

------------------------------
<VirtualHost *:80>

DocumentRoot /var/www/pdns-gui.0.3.2/web

DirectoryIndex index.php

<Directory /var/www/pdns-gui.0.3.2/web>
AllowOverride All
</Directory>

< /VirtualHost>
------------------------------



And make sure 'mod_rewrite' is enabled.
* 위 스크립트 실행전에.. php.ini 에서 "allow_call_time_pass_reference = On"으로 변경할것

ruby 설치
#yum install -y ruby
 Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
No package runy available.
Nothing to do
[root@localhost www]# yum install -y ruby
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.8.5-24.el5 set to be updated
--> Processing Dependency: ruby-libs = 1.8.5-24.el5 for package: ruby
--> Processing Dependency: libruby.so.1.8()(64bit) for package: ruby
--> Running transaction check
---> Package ruby-libs.x86_64 0:1.8.5-24.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
Package Arch Version Repository Size
==================================================================================
Installing:
ruby x86_64 1.8.5-24.el5 base 277 k
Installing for dependencies:
ruby-libs x86_64 1.8.5-24.el5 base 1.6 M

Transaction Summary
===================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.9 M
Downloading Packages:
(1/2): ruby-1.8.5-24.el5.x86_64.rpm | 277 kB 00:00
(2/2): ruby-libs-1.8.5-24.el5.x86_64.rpm | 1.6 MB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.6 MB/s | 1.9 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-libs 1/2
Installing : ruby 2/2

Installed:
ruby.x86_64 0:1.8.5-24.el5

Dependency Installed:
ruby-libs.x86_64 0:1.8.5-24.el5

Complete!

# yum install -y ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc
 Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby-devel.i386 0:1.8.5-24.el5 set to be updated
--> Processing Dependency: libruby.so.1.8 for package: ruby-devel
---> Package ruby-devel.x86_64 0:1.8.5-24.el5 set to be updated
---> Package ruby-docs.x86_64 0:1.8.5-24.el5 set to be updated
---> Package ruby-irb.x86_64 0:1.8.5-24.el5 set to be updated
---> Package ruby-rdoc.x86_64 0:1.8.5-24.el5 set to be updated
---> Package ruby-ri.x86_64 0:1.8.5-24.el5 set to be updated
--> Running transaction check
---> Package ruby-libs.i386 0:1.8.5-24.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================
Package Arch Version Repository Size
==========================================================================
Installing:
ruby-devel i386 1.8.5-24.el5 base 558 k
ruby-devel x86_64 1.8.5-24.el5 base 566 k
ruby-docs x86_64 1.8.5-24.el5 base 1.4 M
ruby-irb x86_64 1.8.5-24.el5 base 70 k
ruby-rdoc x86_64 1.8.5-24.el5 base 136 k
ruby-ri x86_64 1.8.5-24.el5 base 1.7 M
Installing for dependencies:
ruby-libs i386 1.8.5-24.el5 base 1.6 M

Transaction Summary
============================================================================
Install 7 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 6.0 M
Downloading Packages:
(1/7): ruby-irb-1.8.5-24.el5.x86_64.rpm | 70 kB 00:00
(2/7): ruby-rdoc-1.8.5-24.el5.x86_64.rpm | 136 kB 00:00
(3/7): ruby-devel-1.8.5-24.el5.i386.rpm | 558 kB 00:00
(4/7): ruby-devel-1.8.5-24.el5.x86_64.rpm | 566 kB 00:00
(5/7): ruby-docs-1.8.5-24.el5.x86_64.rpm | 1.4 MB 00:00
(6/7): ruby-libs-1.8.5-24.el5.i386.rpm | 1.6 MB 00:00
(7/7): ruby-ri-1.8.5-24.el5.x86_64.rpm | 1.7 MB 00:00
----------------------------------------------------------------------------------
Total 3.5 MB/s | 6.0 MB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-irb 1/7
Installing : ruby-libs 2/7
Installing : ruby-rdoc 3/7
Installing : ruby-ri 4/7
Installing : ruby-devel 5/7
Installing : ruby-devel 6/7
Installing : ruby-docs 7/7

Installed:
ruby-devel.i386 0:1.8.5-24.el5 ruby-devel.x86_64 0:1.8.5-24.el5 ruby-docs.x86_64 0:1.8.5-24.el5
ruby-irb.x86_64 0:1.8.5-24.el5 ruby-rdoc.x86_64 0:1.8.5-24.el5 ruby-ri.x86_64 0:1.8.5-24.el5

Dependency Installed:
ruby-libs.i386 0:1.8.5-24.el5

# yum install -y gettext-devel
 Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gettext-devel.i386 0:0.17-1.el5 set to be updated
--> Processing Dependency: gettext = 0.17-1.el5 for package: gettext-devel
--> Processing Dependency: libgettextsrc-0.17.so for package: gettext-devel
--> Processing Dependency: libgettextlib-0.17.so for package: gettext-devel
---> Package gettext-devel.x86_64 0:0.17-1.el5 set to be updated
--> Running transaction check
---> Package gettext.i386 0:0.17-1.el5 set to be updated
--> Processing Dependency: libgomp.so.1 for package: gettext
--> Processing Dependency: libgomp.so.1(GOMP_1.0) for package: gettext
---> Package gettext.x86_64 0:0.17-1.el5 set to be updated
--> Running transaction check
---> Package libgomp.i386 0:4.4.6-3.el5.1 set to be updated
---> Package libgomp.x86_64 0:4.4.6-3.el5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================
Package Arch Version Repository Size
=====================================================================
Installing:
gettext-devel i386 0.17-1.el5 base 364 k
gettext-devel x86_64 0.17-1.el5 base 380 k
Installing for dependencies:
libgomp i386 4.4.6-3.el5.1 base 72 k
Updating for dependencies:
gettext i386 0.17-1.el5 base 2.4 M
gettext x86_64 0.17-1.el5 base 2.4 M
libgomp x86_64 4.4.6-3.el5.1 base 69 k

Transaction Summary
=======================================================================
Install 3 Package(s)
Update 3 Package(s)
Remove 0 Package(s)

Total download size: 5.7 M
Downloading Packages:
(1/6): libgomp-4.4.6-3.el5.1.x86_64.rpm | 69 kB 00:00
(2/6): libgomp-4.4.6-3.el5.1.i386.rpm | 72 kB 00:00
(3/6): gettext-devel-0.17-1.el5.i386.rpm | 364 kB 00:00
(4/6): gettext-devel-0.17-1.el5.x86_64.rpm | 380 kB 00:00
(5/6): gettext-0.17-1.el5.i386.rpm | 2.4 MB 00:00
(6/6): gettext-0.17-1.el5.x86_64.rpm | 2.4 MB 00:00
------------------------------------------------------------------------
Total 6.8 MB/s | 5.7 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libgomp 1/9
Updating : gettext 2/9
Installing : libgomp 3/9
Installing : gettext-devel 4/9
Updating : gettext 5/9
Installing : gettext-devel 6/9
Cleanup : libgomp 7/9
Cleanup : gettext 8/9
Cleanup : gettext 9/9

Installed:
gettext-devel.i386 0:0.17-1.el5 gettext-devel.x86_64 0:0.17-1.el5

Dependency Installed:
libgomp.i386 0:4.4.6-3.el5.1

Dependency Updated:
gettext.i386 0:0.17-1.el5 gettext.x86_64 0:0.17-1.el5 libgomp.x86_64 0:4.4.6-3.el5.1
httpd conf 수정
# vi /etc/httpd/httpd.conf
 AddType application/x-httpd-php .php .php3 .php4 .html .htm
AddType application/x-httpd-php-source .phps

< VirtualHost *:80>

DocumentRoot /var/www/pdns-gui.0.3.2/web

DirectoryIndex index.php

<Directory /var/www/pdns-gui.0.3.2/web>
AllowOverride All
</Directory>

< /VirtualHost>

php Jason 관련 error


json 설치
#pecl install json
 [root@localhost web]# pecl install json
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
downloading json-1.2.1.tgz ...
Starting to download json-1.2.1.tgz (17,780 bytes)
......done: 17,780 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
building in /var/tmp/pear-build-root/json-1.2.1
running: /tmp/tmp3NmJNv/json-1.2.1/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable JavaScript Object Serialization support... yes, shared
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 static flag -static works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=compile gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/utf8_to_utf16.c -o utf8_to_utf16.lo
mkdir .libs
gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/utf8_to_utf16.c -fPIC -DPIC -o .libs/utf8_to_utf16.o
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=compile gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/utf8_decode.c -o utf8_decode.lo
gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/utf8_decode.c -fPIC -DPIC -o .libs/utf8_decode.o
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=compile gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/JSON_parser.c -o JSON_parser.lo
gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/JSON_parser.c -fPIC -DPIC -o .libs/JSON_parser.o
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=compile gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/json.c -o json.lo
gcc -I. -I/tmp/tmp3NmJNv/json-1.2.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp3NmJNv/json-1.2.1/json.c -fPIC -DPIC -o .libs/json.o
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=link gcc -DPHP_ATOM_INC -I/var/tmp/pear-build-root/json-1.2.1/include -I/var/tmp/pear-build-root/json-1.2.1/main -I/tmp/tmp3NmJNv/json-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -o json.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/tmp/pear-build-root/json-1.2.1/modules utf8_to_utf16.lo utf8_decode.lo JSON_parser.lo json.lo
gcc -shared .libs/utf8_to_utf16.o .libs/utf8_decode.o .libs/JSON_parser.o .libs/json.o -Wl,-soname -Wl,json.so -o .libs/json.so
creating json.la
(cd .libs && rm -f json.la && ln -s ../json.la json.la)
/bin/sh /var/tmp/pear-build-root/json-1.2.1/libtool --mode=install cp ./json.la /var/tmp/pear-build-root/json-1.2.1/modules
cp ./.libs/json.so /var/tmp/pear-build-root/json-1.2.1/modules/json.so
cp ./.libs/json.lai /var/tmp/pear-build-root/json-1.2.1/modules/json.la
PATH="$PATH:/sbin" ldconfig -n /var/tmp/pear-build-root/json-1.2.1/modules
----------------------------------------------------------------------
Libraries have been installed in:
/var/tmp/pear-build-root/json-1.2.1/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

running: make INSTALL_ROOT="/var/tmp/pear-build-root/install-json-1.2.1" install
Installing shared extensions: /var/tmp/pear-build-root/install-json-1.2.1/usr/lib64/php/modules/
running: find "/var/tmp/pear-build-root/install-json-1.2.1" -ls
3312021 4 drwxr-xr-x 3 root root 4096 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1
3312048 4 drwxr-xr-x 3 root root 4096 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1/usr
3312049 4 drwxr-xr-x 3 root root 4096 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1/usr/lib64
3312050 4 drwxr-xr-x 3 root root 4096 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1/usr/lib64/php
3312051 4 drwxr-xr-x 2 root root 4096 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1/usr/lib64/php/modules
3312047 96 -rwxr-xr-x 1 root root 92886 Nov 21 09:17 /var/tmp/pear-build-root/install-json-1.2.1/usr/lib64/php/modules/json.so

Build process completed successfully
Installing '/var/tmp/pear-build-root/install-json-1.2.1//usr/lib64/php/modules/json.so'
install ok: channel://pear.php.net/json-1.2.1
json.ini 생성
 [root@localhost php.d]# vi /etc/php.d/json.ini
------ # so 등록 extension=json.so

-----

[root@localhost php.d]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ] 



** CentOS 6.x 에서 설치 방법 **

위.패키지를 el6으로 모두 설치 후 파일 받아서 설치


퍼미션 변경이 필요하니, 설치 중 확인 할것.


php.ini에서 아래 변경해 줄것. (페이지 500에서 나면)
* short_open_tag = on


*phpize 가 없을경우
# yum install php-devel


* pecl install json 실행시, config.m4 가 없다는 에러가 발생할 경우.
# /var/temp 에 가면. json-1.2.1.tgz 파일이 있는데. .압축을 풀고 나면.

config.m4 파일이 존재 할것임. 그곳에서

# /usr/bin/phpize 를 실행 후 ./configure && make 하면 됨.



http://blog.naver.com/OpenMagazineViewer.nhn?blogId=miniivy&logNo=60181462020&categoryNo=0&parentCategoryNo=88&viewDate=

댓글 없음:

Articles