tar xvzf redis-3.0.5.tar.gz
cd redis-3.0.5
make
cd ..
mv redis-3.0.5 /usr/local/redis
cd /usr/local/redis
vi redis.conf
vi /etc/sysctl.conf
vm.overcommit_memory=1
sysctl vm.overcommit_memory=1
sysctl -w fs.file-max=100000
vi /root/.bash_profile
alias psredis='ps -u $USER -o pid,command | grep redis'
alias startredis='/usr/local/redis/src/redis-server /usr/local/redis/redis.conf'
alias stopredis='cat /var/run/redis.pid | xargs kill'
startredis
psredis
stopredis
pecl install igbinary
cp /usr/local/lib/php/extensions/no-debug-non-zts-20090626/igbinary.so /usr/local/lib/php/
pecl install redis
cp /usr/local/lib/php/extensions/no-debug-non-zts-20090626/redis.so /usr/local/lib/php/
vi php.ini
extension=/usr/local/lib/php/igbinary.so
extension=/usr/local/lib/php/redis.so
test
<?
$redis = new Redis();
$redis->connect('127.0.0.1',6379);
$redis->set('key','val');
echo $redis->get('key');
?>
'리눅스 문서' 카테고리의 다른 글
MYSQL 5.7 INSTALL ( mysql 5.7.9 ) (4) | 2016.02.01 |
---|---|
centos 6 이상에서 아파치 logrotate로 로그관리하기 (4) | 2016.01.07 |
[한글 형태소 분석기] MeCab 설치 및 PHP 바인딩 (4) | 2015.12.10 |
CentOS 6.4 + Oracle 11gR2 설치 (4) | 2015.07.27 |
centos7 + oracle11 설치시 에러 해결 (4) | 2015.07.27 |