Install Phpredis extension Java redis nosql Redis teach under CentOS

Source: Internet
Author: User
 Configure the Environment:

Virtual machines: VMware Workstation 12.0; system: CentOS;

PHP and Apache are installed

Php
PHP configuration file:/etc/php.ini
www directory:/var/www (project to be placed under WWW under the HTML directory)

Apache
Apache Installation path:/ETC/HTTPD

"1" Download Phpredis's installation package

to the http://redis.io/clients#php download, select Phpredis, click the link to download the installation package

"2" uses xftpportable to connect to the virtual machine and place the downloaded package on the virtual machine system via the local physical machine


"3" Decompression: Unzip the installation package with the TAR-XZVF phpredis-develop.tar.gz command


"4" into the extracted directory using the phpize command to compile


"5" Using Configure

If the following problem occurs:

./configure--with-php-c/local/php/bin/php-config

-bash:./configure:no such file or directory

The error shown is due to php-config path error, with sudo find-name php-config can be detected

Execute one more instruction:./configure--with-php-c/bin/php-config


"6" compile make and install make install, php.ini add extension= "redis.so", restart Apache


"7" Test

Create a new test.php file under the/www/html directory

 
  

in the physical machine browser address bar type: virtual machine ip/test.php

Show Redis indicates a successful installation of the Redis extension



The above describes the installation of CentOS under the Phpredis extension, including the centos,redis aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.