Home > Backend Development > PHP Tutorial > Install phpredis extension java redis nosql redis redis tutorial under CentOS

Install phpredis extension java redis nosql redis redis tutorial under CentOS

WBOY
Release: 2016-07-29 08:49:47
Original
1260 people have browsed it

 Configuration environment:

Virtual machine: VMware Workstation 12.0; System: CentOS;

Already installed php and apache

PHP
Configuration file of php: /etc /php.ini
         www Directory: /var/www (The project should be placed in the html directory under www)

Apache
Apache installation path: /etc/httpd

[1] Download the installation package of phpredis

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

Install phpredis extension java redis nosql redis redis tutorial under CentOS

【2】Use XftpPortable to connect to the virtual machine, and put the downloaded package through the local physical machine Go to the virtual machine system

Install phpredis extension java redis nosql redis redis tutorial under CentOS

【3】Unzip: Use tar -xzvf phpredis-develop.tar.gz command to decompress the installation package

                                                                                                                                             Use tar -xzvf phpredis-develop.tar.gz command to decompress the installation package Install phpredis extension java redis nosql redis redis tutorial under CentOS

[4] Enter the decompressed directory and use phpize Command compilation

Install phpredis extension java redis nosql redis redis tutorial under CentOS

】 [5] Use configure

Install phpredis extension java redis nosql redis redis tutorial under CentOS

if the following problems occur:

./configure-with-pHP-C/LOCAL/PHP/BIN/PHP- config​​​

​​​​​-bash: ./configure: No such file or directory

​​

Install phpredis extension java redis nosql redis redis tutorial under CentOS

​​ The error shown is due to the wrong path of php-config, use sudo find -name php -config can be found

Install phpredis extension java redis nosql redis redis tutorial under CentOS

Execute the command again: ./configure --with-php-c/bin/php-config

Install phpredis extension java redis nosql redis redis tutorial under CentOS

【6】 Compile make and install make install, add extension="redis.so" to php.ini, restart apache

Install phpredis extension java redis nosql redis redis tutorial under CentOS

【7】Test

Create a new test.php in the /www/html directory File

<?php
    echo phpinfo();
?>
Copy after login

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

centos 安装redis,centos redis自启动,centos yum redis,centos 启动redis,centos php redis,centos 7 安装redis,centos6.5 redis,centos 7 redis,centos下安装redis,centos6.5安装redis,centos上安装redis,redis,java redis,nosql redis,redis教

If redis is displayed, it means the redis extension was successfully installed



The above introduces the installation of phpredis extension under CentOS, including centos and redis content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template