为什么80%的码农都做不了架构师?>>>
PHP7.2 的redis安装方法:
顺便说一下PHP7.2的安装:
wget http://cn2.php.net/distributions/php-7.2.4.tar.gz
tar -zxvf php-7.2.4.tar.gz
cd php-7.2.4./configure --prefix=/usr/local/php7.2 --with-config-file-path=/usr/local/php7.2/etc --with-apxs2=/usr/local/apache2/bin/apxs --enable-fileinfo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-calendar --with-xsl --enable-ctype --with-kerberos --enable-exif --with-xmlrpc --enable-ftp --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug --with-bz2 --enable-opcache --with-mcrypt和--enable-gd-native-ttf选项去掉,7.2用openssl了,不然会报错make
make install
1. redis的安装
见另一篇"Redis安装与PHP7.0扩展"
2. php扩展
redis必须要对应php7.2 的版本
wget https://github.com/edtechd/phpredis/archive/php7.zip
unzip php7.zip
cd phpredis-php7/usr/local/php7.2/bin/phpize
./configure -with-php-config=/usr/local/php7.2/bin/php-config
make
make installvim /usr/local/php7.2/etc/php.ini
extension=redis.so --添加扩展名称