redis扩展安装
wget -c https://pecl.php.net/get/redis-4.2.0.tgz
tar xf redis-4.2.0.tgz
cd redis-4.2.0/
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
echo ‘extension=redis.so’ >> /etc/php.ini
oracle扩展安装
下载扩展包
wget -c https://pecl.php.net/get/oci8-2.2.0.tgz
需要安装oracle动态库,由于oracle官网需要先接受许可才能下载(可能是我小白了。不知道怎么在linux最小化安装的环境下下载),所以现在我是windows下载后传给centos7,这里需要注意,动态库下载需要与oracle数据库版本对应,我这里下载的是11.2的版本
两个文件
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
echo ‘/usr/lib/oracle/11.2/client64/lib’ >> /etc/lc.so.conf
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
echo -e ‘export ORACLE_HOME=/usr/lib/oracle/11.2/client64\nexport LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib’>> /etc/profile.d/oracle.sh
source /etc/profile.d/oracle.sh
ldconfig
tar xf oci8-2.2.0.tgz
cd oci8-2.2.0
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
echo “extension=oci8.so” >> /etc/php.ini
redis扩展安装
下载
wget -c https://pecl.php.net/get/redis-4.3.0RC2.tgz
解压
tar xf redis-4.3.0RC2.tgz
进入目录
cd redis-4.3.0RC2/
生成安装php扩展可执行文件
phpize
编译安装
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
echo ‘extension=redis.so’ >> /etc/php.ini