?
PHP Redis 安装
?
目录:[?-?]
- 20.4.4.?php-redis.x86_64 : Extension for communicating with the Redis key-value store
- 20.4.4.1.?pecl 安装
- 20.4.4.2.?yum安装
- 20.4.4.3.?源码编译安装
- 20.4.4.4.?配置 redis.ini
- 20.4.4.5.?Session 配置
?
文章出处:http://netkiller.github.io/
?
20.4.4.?php-redis.x86_64 : Extension for communicating with the Redis key-value store
20.4.4.1.?pecl 安装
pecl install redis
Copy after login
20.4.4.2.?yum安装
https://github.com/nicolasff/phpredis
yum search redis php-redis.x86_64 : Extension for communicating with the Redis key-value store python-redis.noarch : A Python client for redis redis.x86_64 : A persistent key-value database
Copy after login
20.4.4.3.?源码编译安装
安装git版本控制客户端
yum install git
Copy after login
从github仓库中克隆一份代码到本地
git clone git://github.com/nicolasff/phpredis.git
Copy after login
编译安装phpredis; 我暂时没有找到 pecl的phpredis源
cd phpredis phpize ./configure --with-php-config=/srv/php-5.4.9/bin/php-config make && make install
Copy after login
创建配置文件
20.4.4.4.?配置 redis.ini
cat > /srv/php-5.4.9/etc/conf.d/redis.ini <<EOF extension=redis.so EOF
Copy after login
查看安装情况
# php -m | grep redis redis
Copy after login
20.4.4.5.?Session 配置
使用 Redis 存储 Session 数据
session.save_handler = redis session.save_path = "tcp://127.0.0.1:6379" 或者使用多个redis session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Related Tutorials
Popular Recommendations
Latest courses
-
JAVA Beginner's Video Tutorial2574858
-
JAVA Beginner's Video Tutorial2574858 times of learning
-
Little Turtle's zero-based introduction to learning Python video tutorial509911 times of learning
-
Quick introduction to web front-end development216224 times of learning
-
Master PS video tutorials from scratch898459 times of learning
-
[Web front-end] Node.js quick start8170 times of learning
-
Complete collection of foreign web development full-stack courses6481 times of learning
-
Go language practical GraphQL5381 times of learning
-
550W fan master learns JavaScript from scratch step by step737 times of learning
-
Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours27378 times of learning
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template