Linux PHP extension installation process

Installation pdo_pgsql, pgsql extension

1. Go to the php source comes pgsql & pdo_pgsql source directory
cd /app/php-7.2.10/ext/pgsql/
== "twice performed separately cd /app/php-7.2.10/ext/pdo_pgsql/


2. Perform phpize configure file
/ usr / local / php / bin


3. Configure, php-config and generally in the same directory phpize
./configure --with-php-config = /


4. Compile, mounting
the make
the make the install


The tips extend to a corresponding directory is already installed
ls / usr / local / php /


6. The extension added to php.ini
find the php.ini file location
[root @ PAPAGZ etc] # PHP --ini
the Configuration File (php.ini) Path: / etc
Loaded the Configuration File: /etc/php.ini
not found php.ini file
cp /app/php-7.2.10/php.ini-development / etc


7. The extension was added the php.ini
[@ PAPAGZ the root PHP] # echo "= a pgsql.so Extension" >> /etc/php.ini
[@ PAPAGZ the root PHP] # echo "Extension = pdo_pgsql.so" >> / etc /php.ini


8. Restart php Service:
Service restart php-fpm
restart if not, find the process to kill
execute php-fpm alone

 

Guess you like

Origin www.cnblogs.com/zhangwensi/p/11577693.html