-
Star
(126)
You must be signed in to star a gist -
Fork
(57)
You must be signed in to fork a gist
-
-
Save nghuuphuoc/7801123 to your computer and use it in GitHub Desktop.
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
$ yum --enablerepo=remi,remi-test install redis |
$ sudo nano /etc/sysctl.conf | |
vm.overcommit_memory=1 | |
$ sysctl vm.overcommit_memory=1 | |
$ sysctl -w fs.file-max=100000 |
$ chkconfig --add redis | |
$ chkconfig --level 345 redis on | |
$ service redis start/stop/restart |
// Install php-redis extension | |
$ yum --enablerepo=remi,remi-test install php-redis | |
// If it does not work, try the following steps: | |
$ wget https://github.com/nicolasff/phpredis/zipball/master -O phpredis.zip | |
$ unzip phpredis.zip | |
$ cd nicolasff-phpredis-* | |
$ phpize | |
$ ./configure | |
$ make | |
$ make install | |
Installing shared extensions: /usr/lib64/php/modules/ |
biskandar
commented
Nov 16, 2016
Your phpRedis installation doesn't work with php 5.6
This work.
Install Redis 2.2.8 for PHP 5.6
Using Centos 7.0 and EasyApache 4, you can’t install Redis 2.2.8 for PHP 5.6
Easiest workaround is to use shell and following command:
pecl install channel://pecl.php.net/redis-2.2.8
Once it finishes installation, you should see the following lines:
Build process completed successfully
Installing '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/redis.so'
install ok: channel://pecl.php.net/redis-2.2.8
configuration option "php_ini" is not set to php.ini location
You should add "extension=redis.so" to php.ini
ref: http://www.techsoar.com/install-redis-2-2-8-for-php-5-6/
Command for test phpredis is work
php -r "if (new Redis() == true){ echo \"OK \r\n\"; }"
ref: https://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html
=============================
Thank your for your document.
thanks I have been able to install but How can I upgrade version redis?
I couldn't complete setup.
when i run this command:
$ chkconfig --add redis
I get this error:
error reading information on service redis: No such file or directory
Oh man. 46 forks. Which one to choose? Of the forks. 15 modified. 1 with 9 stars and 19 updates, with a tutorial for CentOS 7 linked by a user who was active on GitHub in the last day. Followed those instructions, which had a number of manual steps automated with comment from @vortexau on using the install utility script shipped with the release I built (redis-3.0.4).