프로젝트에서 인가 관련 정보는 redis에 담기로 해 로컬에서 테스트 후 Amazon Linux 2023 서버에 설치하는 과정 기록.
sudo yum gcc make
mkdir redis
cd redis/
sudo wget http://download.redis.io/redis-stable.tar.gz
sudo tar zxvf redis-stable.tar.gz
cd redis-stable/
sudo make
그러면 다음과 같은 알림과 함께 컴파일이 시작된다
make[1]: Entering directory '/home/my-ec2/redis/redis-stable/src'
CC Makefile.dep
그리고 마지막에
문구가 떠 make test를 진행했다.
이때, 에러 발생
You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [Makefile:462: test] Error 1
sudo yum install tcl
이제 redis를 설치했던 폴더에서 ./redis/src/redis-server
이런 식으로 레디스 서버를 킬 수 있다. 하지만 전역에서 명령어 실행 후 레디스 실행 시키도록 해보자.
앞서 레디스를 실행시켰던 redis-server 파일과 redis-cli파일을 /usr/local/bin/ 디렉토리로 복사
sudo cp src/redis-server src/redis-cli /usr/local/bin/
앞서 레디스를 실행시켰던 redis-server 파일과 redis-cli파일을 /usr/local/bin/ 디렉토리로 복사
sudo mkdir /etc/redis
sudo cp src/redis.conf /etc/redis
sudo vi /etc/redis/redis.conf
이후 redis-server
명령어로 레디스 실행이 가능한 것을 확인할 수 있다.!