Install redisphp extension in ubuntu

Source: Internet
Author: User
: This article describes how to install the redisphp extension in ubuntu. if you are interested in the PHP Tutorial, refer to it.

1, if there is no phpize, first install the php5-dev
Sudo apt-get install php5-dev

2. get the latest redis code and compile and install it.
Wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
Tar xzvf redis-2.4.15.tar.gz
Cd redis-2.4.15
Make
Make install

3. install phpredis and obtain the latest version code for compilation.
Wget -- no-check-certificate http ://Github. Com/nicolasff/phpredis/tarball/master-O phpredis.tar.gz
Tar phpredis.tar.gz
Cd nicolasff-phpredis-f1231c9
Phpize
./Configure -- with-php-c/local/php/bin/php-config
Make
Make install

4. modify php. ini and add the redis. so module.

Vim/etc/php5/apache2/php. ini
Vim/etc/php5/cli/php. ini
Add the following line
Extension = redis. so

5. restart apache

/Etc/init. d/apache restart

6. download the redis WEB management package

Wget -- no-check-certificate https ://Github. Com/ErikDubbelboer/phpRedisAdmin/tarball/master-O phpRedisAdmin.tar.gz

Tar xzvf phpRedisAdmin.tar.gz

Mkdir/var/www/redis

Cp-fr ErikDubbelboer-phpRedisAdmin-9fcb29d/*/var/www/redis/

Open your browser and enter the following address:

Http: // 192.168.123.136/redis/

7. php test code

 connect('127.0.0.1', 6379);$redis->set('key', 'hello world');echo $redis->get('key');?>

The above describes how to install the redisphp extension in ubuntu, including the github content. if you are interested in the PHP Tutorial.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.