본문 바로가기

728x90

변군

[draft] fuser 명령어 fuser 명령어(umount 옵션이 안될 때 사용)리눅스에서 파일 또는 소켓에 의해 열려 있는 프로세스를 확인하고 관리하는 데 사용됩니다. 이 명령어는 주로 파일 시스템의 특정 파일이나 디렉토리 또는 소켓에 접근하고 있는 프로세스의 PID(Process ID)를 찾는 데 유용합니다.사용법fuser [options] [file|socket|directory...]주요 옵션-a, --all : 지정된 파일 또는 소켓과 관련된 모든 프로세스를 표시(기본적으로는 해당 파일을 열고 있는 프로세스만 표시)-k, --kill : 지정된 파일을 사용 중인 프로세스를 종료(-k 옵션 뒤에 시그널을 지정하지 않으면 기본적으로 SIGKILL 시그널을 사용)-i, --interactive : 프로세스를 종료할 때 사용자에게.. 더보기
CentOS 7을 기준으로 RackTables를 설치하는 방법 CentOS 7을 기준으로 RackTables를 설치하는 방법 RackTables는 데이터센터 및 IT 자산 관리를 위한 오픈 소스 솔루션 중 하나입니다. RackTables를 설치하려면 아파치 웹 서버, PHP, MySQL (또는 MariaDB)를 설치하고 구성해야 합니다. 1. 필수 패키지 설치 yum install -y wget unzip automake libtool openssl-devel gcc 2. 아파치 웹 서버 설치 yum install -y httpd 3. MySQL(MariaDB) 설치 yum install -y mysql mysql-server service mysqld start $ service mysqld start Set root password? [Y/n] y New pas.. 더보기
윈도우 계정 관리 명령어 정리 윈도우 계정 관리 명령어 정리 1. 신규 계정 생성 testac01 계정을 생성(패스워드 없는 상태로 생성) C:\> net user testac01 /add testac02 계정을 생성 시 패스워드 지정 C:\> net user testac02 testpasswd1! /add 계정 리스트 및 계정 상세 정보 출력 C:\> net use C:\> net user testac01 2. 계정 패스워드 변경 기존 계정의 패스워드 변경 C:\> net user testac01 passwd1! 3. 계정 그룹에 등록/삭제 testac02 계정에 Administors 그룹에 추가 C:\> net localgroup Administrators testac02 /add testac02 계정에 Administors 그룹.. 더보기
SSL 인증서의 개인키에 설정된 비밀번호를 제거하는 방법 SSL 인증서의 개인키에 설정된 비밀번호를 제거하는 방법 1. OpenSSL을 사용하여 SSL 인증서(crt)와 개인 키(key)를 생성하는 방법 openssl req -subj '/CN=sangchul.kr/O=Infrastructure Team/C=KR' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout node1.key -out node1.crt $ openssl req -subj '/CN=sangchul.kr/O=Infrastructure Team/C=KR' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout node1.key -out node1.crt ...+.............. 더보기
[리눅스] iTop(itsm) 설치하기 iTop(itsm) 설치하기 iTop - IT Service Management & CMDB 테스트 환경 $ lsb_release -a No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 22.04.1 LTS Release:22.04 Codename:jammy APT 인덱스 업데이트 apt update 필수 종속성(required dependencies) 설치 apt install -y lsb-release ca-certificates apt-transport-https software-properties-common apt install -y openssl $ openssl version OpenSSL 3.0.2 15 Mar 2.. 더보기
ping check 스크립트 ping check 스크립트 vim pingcheck.sh #!/bin/bash while true; do if ping -c 1 192.168.2.1 >/dev/null; then echo "$(date '+%Y-%m-%d %H:%M:%S') : Success" >> tempfile else echo "$(date '+%Y-%m-%d %H:%M:%S') : Fail" >> tempfile fi sleep 1 done 이제 위의 코드는 1초마다 192.168.2.1에 대한 ping을 수행하고 결과를 tempfile에 기록하는 스크립트로 사용할 수 있습니다. chmod +x pingcheck.sh bash pingcheck.sh & $ tail -f tempfile 2015-03-27 13:41:35 : .. 더보기
FTP를 사용하여 파일을 업로드하는 스크립트 FTP를 사용하여 파일을 업로드하는 스크립트 ftp.sh 스크립트 작성 vim ftp.sh #!/bin/bash # 현재 날짜를 YYYYMMDD 형식으로 저장 DATE=$(date -d today +%Y%m%d) # 동기화할 서버 목록을 변수에 저장 SERVER_LIST=" relay2.scbyun.com #relay3.scbyun.com relay4.scbyun.com relay5.scbyun.com relay6.scbyun.com relay7.scbyun.com relay8.scbyun.com relay9.scbyun.com relay10.scbyun.com " # FTP 계정 정보 설정 USER='xman' PASSWD='dusrnth2001' # 동기화할 파일 패턴 설정 FILE="$DATE*.l.. 더보기
Well Known Ports Well Known Ports cat /etc/services $ cat /etc/service # Network services, Internet style # # Updated from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml . # # New ports will be added on request if they have been officially assigned # by IANA and used in the real-world or are needed by a debian package. # If you need a huge list of used numbers please.. 더보기

728x90