你的PHP安装目录可能有所不同,请自行更改

安装 PHP7 Redis
cd /tmp
wget -c https://github.com/phpredis/phpredis/archive/php7.zip
unzip php7.zip
cd phpredis-php7
phpize
./configure --with-php-config=${OPENSHIFT_DATA_DIR}/bin/php-config
make -j4 && make install
sed -i "s/; End:/; End:\n\nextension=redis.so\n/g" ${OPENSHIFT_DATA_DIR}etc/php.ini

安装 PHP7 GeoIP
git clone https://github.com/Zakay/geoip.git
cd geoip
phpize
./configure --with-php-config=${OPENSHIFT_DATA_DIR}/bin/php-config --with-geoip
make -j4 && make install
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mkdir ${OPENSHIFT_DATA_DIR}geoip
mv GeoIP.dat ${OPENSHIFT_DATA_DIR}geoip/GeoIP.dat
sed -i "s/; End:/; End:\n\nextension=geoip.so\ngeoip.custom_directory=${OPENSHIFT_DATA_DIR}geoip/\n/g" ${OPENSHIFT_DATA_DIR}etc/php.ini

标签: PHP, OpenShift

仅有一条评论

  1. wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
    unzip NON_BLOCKING_IO_php7.zip
    cd pecl-memcache-NON_BLOCKING_IO_php7
    phpize
    ./configure --with-php-config=${OPENSHIFT_DATA_DIR}/bin/php-config --enable-memcache
    make -j && make install

添加新评论