[Linux] systemd 에 Service 등록

[Linux][RHEL/CentOS] systemd 에 Service 등록 Systemd 에 사용자가 자주 사용하는 Service 를 등록하고 Systemd 를 통해 관리 할 수 있습니다. 아래는 Systemd 에 등록할 Service Script 입니다. Systemd test 용 Script #!/bin/bash echo -e " Start Systemd Test " | logger -t Testsystemd while : do echo -e "Running systemd" sleep 30 done systemd 에 Service 등록 systemd 에 서비스를 등록하기 위해 아래 경로에 아래와 같이 설정을 합니다....

January 18, 2019 · chhanz

[Linux] CentOS 6 Python 2.7 설치

[Linux] CentOS 6 Python 2.7 설치 CentOS 6 의 기본 Python 버전은 v2.6 입니다. CentOS 의 응용프로그램들은 Python 2.6 과 호환되도록 설정되어있고, 이를 Update 를 할 경우 다수의 응용프로그램들이 문제가 발생 할 수 있습니다. 하지만 일부 시스템은 몇몇 소프트웨어를 사용하기위해, 최신 버전의 Python 을 사용하기 원합니다. 위와 같은 일부 시스템에 최신 버전의 Python 을 설치하기 위해서는 다음과 같은 절차로 설치를 진행하면 됩니다. SCL Repository 연결 yum 명령을 통해 SCL Repository 를 연결합니다....

January 9, 2019 · chhanz

[Linux] Default boot kernel 변경 방법

RHEL / CentOS 7 - Default boot kernel 변경 방법 시스템을 부팅을 하면서 GRUB Menu 에서 Kernel 을 특정 버전으로 선택하여, 부팅을 할 수 있습니다. 하지만 시스템을 물리적으로 접근이 불가능하거나, 원격으로만 작업이 가능할 경우에는 아래와 같은 방법으로 Default boot Kernel 을 변경해서 특정 버전으로 선택하여 부팅을 할 수 있습니다. 주로 Kernel Update 이후, Kernel Version 원복 등으로 사용 할 수 있습니다. Kernel Entry 확인 GRUB Menu 에서 Kernel Entry 가 어떻게 나올지 확인을 합니다....

December 14, 2018 · chhanz

[Linux] CentOS 7 raw device 생성

[Linux] CentOS 7 raw device 생성 raw device 생성을 위해 아래 절차를 따라 /etc/udev/rules.d/60-raw.rules 을 수정합니다. udev rules 을 사용하여 raw device 를 생성합니다. # vi /etc/udev/rules.d/60-raw.rules SCSI Device 를 사용하는 경우, ACTION=="add|change", KERNEL=="sdc", RUN+="/usr/bin/raw /dev/raw/raw1 %N" multipath device 를 사용하는 경우, ACTION=="add|change", ENV{DM_NAME}=="mpath1", RUN+="/usr/bin/raw /dev/raw/raw1 %N" LVM device 를 사용하는 경우, ACTION=="add|change", ENV{DM_VG_NAME}=="vg_test", ENV{DM_LV_NAME}=="lv_test1", RUN+="/bin/raw /dev/raw/raw1 %N" raw device 의 권한 설정 ACTION=="add", KERNEL=="raw*", OWNER="oracle", GROUP="dba", MODE="0660" udev rules 갱신 # udevadm trigger --action=add raw device 설정 확인 # raw -qa /dev/raw/raw1: bound to major 8, minor 17 # ls -l /dev/raw total 0 crw-rw---- 1 oracle dba 162, 2 Jan 21 05:21 raw1

October 1, 2018 · chhanz

[Linux] Bonding Network Currently Active Slave 변경

RHEL / CentOS 7 Bonding Currently Active Slave 변경 Bonding(본딩) 는 이중화 구성을 통한 빠른 장애 대응 및 네트워크 대역폭 증가에 매우 유용합니다. 아래 절차는 본딩 인터페이스를 중단하지 않고, Slave 인터페이스로 전환하는 방법을 설명하려고 합니다. # cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:2a:4a:16:01:63 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:2a:4a:16:01:64 Slave queue ID: 0 위와 같이 본딩 구성이 되어 있습니다....

August 16, 2018 · chhanz

[PowerKVM] PowerKVM Install Guide

[PowerKVM] PowerKVM Install Guide IBM PowerKVM Install Guide 입니다. 작성일 : 2018.08.01 배포일 : 2019.01.14

August 1, 2018 · chhanz

[Linux] CentOS 7 네트워크 Bonding 구성

[Linux] CentOS 7 네트워크 Bonding 구성 CentOS 7 에서 bonding 구성을 위해서는 아래와 같은 절차가 필요합니다. CentOS 7 에서는 bonding 모듈이 기본적으로 로드가 되어 있지 않습니다. 아래 명령을 통해 boning 모듈을 로드합니다. # modprobe --first-time bonding Bond Interface 생성 Bond Interface 생성을 하기위해서는 /etc/sysconfig/network-scripts/ 의 ifcfg-bond0 파일을 생성해야됩니다. # cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 NAME=bond0 TYPE=Bond IPADDR=10.0.0.1 NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none BONDING_OPTS="mode=1 miimon=100" SLAVE Interface 생성 bond Interface 의 SLAVE Interface 파일을 생성합니다....

March 2, 2018 · chhanz

[RHEL] Local Yum Repository 만들기

[RHEL] Local Yum Repository 만들기 Red Hat Enterprise Linux 설치 ISO 및 물리 DVD 가 있다면 외부 rhn 을 사용하지 않고, base yum Repository 를 만들 수 있습니다. 구성 절차는 아래와 같습니다. DVD 혹은 ISO 파일 mount 진행 ISO 파일의 경우, 시스템에 Upload 진행합니다. // DVD # mount /dev/sr0 /mnt // ISO # mount /root/rhel-server-7.5-x86_64-dvd.iso /mnt Local Disk 로 DVD 혹은 ISO 파일 데이터 복사 # cp -rpH /mnt /home/repo # vi /etc/yum....

February 2, 2018 · chhanz