1. elasticache redis 생성
https://brunch.co.kr/@topasvga/1191
402 ElastiCache 사용법- linux
ElastiCache 실습 과정 | <0> 구성 <1> ElastiCache 생성 <2> Elasticache 접속 위해 6379 포트 보안 그룹 허용하기 <3> Elasticache Endpoint 확인 <4> EC2 만들고 ElastiCache 액세스 하기 <5> EC연결 <6> Elasticache
brunch.co.kr
2. redis endpoint 확인
3. EC2 보안그룹 인바운드 TCP 6379 any 허용
4. EC2 redis-cli 설치
4-1. 레디스 설치 확인
- redis-cli -v
4-2. 레디스 설치
- apt-get install redis-tools
4-3. 레디스 연결
- redis-cli -h ENDPOINT -c -p PORT NUMBER
set a "hi"
get a
quit
https://freeblogger.tistory.com/10 : 레디스 명령어
5. phpRedis 설치
apt list php-redis
apt install php-redis
6. 코드이그나이터
https://github.com/joelcox/codeigniter-redis
system/libraries/Redis.php 업로드
application/config/redis.php 업로드 및 설정
application/config/autoload.php 수정
//$autoload['libraries'] = array('database', 'session');
$autoload['libraries'] = array('database', 'session', 'redis');
확인 소스
$this->load->library('redis', array('connection_group' => 'slave'), 'redis_slave');
$this->redis_slave->command('PING');
echo $this->redis_slave->get('a');
'개발 > redis' 카테고리의 다른 글
Redis 설치 (0) | 2023.03.02 |
---|---|
[redis]레디스(RDM - GUI for Redis) (0) | 2021.09.01 |
[Redis] Redis Data (0) | 2021.08.23 |
댓글