Redis Summary of PHP environment configuration under LInux

Source: Internet
Author: User
Tags install php install redis

Tag: represents access to execute apt-get div image php environment sudo. com

System Deepin, Environment PHP7.0 + Apache2

Installing the Redis Service

    sudo apt-get install redis-server         // install    sudo/etc/init.d/redis-server start        //  Open

The connection service uses the command REDIS-CLI to use Redis at the terminal.

Installing the Phpredis Extension

1 First we download the Phpredis extension file first

    Clone https:///Github.com/phpredis/phpredis//      download Phpredis extension from GitHub
MV Phpredis/etc/phpredis //move Phpredis to another directory, move to etc under

2 Next install, go to the Phpredis directory, execute the phpize command, if phpize after no response, it is possible that the system does not install Php-dev, install Php-dev

After Phpize again

3 Compiling the Phpredis file, still in the Phpredis directory

    ./Configure    && make install

4 Modify the PHP.ini configuration file, and then restart Apache after adding the following statement to the file

    Extension=/etc/phpredis/modules/redis.so

Last visit to Phpinfo, we see that the setup is complete.

Redis Summary of PHP environment configuration under LInux

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.