[Linux] authselect 을 이용하여 faillock module 적용

RHEL v8 이후 변경점 RHEL v8 계열(CentOS/Oracle Linux/Rocky Linux) 부터는 이전과 같이 PAM 을 수정하여 설정하는 것을 권장하지 않습니다. [root@chhanz-c8-vm ~]# cat /etc/pam.d/system-auth ... # Generated by authselect on Fri Jul 16 13:13:24 2021 # Do not modify this file manually. <<< ... 추가로 RHEL v8 계열부터는 기존에 사용하던 보안 설정으로 많이 사용 되던 pam_tally2 module 이 deprecated 되었습니다. anthconfig 로 PAM 설정이 가능하였으나, RHEL v8 계열부터 authselect 을 사용하도록 변경 되었습니다....

July 16, 2021 · chhanz

[Linux] du / ncdu 활용

du 현재 경로의 사용률을 확인 하는 명령입니다. [opc@instance-20201011-1438 TEST]$ tree . ├── big1 │ ├── 1g_bigfiles.img │ ├── 1g_bigfiles1.img │ └── 1g_bigfiles2.img ├── big2 │ └── 1g_bigfiles6.img ├── big3 ├── big4 ├── dummyfile1 ├── dummyfile10 ├── dummyfile2 ├── dummyfile3 ├── dummyfile4 ├── dummyfile5 ├── dummyfile6 ├── dummyfile7 ├── dummyfile8 └── dummyfile9 4 directories, 14 files 위와 같은 구조를 가지고 있는 경로에서 du 명령을 사용할 경우, [opc@instance-20201011-1438 TEST]$ du -h 3.0G ....

May 25, 2021 · chhanz

[Linux] Yum Group 상세 활용

yum group 관련 명령어 Group Package 를 설치 할 때, 주로 이용하는 명령어 입니다. yum groupinstall , yum groupinfo , yum grouplist 등이 있습니다. 기본 사용법 주로 사용 하는 명령어 몇가지에 대해 알아보자. yum grouplist 해당 명령은 Group Package 목록 및 설치 가능, 설치됨 여부를 확인 할 수 있습니다. [root@fastvm-centos-7-6-30 ~]# yum group list hidden ids ... Available Environment Groups: 최소 설치 (minimal) 계산 노드 (compute-node-environment) 인프라 서버 (infrastructure-server-environment) 파일 및 프린트 서버 (file-print-server-environment) 기본 웹 서버 (web-server-environment) 가상화 호스트 (virtualization-host-environment) 서버 - GUI 사용 (graphical-server-environment) GNOME 데스크탑 (gnome-desktop-environment) KDE Plasma Workspaces (kde-desktop-environment) 개발 및 창조를 위한 워크스테이션 (developer-workstation-environment) Available Groups: Anaconda 도구 (anaconda-tools) CentOS Linux Client product core (client-product) CentOS Linux ComputeNode product core (computenode-product) CentOS Linux Server product core (server-product) CentOS Linux Workstation product core (workstation-product) Common NetworkManager submodules (networkmanager-submodules) DNS 네임 서버 (dns-server) FTP 서버 (ftp-server) GNOME (gnome-desktop) GNOME 응용 프로그램 (gnome-apps) Hyper-v platform specific packages (platform-microsoft) ID 관리 서버 (identity-management-server) Infiniband 지원 (infiniband) ....

May 25, 2021 · chhanz

[Linux] VDO(Virtual Data Optimizer) 활용

VDO 란? VDO(Virtual Data Optimizer)는 데이터의 중복제거, 압축 등의 기능을 사용해 스토리지의 공간 활용도를 높이는 기술입니다. VDO 활용 VDO 장단점 장점 : 중복 제거 및 압축 기능을 이용하여 스토리지 공간 활용도가 높아지며, 주로 VM 및 컨테이너 환경에서 높은 효율을 보인다고 합니다. 단점 : 일반적인 스토리지에 비해 성능 저하가 발생합니다. 참고 자료 : https://www.redhat.com/en/blog/look-vdo-new-linux-compression-layer VDO 설치 설치 환경 : CentOS 8.1 아래 명령을 통해 설치를 진행합니다. [root@fastvm-centos-8-1-30 ~]# dnf install vdo kmod-kvdo ....

March 31, 2021 · chhanz

[Linux] `YumRepo Error: All mirror URLs are not using ftp, http[s] or file.`

YumRepo Error: All mirror URLs are not using ftp, http[s] or file. 해결 방법 아래와 같이 CentOS 6에서 발생되는 이슈입니다. [root@fastvm-centos-6-10-51 ~]# yum repolist Loaded plugins: fastestmirror Determining fastest mirrors YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/extras/mirrorlist....

December 10, 2020 · chhanz

[Linux] haproxy 를 이용한 RoundRobin 구성 (on CentOS7)

haproxy 를 이용한 RoundRobin 구성 (on CentOS7) HAPROXY 를 이용하여 HW L4 를 구현 할 수 있다????? 이번 포스팅에서는 haproxy 의 RoundRobin(rr) 알고리즘을 이용하여 RoundRobin 웹서비스를 구현하도록 하겠습니다. 테스트용 웹 서비스 아래와 같이 각각의 flask app 서비스를 하는 웹 서비스를 테스트에 활용합니다. [root@k3s-10-50-1-70 ~]# kubectl get all NAME READY STATUS RESTARTS AGE pod/pod-test-app-1 1/1 Running 0 2m47s pod/pod-test-app-2 1/1 Running 0 83s pod/pod-test-app-3 1/1 Running 0 69s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10....

November 30, 2020 · chhanz

[Linux] DHCP 서버 구성 (on CentOS7)

DHCP 란? 동적 호스트 구성 프로토콜(Dynamic Host Configuration Protocol, DHCP)은 호스트 IP 구성 관리를 단순화하는 IP 표준이다. 동적 호스트 구성 프로토콜 표준에서는 DHCP 서버를 사용하여 IP 주소 및 관련된 기타 구성 세부 정보를 네트워크의 DHCP 사용 클라이언트에게 동적으로 할당하는 방법을 제공한다. 참고 : 위키백과 - DHCP DHCP 동작 원리 아래 내용을 보면 DHCP 의 동작 원리를 쉽게 이해 할 수 있습니다. 출처 : https://www.netmanias.com/ko/post/blog/5348/dhcp-ip-allocation-network-protocol/understanding-the-basic-operations-of-dhcp DHCP 설치 아래 커멘드를 통해 Package 를 설치합니다....

November 17, 2020 · chhanz

[DNS] CentOS 7 - DNS 설치 및 forwarders 구성

DNS 설치 (on CentOS 7) DNS 설치는 아래 커맨드를 통해 설치가 가능합니다. $ sudo yum -y install bind DNS 실행 아래 커맨드로 실행을 합니다. $ sudo systemctl enable --now named $ sudo systemctl status named ● named.service - Berkeley Internet Name Domain (DNS) Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-11-05 10:27:12 KST; 889ms ago Process: 25609 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS) Process: 25607 ExecStartPre=/bin/bash -c if [ !...

November 6, 2020 · chhanz

[Linux] ReaR 를 이용하여 OS Backup 구성

[Linux] ReaR 를 이용하여 OS Backup 구성 ReaR 란? ReaR 또는 Relax & Recover는 마이그레이션 및 재해 복구 도구입니다. ReaR는 실행중인 Linux 시스템에 대한 부팅 가능한 이미지를 생성하며 필요한 경우에는 백업된 이미지를 사용하여 시스템을 복구 할 수 있습니다. 백업된 이미지를 사용하여 OS를 다른 하드웨어로 복원 할 수도 있으므로 ReaR를 마이그레이션 도구로 사용할 수도 있습니다. ReaR Backup 용 NFS 서버 구성 ReaR 로 Backup 되는 Boot ISO 및 Backup DATA 를 저장할 NFS 서버를 구성합니다....

August 12, 2020 · chhanz

[Linux] How to reposync only latest package

[Linux] How to reposync only latest package reposync 를 받는데 모든 version 의 package 들이 있다보니 reposync 할 때, 시간도 오래 걸리고 용량도 큰 문제가 있었습니다. [root@fastvm-r76-34 ~]# yum repolist Loaded plugins: product-id, search-disabled-repos, subscription-manager repo id repo namestatus !rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 29,237 ... 위와 같이 29237 개의 package 를 가지고 있습니다. 아래와 같이 하면 최신 버전의 package 만 sync 할 수 있습니다. $ reposync -n -r rhel-7-server-rpms (1/5475): 389-ds-base-1....

July 30, 2020 · chhanz