php7.2安装oci8,lnmp

 

  1. #rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm  
  2. #rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm 

 

  1. #vi /etc/ld.so.conf  
  2. /usr/lib/oracle/11.2/client64/lib     //加入此行,保存退出  
  3. ldconfig

 

 

ln -s /usr/lib/oracle/11.2/client64 /usr/lib/oracle/11.2/client

ln -s /usr/include/oracle/11.2/client64 /usr/include/oracle/11.2/client

ldconfig

 

vi /etc/profile

在文件末尾添加

export ORACLE_HOME=/usr/lib/oracle/11.2/client64

export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib

保存后

source /etc/profile

 

 

cd oci8-2.1.8

phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib

make

make install

 

vi /usr/local/php/etc/php.ini

add

extension=oci8.so

 

service php-fpm restart

你可能感兴趣的:(lnmp,centos,linux)