CentOs Redis & php-redis 설치
페이지 정보
작성자 미친새 작성일 20-02-21 12:27 조회 22,227 댓글 0본문
CentOs 6.5
$ 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
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
$ yum --enablerepo=remi,remi-test install php-redis
echo extension=redis.so > /etc/php.d/redis.ini
service httpd restart
참조 : https://gist.github.com/nghuuphuoc/7801123
CentOS4
http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
CentOS5
w_get http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
w_get http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
rpm -Uvh remi-release-5.rpm
CentOS6
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
#################################
Install Redis on Centos 6
1. InstallPermalink
// --- Compiling ---
$ w_get 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
2. ConfigPermalink
$ sudo nano /etc/sysctl.conf
vm.overcommit_memory=1
$ sysctl vm.overcommit_memory=1
$ sysctl -w fs.file-max=100000
3. Service commandsPermalink
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
4. Install PHP redis extensionPermalink
// Install php-redis extension
$ yum --enablerepo=remi,remi-test install php-redis
// If it does not work, try the following steps:
$ w_get 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/
service httpd restart
$ 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
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
$ yum --enablerepo=remi,remi-test install php-redis
echo extension=redis.so > /etc/php.d/redis.ini
service httpd restart
참조 : https://gist.github.com/nghuuphuoc/7801123
CentOS4
http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
CentOS5
w_get http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
w_get http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
rpm -Uvh remi-release-5.rpm
CentOS6
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
#################################
Install Redis on Centos 6
1. InstallPermalink
// --- Compiling ---
$ w_get 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
2. ConfigPermalink
$ sudo nano /etc/sysctl.conf
vm.overcommit_memory=1
$ sysctl vm.overcommit_memory=1
$ sysctl -w fs.file-max=100000
3. Service commandsPermalink
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
4. Install PHP redis extensionPermalink
// Install php-redis extension
$ yum --enablerepo=remi,remi-test install php-redis
// If it does not work, try the following steps:
$ w_get 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/
service httpd restart
관련링크
댓글목록 0
등록된 댓글이 없습니다.