《PHP編程:Fedora下安裝php Redis擴展筆記》要點:
本文介紹了PHP編程:Fedora下安裝php Redis擴展筆記,希望對您有用。如果有疑問,可以聯系我們。
PHP教程一、安裝編譯對象
代碼如下:
yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl
二、安裝redis php-redis
代碼如下:
# yum install redis php-redis
PHP教程這樣就安裝勝利了
PHP教程啟動redis
代碼以下:
# sudo redis-server /etc/redis.conf
PHP教程1、下載php-redis zip安裝包
PHP教程https://github.com/nicolasff/phpredis
PHP教程二、找到PHP安裝路徑
PHP教程敕令whereis phpize和whereis php-config 找到phpize和php-config路徑
PHP教程3、天生configure
代碼以下:
# /usr/bin/phpize
PHP教程4、編譯安裝
代碼如下:
# ./configure --with-php-config=/usr/bin/php-config
# make && make install
PHP教程5、參加安裝的redis.so模塊
代碼如下:
# vim /etc/php.ini
六、重啟apache或nginx
PHP教程7、測試
代碼以下:
$redis = new Redis();
$redis->connect('127.0.0.1',6379);
$redis->set('test','hello world!');
echo $redis->get('test');
《PHP編程:Fedora下安裝php Redis擴展筆記》是否對您有啟發,歡迎查看更多與《PHP編程:Fedora下安裝php Redis擴展筆記》相關教程,學精學透。維易PHP學院為您提供精彩教程。
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/14762.html