Install phpRedisAdmin under contos

WBOY
Release: 2016-08-08 09:25:57
Original
784 people have browsed it

Since RedisDesktopManager is very time-consuming to open redis with a large amount of data, and because Alibaba Cloud's kvstore cannot be accessed from the external network, I installed a phpRedisAdmin as mentioned on the Internet. Let's talk about what I encountered when connecting to kvstore. If you encounter any problems, record the installation steps.
The server must have an environment that can run PHP normally. If not, please install it yourself.
1, first download phpredis

Quote


cd /home/download
wget https://github.com/nicolasff/phpredis/archive/master.tar.gz
The downloaded file does not need to end with .tar.gz Yes, just change the name of mv
tar -xzvf master.tar.gz
cd phpredis-master
Compile, install extension:
phpize
./configure --enable-redis
make && make install


2, modify

Reference


vi /etc/php.ini
Under the line; ##extension_dir = "./", add the following code:
extension_dir = "/usr/lib64/php/modules"
extension=redis.so


3, install phpRedisAdmin

reference


cd /home/www
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin/
git clone https:// github.com/nrk/predis.git vendor
git submodule init
git submodule update


There will be a phpRedisAdmin folder in the /home/www directory. Enter the folder and modify the two files

Quote


cd /home/www/phpRedisAdmin/includes
vi config.sample.inc.php
'servers' => array(
    array(
                                                        ) 'host' => 'xxxxxxxxxxxxxxxx', //kvstore link address xxxx.xxx.xkvstore.aliyuncs.com
'port' => 6379,
'filter' => '*',
// Optional Redis authentication.
                                                                                                                                                                        authentication. array(
        'password' => 'admin',
     ),


Then modify the index.php file

Quote


Comment out these two lines in the original file
//$databases = $ redis->config('GET', 'databases');

//$databases = $databases['databases'];

Modified to

$databases = 16;


Finally, restart your php container , such as nginx or apache, you can log in and operate.
The above introduces the installation of phpRedisAdmin under contos, including the relevant 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!