WSL2 에 Rocky Linux 8 설치

PS E:\Hyper-V> wsl --import Redis72 E:\Hyper-V\Redis72 E:\Hyper-V\Rocky-8-Container-Base.latest.x86_64.tar.xz --version 2


PS E:\Hyper-V> wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-22.04    Stopped         2
  Redis72         Stopped         2
  PostgreSQL14    Stopped         2

PS E:\Hyper-V> wsl -d Redis72

Redis 7.2 설치

-- 저장소 설치 
[root@RT-PC Hyper-V]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
[root@RT-PC Hyper-V]# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

-- redis 모듈 검색 
[root@RT-PC Hyper-V]# dnf module list redis
Rocky Linux 8 - AppStream
Name                 Stream                  Profiles                  Summary
redis                5 [d]                   common [d]                Redis persistent key-value database
redis                6                       common [d]                Redis persistent key-value database

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                 Stream                  Profiles                  Summary
redis                remi-5.0                common [d]                Redis persistent key-value database
redis                remi-6.0                common [d]                Redis persistent key-value database
redis                remi-6.2                common [d]                Redis persistent key-value database
redis                remi-7.0                common [d]                Redis persistent key-value database
redis                remi-7.2                common [d]                Redis persistent key-value database

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

-- 7.2 버전 설치 
[root@RT-PC Hyper-V]# dnf module reset redis
[root@RT-PC Hyper-V]# dnf module install redis:remi-7.2

-- redis 서비스 사용 설정 
[root@RT-PC ~]# systemctl enable redis
Created symlink /etc/systemd/system/multi-user.target.wants/redis.service → /usr/lib/systemd/system/redis.service.

-- redis 서비스 시작 
[root@RT-PC ~]# systemctl start redis
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

-- systemctl 사용 설정 
[root@RT-PC ~]# echo "[boot]
systemd=true" | tee /etc/wsl.conf

-- Redis72 를 재기동한다. 
[root@RT-PC ~]# exit
logout

PS E:\Hyper-V> wsl -t Redis72
작업을 완료했습니다.

PS E:\Hyper-V> wsl -d Redis72

-- redis 서비스 상태확인 
[root@RT-PC Hyper-V]# systemctl status redis
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: active (running) since Sat 2023-12-09 12:21:56 KST; 53s ago
 Main PID: 49 (redis-server)
   Status: "Ready to accept connections"
    Tasks: 5 (limit: 26213)
   Memory: 11.8M
   CGroup: /system.slice/redis.service
           └─49 /usr/bin/redis-server 127.0.0.1:6379

Dec 09 12:21:56 RT-PC systemd[1]: Starting Redis persistent key-value database...
Dec 09 12:21:56 RT-PC systemd[1]: Started Redis persistent key-value database.

-- redis 접속 
[root@RT-PC Hyper-V]# redis-cli
127.0.0.1:6379>

'Redis' 카테고리의 다른 글

클러스터 구성  (0) 2024.12.01
복제 구성, sentinel  (0) 2024.11.27
Redis 관리  (0) 2024.11.27

+ Recent posts