Laravel Installing Predis Extensions

Source: Internet
Author: User

Install composer before installing the Predis extension, install the tutorial in https://getcomposer.org/download/:

" copy (' Https://getcomposer.org/installer ', ' composer-setup.php '); "  "if (hash_file (' SHA384 ', ' composer-setup.php ') = = =" C32408bcd017c577ce80605420e5987ce947a5609e8443dd72cd3867cc3a0cf442e5bf4edddbcbe72246a953a6c48e21 ') {echo ' Installer verified '; } else {echo ' Installer corrupt '; unlink (' composer-setup.php ');} echo php_eol; " php composer-"unlink (' composer-setup.php '); "

Then set the composer Global environment variable:

MV Composer.phar/bin/composer

Composer Mirror address to the domestic will be much faster, tutorial address: http://pkg.phpcomposer.com/

Composer Config-g Repo.packagist composer https://packagist.phpcomposer.com

Then turn on the Php-pear,php-devel and Php-redis extensions, and I'll install the extensions directly with the CentOS Yum package:

Yum Install php70w-devel.x86_64yuminstall php70w-pear.noarchYum  Install

After the installation is complete, switch to the root directory of your site after success:

Composer require predis/predisusing version^1.1  forpredis/Predis./Composer.json has been updated> PHP ArtisanClear-compiledloading composer repositories with package informationupdating dependencies (including require-Dev)-Installing Predis/predis (v1.1.1) Downloading: -%Predis/predis suggests installing ext-Phpiredis (allows faster serialization and deserialization of the Redis protocol) Writing LockfileGenerating AutoLoad files> PHP Artisan Optimize

You can then use Redis for all kinds of operations in your controller.

Laravel Installing Predis Extensions

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.