linux php7 扩展,LINUX服务器给PHP7.2安装PGSQL扩展

1. [root@wehecshk /]# whereis phpize

phpize: /usr/bin/phpize

2. [root@wehecshk /]# usr/bin/phpize

Cannot find config.m4.

Make sure that you run 'usr/bin/phpize' in the top level source directory of the module

3. [root@wehecshk /]# cd www/server/php/72/src/ext/pgsql

4. [root@wehecshk pgsql]# /usr/bin/phpize

5. [root@wehecshk pgsql]# ./configure --with-php-config=/www/server/php/72/bin/php-config

......

checking for PostgreSQL support... yes, shared

checking for pg_config... not found

configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

6. [root@wehecshk pgsql]# yum -y install postgresql-devel

7. [root@wehecshk pgsql]# ./configure --with-php-config=/www/server/php/72/bin/php-config

......

creating libtool

appending configuration tag "CXX" to libtool

configure: creating ./config.status

config.status: creating config.h

8. [root@wehecshk pgsql]# make && make install

......

Libraries have been installed in:

/www/server/php/72/src/ext/pgsql/modules      #会有一个 pgsql.so文件

......

Build complete.

Don't forget to run 'make test'.

Installing shared extensions:     /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/

9. [root@wehecshk pgsql]# make test

10. vi /www/server/php/72/etc/php.ini

;PHP Support PGSQL

extension=pgsql.so

; disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,proc_open,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru

disable_functions = shell_exec, system, passthru, exec, popen

11. [root@wehecshk pgsql]# systemctl restart httpd

注意:最后重启php 与 apache

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值