下载相关资源

首先,请下载PDO_PGSQL及pq两个扩展包源码。
PDO_PGSQL

pq

我下的是:

请上传到centos服务器。

上传完毕。

解压及编译

解压后,分别编译扩展。
编译pq扩展
步骤如下:

注意,使用phpize的时候需要到扩展根目录用,否则会出现上图的提醒。

设定需要编译的php config路径,注意我的php config在:

/usr/bin/php-config

请根据实际选用路径。

./configure --with-php-config=/usr/bin/php-config


错误,需要指定pg_config才行。
注意,我的机器pg config在:请自行替换路径

./configure --with-pgsql=/usr/pgsql-9.6/bin/pg_config --with-php-config=/usr/bin/php-config

还是错误,查找原因得知:
https://stackoverflow.com/questions/4293111/postgresql-pg-config-bash-pg-config-command-not-found


up vote
13
down vote
favorite
I'm on a Mac building an app in Rails 3 with PostgreSQL...PostgreSQL is working fine but in the command line I get the following error:$ pg_config
-bash: pg_config: command not found
Anyone know how to get this setup so I can run pg_config?Thanksbash unix postgresql shell path
shareimprove this question
edited Nov 27 '10 at 19:25jira
2,662920
asked Nov 27 '10 at 18:08AnApprentice
27k114398725
add a comment
5 Answers
active oldest votes
up vote
38
down vote
accepted
you can install postgresql-devel to get that. in rpm based distroyum install postgresql-devel
will workor useyum provides "*/pg_config"
to get the exact packageshareimprove this answer
answered Nov 27 '10 at 22:05Unni
7631612
3
For those who find this answer, this program is now part of the package libpq-dev – Walt W Sep 27 '11 at 20:04
3
on Ubuntu: sudo apt-get install libpq-dev – tflutre Nov 25 '11 at 18:57
2
For those who find this answer, I still found this program in postgresql-devel in the CentOS Updates repo with CentOS 5.5 – MattSayar Jul 26 '12 at 22:34
2
Find it finally, thank you. I'm on CentOS and after yum provides I run: python26 setup.py install build_ext --pg-config /usr/pgsql-9.2/bin/pg_config to run on python 2.6 / postgre 9.2 – chirale Mar 25 '13 at 15:48
2
+1 for mentioning "provides" – Christian Oct 3 '14 at 12:48
show 1 more commentup vote
2
down vote
My problem was that pg_config was not in the PATH. So, I first needed to search for pg_config's path by usingyum provides "*/pg_config"
After noting the path, I used this command to install pg gemgem install pg -- --with-pg-config=/usr/pgsql-9.4/bin/pg_config
That installed pg successfully. The system was a CentOS.shareimprove this answer
answered Apr 14 '16 at 15:46Anwar
6051120Confirmed with Fedora 24: dnf install postgresql-devel gem install pg -- --with-pg-config=/usr/pgsql-9.4/bin/pg_config – amoyer Jun 30 '16 at 2:51
add a comment
up vote
1
down vote
In addition to installing postgresql-devel I had to modify the PATH environment variable. E.g. add this to your .bashrc:export PATH="$PATH:/usr/pgsql-9.4/bin"
shareimprove this answer
answered Oct 27 '16 at 9:57dimid
2,5691741
add a comment
up vote
0
down vote
pg_config comes with the development files for PostgreSQL. Go to where you got the server daemon from and look for them there.shareimprove this answer
answered Nov 27 '10 at 19:29Ignacio Vazquez-Abrams
482k748681006
add a comment
up vote
0
down vote
i have a CentOS 5.11 with postgres 9.0, and python 2.4 , python 2.6 to run openERP 6, trying to install the psycopg2 i allways get the error:# python26 setup.py install --with-xslt-config=/usr/local/bin/xslt-config --with-xml2-config=/usr/local/bin/xml2-config
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]or: setup.py --help [cmd1 cmd2 ...]or: setup.py --help-commandsor: setup.py cmd --helperror: option --with-xslt-config not recognized
from :how to install pg_config Later i do :yum provides "*/pg_config"
i get a list, where we can findpostgresql84-devel-8.4.20-1.el5_10.x86_64 : PostgreSQL development header     files: and libraries
Repo        : base
Matched from:
Filename    : /usr/bin/pg_config
but if i try to install, its already installed So i useyum provides "*/pg_config"
later you need install the rigth vertion, for your architecture(32bit or 64bit), in my case was:yum install postgresql84-devel-8.4.20-1.el5_10.x86_64
then updateyum update
and finally install psycopg2 with pippip install psycopg2

好了,执行:

export PATH="$PATH:/usr/pgsql-9.6/bin"
然后继续执行:
./configure  --with-php-config=/usr/bin/php-config

出现:

raphf扩展的编译安装

到:
raphf
下载安装包,然后解压编译。

打开目录

执行:
phpize
执行:
./configure  --with-php-config=/usr/bin/php-config

结果如下:

没有问题,那么正式编译

make && make install

如图:

莫名其妙的错误,解决方案:

centos编译yaf时make出错

执行:
yum install pcre-dev
还是报错,找到了说法:

[Unknown type name ‘zend_string’

](https://stackoverflow.com/questions/34264584/unknown-type-name-zend-string)

I am trying to compile APCu cache extension using make && make install.I get a compilation error regarding not being able to find zend_string or zend_long. Do you guys know what extension I would need for these?APCuThanks :)php makefile apc php-5.6
share
edited Dec 14 '15 at 13:57Machavity
20.8k133964
asked Dec 14 '15 at 10:22Kal
94711743Nevermind got it from pecl instead pecl install APCu-4.0.10. – Kal Dec 14 '15 at 10:32
1
Those are PHP 7 type names. You're not using the right version of the extension. – Andrea Dec 14 '15 at 20:33Yeah realized it should be version 4.0.10. Thank. Answer is and I'll accept :) – Kal Dec 20 '15 at 12:13
add a comment
2 Answers
active oldest votes
up vote
3
down vote
accepted
Those types only exist in PHP 7/Zend Engine 3. You need the PHP 5 version of the extension.share
answered Dec 20 '15 at 16:43Andrea
10.1k22150see dependencies pecl.php.net/package/APCu for compatible versions – Stuart Cardall Jan 26 '16 at 12:46
add a commentup vote
1
down vote
I try to run:./configure --with-php-config=/usr/local/php7/bin/php-config
replace./configure
Success.share

还是外国的网站全一点,意思是这个版本的扩展可能是针对php7的,需要找一个适合php5的扩展。
请回到
http://pecl.php.net/package/raphf
然后下载1.1.2的版本,2.0以上版本是php7的。

打开目录,
运行
phpize
运行
./configure --with-php-config=/usr/local/php7/bin/php-config
运行
make && make install
成功。

好了,现在这样就是编译成功了,那么我们编译的so文件在哪里???

在两个地方都有,不过我们当然用的是:

/usr/lib64/php/modules/raphf.so

这个文件了。

-- 打开配置文件
vi /etc/php.ini
-- 加入扩展
编辑/etc/php.ini文件加入配置项
extension=raphf.so

就是这样

然后重启php-fpm

systemctl restart php-fpm

pq扩展的编译安装

还记得我们的目的吗?我们是要编译pq的。
那么,返回pq的目录然后执行:

phpize
运行
./configure --with-php-config=/usr/local/php7/bin/php-config
运行
make && make install

然而到了最后一步出现了错误:

zend_string 只有php7才有,那么我们采用的版本可能太新了。

回到http://pecl.php.net/package/pq然后看到:

所有只能用版本1.0以上

然后重复扩展的编译过程

phpize
运行
./configure --with-php-config=/usr/local/php7/bin/php-config
运行
make && make install

成功,然后看看是不是生成so文件了:

done
-- 打开配置文件
vi /etc/php.ini
-- 加入扩展
编辑/etc/php.ini文件加入配置项
extension=pq.so

重启:

systemctl restart php-fpm

编译PDO_PGSQL扩展

打开目录,执行:

phpize
运行
./configure --with-php-config=/usr/local/php7/bin/php-config
运行
make && make install

到config的时候出现错误:

解决方案
stackoverflow


up vote
29
down vote
If you use home brew, you can solve this with a command as simple as:brew install php55-pdo-pgsqlfor other php version, search with:brew search pgsqlshareimprove this answer
answered Sep 20 '15 at 3:19Daniel Cukier
4,19894588
1
This is the better answer (+1). The currently accepted answer suggests to use brew to install autoconf and then to compile PHP from source code. Which is unnecessary work, because you can directly install PostgreSQL, PHP and the phpXX-pdo-pgsql packages - all using brew for Mac OSX. – Alexander Farber Mar 12 '16 at 13:36 I tried this and the install is successful (I see pdo_pgsql in php -i) but I still get pg_connect() not found errors.. – Nic Cottrell May 30 '16 at 8:45
1
Actually, this is a better answer. Because almost all developers use some kind of packet manager these days. – Turdaliev Nursultan Nov 23 '16 at 12:38
add a comment
up vote
8
down vote
This worked for me with OSX 10.9.4 «Mavericks»Install sourcesDownload the PHP source code. Unlike on Mountain Lion, you don’t get any headers preinstalled to link against so need to put it in /usr/include/php. Mavericks ships with PHP 5.4.17, but the latest 5.4.x source from php.net should do:tar -jxvf php-5.4.20.tar.bz2
sudo mkdir -p /usr/include
sudo mv php-5.4.20 /usr/include/php
Configure PHPcd /usr/include/php
./configure --without-iconv
sudo cp /etc/php.ini.default /etc/php.ini
Building a moduleI needed the pdo_pgsql module - the same pattern should apply to just about any module assuming you have the necessary dependencies installed:cd ext/pdo_pgsql
In my case I had the following error:Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failedSo I had to use this command:brew install autoconf
Then:phpize
After that I tried to do: ./configurebut I had the next problem:checking for pg_config... not found configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation pathSo the solution was to specify correct PostgreSQL installation path:./configure --with-pdo-pgsql=/Library/PostgreSQL/9.3/
make
sudo make install
That copies pdo_pgsql.so to /usr/lib/php/extensions/no-debug-non-zts-20100525.Then simply addextension=pdo_pgsql.so to /etc/php.ini
Run php -m to confirm everything went to plan.shareimprove this answer
answered Aug 7 '14 at 20:26Jorge Casariego
11.2k44363
2
Your approach also works for Yosemite. The only caveats are: to use ./configure --with-pgsql=/usr/local/Cellar/postgresql/9.4.1/ in case of PHP 5.5.20; add extension=pgsql.so to /etc/php.ini (originally php.ini.default). – Igor de Lorenzi Jun 9 '15 at 17:53
add a comment
up vote
5
down vote
For those who installed php7/ngix/postgres with homebrewYou can install the PostgreSQL module with:brew install php70-pdo-pgsql
After that, you have to restart the php service:brew services restart php70
shareimprove this answer
answered Aug 14 '16 at 18:17ricardo
440721
add a comment
up vote
3
down vote
I killed the whole day trying to make it work on El Capitan after I made an upgrade yesterday and it turned out that I forgot to modify httpd.conf and change the path from the default php module (version 5.5.27) to the one I installed (version 5.6.14). This should be done in httpd.conf by modifying your default LoadModule php5_module path to LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so. Just decided to leave it here as the potential solution for those who upgrade their OS or just the PHP version and face the same problem.shareimprove this answer
answered Oct 11 '15 at 20:53ievgenii
12429
add a comment
up vote
3
down vote
OS X El Capitan users can simply upgrade their version of PHP 5.6. This is a one liner that will do that.curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6shareimprove this answer
answered Feb 1 '16 at 14:05Christopher Charles Gorman
391
add a comment
up vote
2
down vote
PostgreSQL by default is installed in a unusual place on MAC OS X:/Library/PostgreSQL/9.3
Given the location above you can type this:./configure --with-pgsql=/Library/PostgreSQL/9.3
shareimprove this answer
edited Mar 14 '14 at 14:46Brad Koch
8,14196286
answered Jan 22 '14 at 5:10YP Leung
13113
add a comment
up vote
2
down vote
For php56 via brew:brew install php56-pdo-pgsql
shareimprove this answer
answered Jun 9 '16 at 2:34ThangTD
52138
1
I'm on Sierra, and this didn't work for me. Install completed, but no pdo_pgsql appears in in phpinfo() – Black Nov 28 '16 at 4:08 Hi @Francis, did you check by php -i | grep pdo_pgsql in terminal ? Or restart your webserver to see in browser. Refer to my screen shot: prnt.sc/dcmkcp – ThangTD Nov 28 '16 at 4:11 Hi - found the issue. Sierra Server of course has at least two PHP instances with their own php.ini files; one in /private/etc and the other in /Applications/Server.app/Contents/ServerRoot/private/etc/php‌​.ini. Thanks – Black Nov 28 '16 at 4:44
1
Yeah, I intent to tell you to make sure whether php version and its location are correct. Better you should use php with homebrew, not the default one. Because its config will lose when you upgrade your MacOS – ThangTD Nov 28 '16 at 4:47
add a comment
up vote
0
down vote
For those of you having openssl error while make here is the solutionOSX uses openssl 0.98 while installer is searching for 1.0.0refer this link for instructionspsycopg2 installation error - Library not loaded: libssl.dylibshareimprove this answer
edited 2 days agoCommunity♦
11
answered Apr 18 '14 at 9:49Majky
749425
add a comment
up vote
0
down vote
I downloaded PostgreSQL for Mac, and used the stack builder after installation to standup the entire EnterpriseDB Apache/PHP stack end-to-end. I mention this as a possible time saving option, probably not ideal for all situations. Should work OK if the apache and postgres shipped with Mac OS X were never started.To keep existing apache hosted applications (i.e. pre-PostgreSQL install legacy) stable, I would just install the newer EnterpriseDB apache on port 81 (stackbuilder will prompt for new port if legacy apache instance is already running). Then, use mod_proxy in httpd.conf for the apache running on port 80 to provide seamless user experience to applications hosted on PostgreSQL.shareimprove this answer

重点在于:

需要将pgsql的路径传过去。
注意,网上一大堆解决方案谬论:
例如:

文章作者真的有试过吗??可行吗?

重新执行几个步骤,不同的是config的时候要带pgsql的路径:

phpize
运行
./configure  --with-pdo-pgsql=/usr/pgsql-9.6/  --with-php-config=/usr/bin/php-config
运行
make && make install

第二步config成功:

第三步编译成功

而且,生成so文件在:

/usr/lib64/php/modules/pdo_pgsql.so

那么,打开php.ini添加扩展,然后重启php。

-- 打开配置文件
vi /etc/php.ini
-- 加入扩展
编辑/etc/php.ini文件加入配置项
extension=pdo_pgsql.so

systemctl restart php-fpm

好了,运行phpinfo的页面看看扩展是不是生效了。

可惜的是,我只看到raphf生效,而pq和pdo那个没有踪影,查找解决方案:
pgsql-so-is-not-loaded-in-php

Ask Questionup vote
7
down vote
favorite
1
I've been tasked to create a PHP app which accesses an existing PostgreSQL database. This is my first time working with Postgre, not to mention the PHP has already been installed in the Linux box on which the app is supposed to run. I have no experience setting up this stuff, I just code.My question is that I can't seem to get the Postgre extension working in PHP. I checked the php.ini file, there were no "extension=..." lines. So I added "extension=pgsql.so". I then checked the "extension_dir" and found that there were only 2 files in there (ldap.so, phpcups.so), I added a pgsql.so file taken from another Linux box. I restarted httpd. And it does not work. I couldn't find any "pgsql" or "postgre" in phpinfo().Forgive my noobness. I know too little Linux. I would really appreciate it if you can point me to the right direction.I used the suggestion given by number5:Dude, I'm on RedHat. I used the "yum" version of the command you gave, and I got this:[root@perseus ~]# yum install php-pgsql Loading "installonlyn" plugin Setting up Install Process Setting up repositories Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=extras error was [Errno 4] IOError: Error: Cannot find a valid baseurl for repo: extrasUNFORTUNATELY, the Linux server I'm using is NOT connected to the Internet. Any other way to install?php apache php-extension
shareimprove this question
edited May 14 '10 at 8:47
asked May 14 '10 at 7:35Obay
1,43063760
1
That looks like a question for ServerFault. – Vladislav Rastrusny May 14 '10 at 8:22hope you already solved your problem. If not, you can download the required rpms and install using rpm command. wget mirrors.gigenet.com/centos/5.4/os/x86_64/CentOS/… wget mirrors.gigenet.com/centos/5.4/os/x86_64/CentOS/… rpm -ivh *.rpm if it tells you that some deps are missing, you can find it here mirrors.gigenet.com/centos/5.4/os/x86_64/CentOS the download link is assuming that your CentOS is 5.4 x86_64 – number5 May 16 '10 at 15:31thanks number5, super! – Obay May 17 '10 at 9:04
add a comment
4 Answers
active oldest votes
up vote
9
down vote
accepted
It depends on which Linux distro you are using.If you are using Ubuntu/Debian, you need to:sudo apt-get install php5-pgsql
Fedora/CentOSyum install php-pgsql
usually you can find out which distro you are on by:ls /etc/*-release
shareimprove this answer
answered May 14 '10 at 7:51number5
7,88413145Dude I added some comments above – Obay May 14 '10 at 8:05
add a comment
up vote
3
down vote
On CentOS extensions create separate *.ini file one per each php extension in /etc/php.dSo, don't alter main *.ini file, but create /etc/php.d/pgsql.ini and add there a lineextension=pgsql.so
Then you will need to restart Apache usingservice httpd restart
But the best automated way is to just typeyum install php-pgsql
In your case that didn't work because of some problems in yum configuration. Go to /etc/yum-repos.d Typenano /etc/yum.repos.d/CentOS-Base.repo
Scroll down to [extras] section and ensure it is like this:#additional packages that may be useful
[extras]
priority=1
name=CentOS-$releasever - Extras
=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Correct it if needed, save file (Ctrl-X) and do the following:yum clean all
yum upgrade
Afterwards try to repeatyum install php-pgsql
shareimprove this answer
answered May 14 '10 at 8:21Vladislav Rastrusny
18.8k1362131it says: Config Error: File contains parsing errors: file:/etc/yum.repos.d/CentOS-Base.repo [line 41]: '=extras\n' – Obay May 14 '10 at 8:33Who says? What's your CentOS version? May be, you should remove "priority" string? – Vladislav Rastrusny May 14 '10 at 11:21
add a comment
up vote
1
down vote
Remove the .so file you've copied from the other machine (though it might work, there's no need to take the risk)
Use the distribution's package manager to install the php_pgsql/php5_pqsql module
Restart the apache and try again. Maybe the module has been added to an .ini file automagically
If not, run <?php echo 'ini: ', get_cfg_var('cfg_file_path'); to see which php.ini you have to edit
edit this ini file
restart the apache
shareimprove this answer
answered May 14 '10 at 7:52VolkerK
76.3k13131196
add a comment
up vote
-2
down vote
My operation system Linux mint kde and there was same issuepg_connect()
You must install if you are use php5.6sudo apt-get install php5.6-pgsql
After you must change extention name in "php.ini" file.;extension=php_pgsql.dll
'dll' to 'so'For exampleextension=php_pgsql.so
shareimprove this answer
edited Jan 13 at 17:53
answered Jan 13 at 17:44Vugar Ahmedoglu
12
1
This seems like a different issue. For a start, the OP already had that config line exactly as written. – BoundaryImposition Jan 13 at 17:59
add a comment
Your Answer

centos下面安装php扩展的几种方法

https://my.oschina.net/u/2400083/blog/518195

Centos下,PHP有多种方式来安装拓展, 主要有 包管理式的yum安装、pecl安装, 以及底层的源码编译安装。包管理式的安装卸载尤为方便,而源码编译式的安装则方便参数调优。一般的搭建本机开发环境推荐包管理式的安装,节约时间。而线上部署环境则推荐编译安装, 方便调优。yum安装## yum方式安装能自动安装拓展的.so动态库,并配置好php.ini# 如安装mysql拓展
yum search mysql|grep php  #我们搜索到拓展名为 php-mysql.x86_64
sudo yum install php-mysql  #这样php-mysql拓展便安装好了# 如果出现拓展版本和php版本冲突问题, 可安装如下任意yum源:
sudo yum install atomic-release.noarch
sudo yum install webtatic-release.noarch
# 这些源提供了其他版本的php拓展,同时每个源针对特定拓展都会提供多个版本,你只需安装一个源即可。如:
atomic源下能搜索到5.4版的mysql拓展  atomic-php54-php-mysql.x86_64
webtatic源下能搜索到5.5版本的mysql拓展 php55w-mysql.x86_64pecl安装# 我们需要先从pear官网下载 go-pear 工具
# 这个工具将帮我们同时安装 pecl包管理器(管理php的C拓展) pear包管理器(管理php类库)
wget http://pear.php.net/go-pear.phar# 安装工具
# 安装过程除非特别指定,否则默认将工具安装到 /home/用户名/pear/bin 目录下
php go-pear.phar# 将工具目录添加到环境变量中
# 编辑/etc/profile 追加一行配置
export PATH=$PATH:/home/用户名/pear/bin# 加载环境配置
source /etc/profile# 配置工具的php_ini选项,这样安装拓展时pecl工具就能帮我们自动配置php.ini文件了
# vim /home/用户名/pear/share/pear/PEAR/Config.php
# 搜索php_ini, default键修改为你的php.ini文件路径:'php_ini' => array('type' => 'file','default' => '/etc/php.ini','doc' => 'location of php.ini in which to enable PECL extensions on install','prompt' => 'php.ini location','group' => 'File Locations (Advanced)',),
#确认一下,配置起效
pecl config-get php_ini  #配置成功将显示 /etc/php.ini# 搜索mysql拓展
pecl search mysql
# 这时一般会提示我们更新工具, 则我们依据提示进行更新
sudo pecl channel-update pecl.php.net
# 再次搜索mysql拓展, 成功
pecl search mysql# 安装拓展
pecl install  mysql源码编译安装# 以安装phpredis拓展为例
git clone https://github.com/phpredis/phpredis.git  # 下载phpredis源码
cd phpredis/
phpize
./configure
make & make install
cp rpm/redis.ini /etc/php.d/redis.ini检查mysql拓展是否安装成功php -i | grep mysql
成功安装后上面命令将显示一个节区的mysql拓展状态信息。但拓展加载到运行环境中还需要你重启 web服务 亦或是 php-fpm

根据上面的完全不行,然而,我们打开php -v可以看到:

解决方案:

undefined-symbol-php_json_decode_ex-in-unknown-on-line-0-solr-so-in-ubuntu

undefined symbol: php_json_decode_ex in Unknown on line 0 – Solr.so in Ubuntu
November 6, 2014
Make you sure that this line comes before your newly added extension in php.iniextension=json.so
then add your extensionextension=xyz.so

由此可知,可能是插件加载顺序的问题,那么先加载json.so

看到pdo这个前缀,不如也将pdo.so加到前面去。

正常运行,不过说已经加载了。。。算了,可以运行就好了。

正式配置完毕

后续补充

pg_connect依然无法使用,就是说,还有一个模块pgsql没有配置,根据网上说法:

上周博主在这篇文章中介绍了php采集,http://www.sijitao.net/1511.html。PHP+PostgreSQL的环境配置其实也不顺利。首先我在系统中安装了PostgreSQL数据库,用EnterpriseDB包。然后重新编译PHP,在编译中加入--with-pgsql=路径。可是编译后发现还是没有加载php_pgsql扩展。继续google,我后来也使用过yum install php-pgsql命令安装扩展,但是结果还是一样。不过功夫不负有心人,问题最后终于还是解决了。先从http://rpmfind.net/linux/RPM/index.html这个站点分别下载了“php53-common-5.3.3-21.el5.i386.rpm”、“php53-pdo-5.3.3-21.el5.i386.rpm”和“php53-pgsql-5.3.3-21.el5.i386.rpm”三个安装包,分别安装。安装成功后会在/usr/lib/php/modules/目录下生成pgsql.so等扩展。php_postgresql_1然后在扩展目录下新建pgsql.so和pdo_pgsql.so链接。最后修改配置文件,在扩展中加入pgsql.so,重启php。php_postgresql_2使用phpinfo查看,发现pgsql扩展已经安装成功,贴上成功图。php_postgresql_3

1、找到php common,编译安装:

http://www.rpmfind.net/linux/rpm2html/search.php?query=php-common%28x86-64%29&submit=Search+…&system=&arch=
注意:
我这里使用的是:

连接是:
ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/php-common-5.4.16-42.el7.x86_64.rpm

执行:

wget ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/php-common-5.4.16-42.el7.x86_64.rpm

当然,你也可以这样子下载下来然后上传到服务器

安装

rpm -ivh php-common-5.4.16-42.el7.x86_64.rpm

问题如下:

好了,根据百度的结果:
这里写链接内容

yum install libzip

安装完毕。继续:

rpm -ivh php-common-5.4.16-42.el7.x86_64.rpm

我这边的同样的库已经装过了,而且版本更新,就不需要安装这个php common了。

centos7下面php5.6添加postgresql相关扩展【试行】相关推荐

  1. 找对业务G点, 体验酸爽 - PostgreSQL内核扩展指南

    通用数据库就像带装修的房子一样,如果按数据库的功能划分,可以分为豪华装修.精装.简装. PostgreSQL从SQL兼容性.功能.性能.稳定性等方面综合评价的话,绝对算得上豪华装修级别的,用户拎包入住 ...

  2. 为PHP添加swoole异步并行扩展

    为PHP添加swoole异步并行扩展 1. 确认安装环境 仅支持Linux操作系统,核心代码兼容FreeBSD,需要调整某些编译的参数和细节才能通过 Linux内核版本2.3.32以上 PHP5.3. ...

  3. PHPWAMP安装Redis扩展的方式与相关扩展的下载

    PHPWAMP集成的PHP版本包含了nts与ts,目前最新版的站点管理已全部集成Redis扩展 修改phpwamp对应版本的php.ini文件,添加如下信息 [redis] ; php_redis e ...

  4. yum 安装php7和相关扩展

    [radhat yum 源] rpm -aq|grep yum|xargs rpm -e --nodeps wget http://mirrors.163.com/centos/6/os/x86_64 ...

  5. [OSG]OSG的相关扩展

    参考:osg官网 http://www.osgchina.org/index.php?view=article&id=176 http://trac.openscenegraph.org/pr ...

  6. win7 php mysql扩展名_win7下MySQL 5.1.73安装过程(图解)并在php.ini中启用相关扩展。...

    一.软件安装过程. 二.在php.ini中去掉以下代码前的分号,来启用相关扩展. extension=php_curl.dll extension=php_gd2.dll extension=php_ ...

  7. 台式电脑计算机能创建新磁盘吗,解决方案:如何添加硬盘以扩展台式计算机上的存储空间|如何对新添加的硬盘进行分区...

    ‍ 如果是家用计算机,许会选择台式计算机.随着使用期间存储量的不断增加,计算机系统中的可用空间也越来越少.在这种情况下,您可以在计算机上添加硬盘以扩展系统的磁盘容量.下面介绍如何向桌面添加硬盘驱动器以 ...

  8. centos7的php5.4竟然不支持原生的mysql

    2019独角兽企业重金招聘Python工程师标准>>> 公司的一些测试平台要搬迁,我就把原来centos6的测试平台迁移到cento7上, 原来的平台是: centos6 php5. ...

  9. chrome无法从该网站添加应用、扩展程序和用户脚本

    问题: 为chrome添加infinity插件时提示无法从该网站添加应用.扩展程序和用户脚本 解决方法: 1.在地址栏输入:chrome://flags/#extensions-on-chrome-u ...

最新文章

  1. 外贸常用术语_推荐必看!外贸、货代人订舱常用术语及订舱单中英对照!收藏备用...
  2. 【论文学习】高频分量有助解释卷积神经网络泛化 High-frequency Component Helps Explain the Generalization of CNN
  3. 不定字段数目的数据库表设计和数据结构
  4. android Animator详解
  5. ajax实现表单验证 html,Ajax+ajax做的表单验证
  6. sql server存储过程中解决单引号的问题
  7. 【jQuery】jQuery对本地json的读取和遍历
  8. 微服务升级_SpringCloud Alibaba工作笔记0027---Nacos集群配置上
  9. MaterialImageLoading
  10. 微信开放平台申请方法与用途
  11. 拉普拉斯(Laplace)变换——自控笔记系列(一)
  12. 免费网站(视频,PPT,静态图片,动态图片,壁纸)
  13. 如何改变图片容量大小不影响清晰度
  14. 利用Python和正则表达式验证hotmail邮箱的格式
  15. java工具类 文件zip压缩 base64 加密,base64解密 zip解压
  16. 冰羚Planned features.md翻译
  17. 如何把数据导入数据库
  18. 基于数据库的代码自动生成工具,生成JavaBean、生成数据库文档、生成前后端代码等(TableGo v7.4.0版)
  19. telnet不是内部或者外部命令也不是可运行的程序
  20. 2022国际数维杯C题思路

热门文章

  1. python爬取王者荣耀皮肤集
  2. MYOJ 的来源和现状
  3. 手把手教你训练自己的目标检测模型(SSD篇)
  4. 如何做好室内效果图蓝海创意云渲染
  5. 2023年第五届人工智能与机器学习国际会议(FAIML 2023)
  6. java dwg文件_Object java添加dwg文件问题
  7. Cris 玩转 Linux 之 Deepin 迁移全过程记录
  8. Linux手机蓝牙互传,Ubuntu和手机通过蓝牙互传文件[zt]
  9. html毕业论文的摘要,*毕业论文摘要怎么写 *毕业论文摘要范文参考
  10. 第三章,矩阵,06-初等变换与初等矩阵