-
First implementation php -m, If you do not see redis, then you need to install php redis extension
-
Download the source code, we assume that there is a git folder home directory to manage files git
$ cd ~/git/ $ git clone https://github.com/phpredis/phpredis.git
-
Under the downloaded source movement to / etc files, then enter the directory
$ mv phpredis/ /etc/ $ cd /etc/phpredis
-
Execution phpize generate build file, there may need to install the dev-php7.2
Ubuntu is not installed phpize, executable command: sudo apt-get install php7.2- dev to install phpize$ phpize // 根据提示安装php7.0-dev $ sudo apt install php7.0-dev
-
Compile and install
$ sudo ./configure $ make && make install
So usr \ lib \ php \ directory under 20,170,718 has been generated redis.so file, usr \ lib \ php \ 20170718 This directory is referred to in the php.ini extension_dir
-
In the etc \ php \ 7.2 mods-available directory under increased redis.ini \, add the following extension = redis.so
new link filesudo ln -s /etc/php/7.2/mods-available/redis.ini /etc/php/7.2/cli/conf.d/20-redis.ini
- Restart nginx
/etc/init.d/nginx restart
Install php redis expansion in ubuntu
Guess you like
Origin blog.51cto.com/3154408/2408038
Recommended
Ranking