- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
编译模块:切换到ext模块目录:* `9 d7 B3 ^) e2 i8 z1 y) P
cd /usr/src/php-8.3.1/ext/mysqli1 P/ k5 [4 v* z# B p5 a- x
切换到myqlli目录:
; `: |9 ]1 n0 z7 X' B! k7 L7 C: E' ]+ [. T: I
# Q/ P7 X, b G n$ `- E执行:
* X" D1 g4 @. j) M* M* [/usr/local/php/bin/phpize 9 m$ g5 V$ ?# S1 H
Configuring for:
1 {' E# h( {! ^, o1 k% ^PHP Api Version: 202308311 ?- I& T$ [! [# s) E) N7 I
Zend Module Api No: 20230831
+ D6 r( v( z* u3 Q( a- mZend Extension Api No: 420230831
0 X: p' b1 Z& W7 R9 { V9 f, D: Y
1 ^0 H I9 l$ @, Y/ n8 h* O要检查config.m4文件 没有就复制一个吧:
# ?( g8 K, q& U) y
! z2 ?1 b8 F7 O! V9 \7 j* P e$ {5 @+ F- @% Y
通过configure配置php:* l0 M# |6 n% w% V! [. f$ n
./configure --with-php-config=/usr/local/php/bin/php-config8 n: m. |, g! t W k6 s+ u: y1 i
; P3 Q1 ^& j/ |7 @# C* U
编译并安装:: X9 Q' M# R% W m6 s. g
make && make install 0 b( l/ n# Y; M' T3 o9 I+ H
2 D$ g. c; o: V5 x6 P/bin/sh /usr/src/php-8.3.1/ext/mysqli/libtool --mode=link cc -shared -I/usr/src/php-8.3.1/ext/mysqli/include -I/usr/src/php-8.3.1/ext/mysqli/main -I/usr/src/php-8.3.1/ext/mysqli -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o mysqli.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php-8.3.1/ext/mysqli/modules mysqli.lo mysqli_api.lo mysqli_prop.lo mysqli_nonapi.lo mysqli_report.lo mysqli_driver.lo mysqli_warning.lo mysqli_exception.lo mysqli_result_iterator.lo 7 _3 B8 ]% e4 _- |/ _
cc -shared .libs/mysqli.o .libs/mysqli_api.o .libs/mysqli_prop.o .libs/mysqli_nonapi.o .libs/mysqli_report.o .libs/mysqli_driver.o .libs/mysqli_warning.o .libs/mysqli_exception.o .libs/mysqli_result_iterator.o -Wl,-soname -Wl,mysqli.so -o .libs/mysqli.so
2 [, ^. [( z# t& X6 Dcreating mysqli.la
# v+ ~3 ~" n- \/ F. s(cd .libs && rm -f mysqli.la && ln -s ../mysqli.la mysqli.la)
: z" Q7 v3 N0 g9 }/bin/sh /usr/src/php-8.3.1/ext/mysqli/libtool --mode=install cp ./mysqli.la /usr/src/php-8.3.1/ext/mysqli/modules) M S; d% P, }+ Y
cp ./.libs/mysqli.so /usr/src/php-8.3.1/ext/mysqli/modules/mysqli.so
' S9 X; s5 e+ D2 Q8 y! u7 Ccp ./.libs/mysqli.lai /usr/src/php-8.3.1/ext/mysqli/modules/mysqli.la
* H! ^- G# X6 p) u* I- o6 OPATH="$PATH:/sbin" ldconfig -n /usr/src/php-8.3.1/ext/mysqli/modules4 X" K( ?8 _' h9 n; G# `% s
----------------------------------------------------------------------" | E+ [9 x) {7 X
Libraries have been installed in:
: K" P/ L4 H4 b: t. v U /usr/src/php-8.3.1/ext/mysqli/modules
5 {. H, I' M( I7 T! \* x0 x8 A; o! J0 `, f+ N: x
If you ever happen to want to link against installed libraries
8 v# G( N: T& A. bin a given directory, LIBDIR, you must either use libtool, and$ l% a0 S6 V$ L& T; g
specify the full pathname of the library, or use the `-LLIBDIR'. k# u: }' _. x" F& ^
flag during linking and do at least one of the following:
1 j; p: C9 `( S( L3 m. y m0 ~: b - add LIBDIR to the `LD_LIBRARY_PATH' environment variable# x" I6 M; z; S3 @* f( M
during execution
; W. |5 X/ r. ^! A9 Y' T - add LIBDIR to the `LD_RUN_PATH' environment variable
) S+ T( }6 {2 z/ J1 f7 L4 i. ^! _% O1 M during linking3 i8 G. q4 o9 ?" Z) d8 G$ q- b; Q
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
9 @; |+ b1 X' _ - have your system administrator add LIBDIR to `/etc/ld.so.conf'
) V4 C5 F- @; h. k- T, w+ d$ X* v& @4 C+ r, I
See any operating system documentation about shared libraries for
0 d7 R* ^9 i$ ?. Zmore information, such as the ld(1) and ld.so(8) manual pages.# W f' d f" h& z o
----------------------------------------------------------------------4 @. U0 |3 V3 F+ A0 W1 d7 E
* e% @/ B( U& y& i3 z( I) C: z) aBuild complete.% w9 {% t' ]/ _( L3 K
Don't forget to run 'make test'.8 [) T& f; o3 r) M# B
7 q& h, `% |. RInstalling shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20230831/. F5 H7 ^5 b* w$ @8 A. r9 _
Installing header files: /usr/local/php/include/php/
/ m4 K! p! f* F$ |9 n5 n; S8 Z$ x5 y" D- S, c# t+ v; R l
去对应的目录检查文件:
8 R! j4 R8 P( K& G7 d$ ~
& c% o& I8 r' w ~. V6 X[root@ipam2 no-debug-zts-20230831]# ls4 i& R& h' [6 l. L
mysqli.so; D6 h# _3 p, e
+ w4 V# j' u+ A: `
/ j% I* x M) p7 U" @9 J |
|