rhel7 시스템 및 서비스 관리

2015. 9. 21. 22:27 - mr.november11

1) systemd 명령어
     systemctl status<UNIT>
     systemctl stop<UNIT>
     systemctl start<UNIT>
     systemctl restart<UNIT>
     systemctl reload<UNIT>
     systemctl mask<UNIT>
     systemctl umask<UNIT>
     systemctl enable <UNIT
     systemctl disable <UNIT>
     systemctl list-dependencies <UNIT>
     
2) systemctl 을 사용하여 서비스 관리
     systemctl status sshd
     systemctl restart sshd
     systemctl status sshd
     systemctl reload sshd
     systemctl status sshd
     systemctl stop chronyd
     systemctl status chronyd
     systemctl is-enabled chronyd
     systemctl status chronyd
     systemctl disable chronyd
     systemctl status chronyd


3) GUI, CLI 전환 명령어
     systemctl isolate multi-user.target     (CLI)
     systemctl isolate graphical.target      (GUI)

4) 부팅 대상 선택
     systemctl isolate multi-user.target
     systemctl set-default multi-user.target 
     systemctl reboot
     
     e 입력으로 편집 화면 이동 
     linux16 시작 행 이동
     마지막에 systemd.unit=rescue.target 입력 Ctrl+X 입력
     
     root 로그인 후 
     systemctl set-default graphical.target 입력 

     Ctrl+d 계속 눌러 재부팅     

5) 분실한 root 암호 재설정
     e입력으로 편집화면 이동
     linux16 시작행 이동
     마지막에 rd.break 입력

     mount -oremount,rw /sysroot
     chroot /sysroot
     passwd 로 암호 변경
     touch /.autorelabel

6) 부트 문제 복구
     /etc/fstab 파일 설정 문제로 부팅이 되지 않는 경우

     e입력으로 편집화면 이동
     linux16 시작행 이동
     마지막에 emergency 입력

     mount 
     mount -oremount,rw ( 현재 읽기 전용으로 마운트 된 상태 )
     mount -a
     vi /etc/fstab 실행 후 편집
     mount -a
     reboot
   
7) grup 설정값 부트 로더 문제 복구 

     e입력으로 편집화면 이동
     linux16 시작행 이동 ( ora16을 linux16으로 수정 )
     
     grub2-mkconfig > /boot/grub2/grub.cfg 
     reboot

다른 카테고리의 글 목록

Linux 카테고리의 포스트를 톺아봅니다