ubuntu 20.04에서 redis를 설치하기 위한 방법
apt로 간단하게 설치 가능하다.
1 ) apt update
ubuntu@dev1990:~$ sudo apt update
2 ) apt-get install redis-server
ubuntu@dev1990:~$ sudo apt-get install redis-server
3) systemctl status redis-server.service (등록된 서비스 파일 확인)
(또는 프로세스 확인 (ps -ef))
ubuntu@dev1990:~$ sudo systemctl status redis-server.service
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-10-11 23:25:13 KST; 6min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 131289 (redis-server)
Status: "Ready to accept connections"
Tasks: 5 (limit: 1076)
Memory: 2.6M
CPU: 756ms
CGroup: /system.slice/redis-server.service
└─131289 "/usr/bin/redis-server 127.0.0.1:6379" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ">
Oct 11 23:25:13 dev1990 systemd[1]: Starting Advanced key-value store...
Oct 11 23:25:13 dev1990 systemd[1]: Started Advanced key-value store.
ubuntu@dev1990:~$ ps -ef | grep redis
redis 131289 1 0 23:25 ? 00:00:00 /usr/bin/redis-server 127.0.0.1:6379
ubuntu 131473 130619 0 23:29 pts/0 00:00:00 grep --color=auto redis
4) systemctl enable redis-server.service
(서버 재부팅되더라도 redis-server도 같이 올라오도록 등록)
ubuntu@dev1990:~$ sudo systemctl enable redis-server.service
Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable redis-server
5) 포트 확인 (redis 기본 port 6379)
ubuntu@dev1990:~$ netstat -ntlp | grep 6379
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN -
tcp6 0 0 ::1:6379 :::* LISTEN -
'Server > Oracle Cloud Infrastructure' 카테고리의 다른 글
[Oracle] postgreSQL 16 install (Ubuntu 22.04) (0) | 2024.09.17 |
---|---|
[Oracle] postgreSQL 14 install (Ubuntu 20.04) (0) | 2022.10.12 |
[Oracle] Golang install (Ubuntu 20.04) (0) | 2022.10.01 |
[Oracle] net-tools (Ubuntu 20.04) (0) | 2022.10.01 |
[Oracle] git 설치 (Ubuntu 20.04) (0) | 2022.10.01 |