php-7x phpize를 이용한 mysql 모듈 설치# Script/PHP2021. 7. 26. 10:14
Table of Contents
728x90
반응형
설치환경
[darksharavim.tistory.com] cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
php버전
[darksharavim.tistory.com] /usr/local/php7x/bin/php -v
PHP 7.0.19 (cli) (built: Jul 23 2021 14:25:39) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
mysql관련 모듈설치상태
[darksharavim.tistory.com] /usr/local/php7x/bin/php -m | grep mysql
mysqli
mysqlnd
pdo_mysql
ext폴더 확인시 mysql폴더 존재하지 않음.
별도 mysql 설치
[darksharavim.tistory.com] git clone https://github.com/php/pecl-database-mysql mysql --recursive
phpize이용해서 mysql 모듈 설치
[darksharavim.tistory.com] /usr/local/php7x/bin/phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
[darksharavim.tistory.com] ./configure --with-php-config=/usr/local/php7x/bin/php-config
[darksharavim.tistory.com] make && make install
Libraries have been installed in:
/usr/local/src/php-7.0.19/ext/mysql/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'.
Installing shared extensions: /usr/local/php7x/lib/php/extensions/no-debug-non-zts-20151012/
[darksharavim.tistory.com] ls -al /usr/local/php7x/lib/php/extensions/no-debug-non-zts-20151012/
합계 3048
drwxr-xr-x 2 root root 57 7월 26 10:08 .
drwxr-xr-x 3 root root 39 7월 23 14:28 ..
-rwxr-xr-x 1 root root 202368 7월 26 10:08 mysql.so
-rwxr-xr-x 1 root root 1986852 7월 23 14:28 opcache.a
-rwxr-xr-x 1 root root 925400 7월 23 14:28 opcache.so
정상적으로 설치완료
php.ini 추가
[mysql]
extension=mysql.so
설치된 mysql모듈확인
[darksharavim.tistory.com] ./php -m | grep sql
mysql
mysqli
mysqlnd
pdo_mysql
pdo_sqlite
sqlite3
728x90
반응형
'# Script > PHP' 카테고리의 다른 글
centos7x php7.3x 패키지 설치 (0) | 2022.05.31 |
---|---|
php-7x zend 설정 (0) | 2021.07.26 |
php 변수값 인코딩확인 mb_detect_encoding (0) | 2020.03.27 |
PHP Fatal error: Call to undefined function mb_strlen() in (0) | 2019.12.13 |
PHP에러 AH02429: Response header name 'P3P ' contains invalid characters, aborting request (0) | 2019.12.13 |
@다크쉐라빔 :: 다크쉐라빔의 주절주절
안녕하세요. 이곳은 IT위주의 잡다한 정보를 올려두는 개인 블로그입니다.
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!