728x90
PHP 7.X 버전에서 몽고DB 연동(확장 프로그램 설치)
$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver/
$ git submodule update --init
$ /usr/local/php/bin/phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make all
$ make install
--output--
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/mongo-php-driver/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/src/mongo-php-driver/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.
----------------------------------------------------------------------
Installing shared extensions: /usr/local/php/lib/php/extensions/debug-zts-20180731/
확장 프로그램 디렉토리 확인
/usr/local/php/bin/php -i
$ /usr/local/php/bin/php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
모듈 복사
$ cp /usr/local/src/mongo-php-driver/modules/mongodb.so /usr/lib64/php/modules/.
모듈 확인
$ /usr/local/php/bin/php -m | grep mongodb
mongodb
728x90
'기타' 카테고리의 다른 글
[리눅스] 취약점을 방지하기 위한 보안 HTTP 헤더를 설정하기 (0) | 2021.07.22 |
---|---|
[리눅스] MySQL 클라이언트 설치 (0) | 2021.07.22 |
[리눅스] PHP 7.X 버전에서 몽고DB 연동 (0) | 2021.07.16 |
[리눅스] OpenSSL로 파일을 암호화/복호화하기 (0) | 2021.07.05 |
[기타] Confluence 책갈피 생성(anchor) (0) | 2021.07.05 |
[리눅스] 로케일(locale) 변경(charset 변경) (0) | 2021.07.01 |