Connecting to 192.168.1.201:22...

Connection established.

Escape character is '^@]'.

Last login: Sun Oct 9 18:32:58 2011 from 192.168.1.151

/usr/bin/xauth: creating new authority file /root/.Xauthority

[root@localhost ~]# ls

anaconda-ks.cfg Desktop install.log install.log.syslog

[root@localhost ~]# cd /u01/

[root@localhost u01]# ls

lost+found phpinstall redhat

[root@localhost u01]# cd phpinstall/

[root@localhost phpinstall]# wget http://pecl.php.net/get/zip-1.10.2.tgz

--2011-10-09 19:44:36-- http://pecl.php.net/get/zip-1.10.2.tgz

Resolving pecl.php.net... 76.75.200.106

Connecting to pecl.php.net|76.75.200.106|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 236912 (231K) [application/octet-stream]

Saving to: `zip-1.10.2.tgz'

100%[======================================>] 236,912 30.5K/s in 7.6s

2011-10-09 19:44:44 (30.4 KB/s) - `zip-1.10.2.tgz' saved [236912/236912]

[root@localhost phpinstall]# ls

package.xml phpinstall zip-1.10.2.tgz

[root@localhost phpinstall]# tar -zxvf zip-1.10.2.tgz

[root@localhost phpinstall]# cd zip-1.10.2

[root@localhost zip-1.10.2]# ls

config.m4 config.w32 CREDITS examples lib php_zip.c php_zip.h tests zip_stream.c

[root@localhost zip-1.10.2]# /usr/bin/phpize

Configuring for:

PHP Api Version: 20041225

Zend Module Api No: 20060613

Zend Extension Api No: 220060519

[root@localhost zip-1.10.2]# ls

acinclude.m4 config.guess configure examples Makefile.global php_zip.h

aclocal.m4 config.h.in configure.in install-sh missing run-tests.php

autom4te.cache config.m4 config.w32 lib mkinstalldirs tests

build config.sub CREDITS ltmain.sh php_zip.c zip_stream.c

[root@localhost zip-1.10.2]# ./configure --with-php-config=/usr/bin/php-config

checking for egrep... grep -E

checking for a sed that does not truncate output... /bin/sed

checking for cc... cc

.

.

.

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

[root@localhost zip-1.10.2]# ls

acinclude.m4 config.log config.w32 ltmain.sh modules

aclocal.m4 config.m4 CREDITS Makefile php_zip.c

autom4te.cache config.nice examples Makefile.fragments php_zip.h

build config.status include Makefile.global run-tests.php

config.guess config.sub install-sh Makefile.objects tests

config.h configure lib missing zip_stream.c

config.h.in configure.in libtool mkinstalldirs

[root@localhost zip-1.10.2]# make

/bin/sh /u01/phpinstall/zip-1.10.2/libtool --mode=compile cc -I. -I/u01/phpinstall/zip-1.10.2 -DPHP_ATOM_INC -I/u01/phpinstall/zip-1.10.2/include -I/u01/phpinstall/zip-1.10.2/main -I/u01/phpinstall/zip-1.10.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /u01/phpinstall/zip-1.10.2/php_zip.c -o php_zip.lo

mkdir .libs

cc -I. -I/u01/phpinstall/zip-1.10.2 -DPHP_ATOM_INC -I/u01/phpinstall/zip-1.10.2/include -I/u01/phpinstall/zip-1.10.2/main -I/u01/phpinstall/zip-1.10.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /u01/phpinstall/zip-1.10.2/php_zip.c -fPIC -DPIC -o .libs/php_zip.o

.

.

.

creating zip.la

(cd .libs && rm -f zip.la && ln -s ../zip.la zip.la)

/bin/sh /u01/phpinstall/zip-1.10.2/libtool --mode=install cp ./zip.la /u01/phpinstall/zip-1.10.2/modules

cp ./.libs/zip.so /u01/phpinstall/zip-1.10.2/modules/zip.so

cp ./.libs/zip.lai /u01/phpinstall/zip-1.10.2/modules/zip.la

PATH="$PATH:/sbin" ldconfig -n /u01/phpinstall/zip-1.10.2/modules


Libraries have been installed in:

/u01/phpinstall/zip-1.10.2/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.

Don't forget to run 'make test'.

[root@localhost zip-1.10.2]# ls

acinclude.m4 config.log config.w32 ltmain.sh modules zip_stream.c

aclocal.m4 config.m4 CREDITS Makefile php_zip.c zip_stream.lo

autom4te.cache config.nice examples Makefile.fragments php_zip.h

build config.status include Makefile.global php_zip.lo

config.guess config.sub install-sh Makefile.objects run-tests.php

config.h configure lib missing tests

config.h.in configure.in libtool mkinstalldirs zip.la

[root@localhost zip-1.10.2]# cd modules/

[root@localhost modules]# ls

zip.la zip.so

[root@localhost modules]# pwd

/u01/phpinstall/zip-1.10.2/modules

[root@localhost modules]# cd ../

[root@localhost zip-1.10.2]# ls

acinclude.m4 config.log config.w32 ltmain.sh modules zip_stream.c

aclocal.m4 config.m4 CREDITS Makefile php_zip.c zip_stream.lo

autom4te.cache config.nice examples Makefile.fragments php_zip.h

build config.status include Makefile.global php_zip.lo

config.guess config.sub install-sh Makefile.objects run-tests.php

config.h configure lib missing tests

config.h.in configure.in libtool mkinstalldirs zip.la

[root@localhost zip-1.10.2]# make install

Installing shared extensions: /usr/lib64/php/modules/

[root@localhost zip-1.10.2]# vi /etc/php.ini

增加 extension=zip.so

[root@localhost zip-1.10.2]# /etc/init.d/httpd restart

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

[root@localhost zip-1.10.2]# php -m

[PHP Modules]

bcmath

bz2

calendar

ctype

curl

date

dba

dbase

dom

exif

filter

ftp

gd

gettext

gmp

hash

iconv

json

libxml

mime_magic

openssl

pcntl

pcre

PDO

pdo_sqlite

posix

pspell

Reflection

session

shmop

SimpleXML

sockets

SPL

standard

sysvmsg

sysvsem

sysvshm

tokenizer

wddx

xml

xmlreader

xmlwriter

xsl

zip

zlib

[Zend Modules]

[root@localhost zip-1.10.2]#

最后编辑:2016年02月26日 ©著作权归作者所有

发表评论