Linux下Lamp环境 PHP使用Redis安装教程

安装

下载redis,地址为    wget https://github.com/nicolasff/phpredis/archive/master.zip

解压
[root@iz2ze6j8qikrz6va6ac0w6z ~]# ls
master.zip  phpredis-master
[root@iz2ze6j8qikrz6va6ac0w6z ~]# cd phpredis-master/
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# /usr/bin/phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525

[root@iz2ze6j8qikrz6va6ac0w6z home]# whereis phpize
phpize: /usr/bin/phpize /usr/share/man/man1/phpize.1.gz
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# ./configure --with-php-config=/usr/bin/php-config  //测试存在
checking for grep that handles long lines and -e... /usr/bin/grep

config.status: executing libtool commands
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# make  //预编译
/bin/sh /root/phpredis-master/libtool --mode=compile cc  -I. -I/root/phpredis-master -DPHP_ATOM_INC -I/root/phpredis-master/include -I/root/phpredis-master/main -I/root/phpredis-master -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/phpredis-master/redis.c -o redis.lo 

PHP         : /usr/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 5.4.16
ZEND_VERSION: 2.4.0
PHP_OS      : Linux - Linux iz2ze6j8qikrz6va6ac0w6z 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64
INI actual  : /root/phpredis-master/tmp-php.ini
More .INIs  :  
CWD         : /root/phpredis-master
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2018-10-21 15:11:37
=====================================================================
No tests were run.
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# make install   //安装
Installing shared extensions:     /usr/lib64/php/modules/
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# vi  /etc/php.ini
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# systemctl restart httpd
[root@iz2ze6j8qikrz6va6ac0w6z phpredis-master]# 

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