728x90

전체 글 83

[Prometheus] mysqld_exporter 연동 (Linux)

prometheus에서 MariaDB galera cluster 환경을 모니터링하기 위해서는 mysqld_exporter가 필요하며, 연동 작업이 필요하다. mysqld_exporter 다운로드wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.15.0/mysqld_exporter-0.15.0.linux-amd64.tar.gz→ 다운로드 링크 : https://github.com/prometheus/mysqld_exporter 압축해제tar xzvf mysqld_exporter-0.15.1.linux-amd64.tar.gz  my.cnf 수정vi /etc/my.cnf //mariaDB에 접속 후 데이터 스크래핑을 위한 계정정..

Prometheus 2024.08.26

[Prometheus] Node-exporter 연동 (Linux)

node-exporter는 prometheus에서 공식으로 제공하는 시스템 메트릭 수집기이며, prometheus 서버의 리소스를 모니터링하기 위해서는 다운로드 및 연동 작업이 필요하다. node-exporter 다운로드wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz tar  압축 해제tar xzvf node_exporter-1.7.0.linux-amd64.tar.gz node-exporter 실행cd node_exporter-1.7.0.linux-amd64./node_exporter & //백그라운드 실행 node_exporter 서비스 등록vi ..

Prometheus 2024.08.26

Prometheus?

SoundCloud사에서 만든 오픈소스 시스템 모니터링 및 경고 툴킷현재 독립형 오픈소스 프로젝트로 많은 회사들이 사용하고 있음kubernetes에서도 Prometheus를 사용하여 매트릭 수집 및 대시보드 구축하는 방식을 지향함   Centos 7 환경 (Vmware player 가상 환경)에서 설치 진행Prometheus 다운로드 (https://prometheus.io/download/ 참고)  linux용 설치 tar 파일 다운로드 및 Linux 서버 업로드tar -xzvf prometheus-2.50.1.linux-amd64.tar.gz //tar파일 설치 서버에 이동 후 압축 해제  Prometheus 서비스 등록 (자동 실행)vi /etc/systemd/system/prometheus.s..

Prometheus 2024.08.26

[Windows] Server, OS 평가판 기간 연장하는 법 (최대 3년)

Microsoft 홈페이지에서 무료로 다운로드 받을 수 있는 Windows OS/Server 평가판은 다운로드 및 설치와 동시에 180일 제한이 걸려있다. 하지만 이 기간을 최대 3년까지 연장할 수 있다. 바탕 화면의 오른쪽 하단에 이와같이 표시가 있어야 가능하다.  powershell을 열고 아래와 같이 입력해보면,slmgr -dlv Remaining Windows rearm count : 연장 가능한 횟수Trusted time : 현재 유효한 기간(분단위, 일단위)을 확인할 수 있다. 2회를 이미 연장하여 현재 4회만 남아있는 상태이다. 만약 평가판 기간이 끝났다면 아래 명령을 통해 180일 더 연장시키자.slmgr -rearm 컴퓨터를 재부팅한 후 연장기간을 확인하자.slmgr -dli

OS/Windows 2023.01.05

Linux 명령어 정리

userdel -M [유저명] : 유저 및 홈디렉토리까지 삭제 usermod -d [홈디렉토리 경로] [유저명] : 특정 유저의 홈디렉토리 경로 변경 ​ passwd [유저명] : 패스워드 설정 /etc 에서 vi passwd로 계정 설정내용 확인가능(홈디렉토리 등) ​ ps -efx | grep [프로세스명] : 현재 실행중인 프로세스 상황 프롬프트 창에 전체 표시 grep -i error *.log | grep Oct | grep 2019 : 로그파일 경로에 있는 상태에서 전체 로그파일을 검색하여 2019, Oct가 포함된 에러 로그 모두 출력 ​ top, topas, glance : 수행중인 프로세스 목록 및 메모리 모니터링 ​ top | grep "name" : 원하는 프로세스만 보기 top -a..

OS/Linux 2023.01.04

[Linux] Centos6 yum update 에러

root 권한으로 yum update를 입력했으나​아래와 같은 에러가 발생한다면​Loaded plugins: fastestmirror, securitySetting up Update ProcessDetermining fastest mirrors...Error: Cannot find a valid baseurl for repo: base 아래 명령어를 root 권한으로 입력한 후 다시 yum update하면 정상적으로 update 된다.echo https://vault.centos.org/6.10/os/x86_64/ > /var/cache/yum/x86_64/6/base/mirrorlist.txtecho http://vault.centos.org/6.10/extras/x86_64/ > /var/cache/..

OS/Linux 2023.01.04

[Linux] Centos 7 방화벽 포트 개방

Centos 6에서만 테스트하다가 7로 넘어오니 설정이 다른 부분이 있어 정리해보았다.​기존 iptables에서 포트를 개방하는 것과 달리 firewalld를 통해 이루어진다.​firewall-cmd --permanent --zone=public --add-port=46464/tcp46464 tcp포트를 영구적으로 개방하는 명령어이다.​이후 reload를 통해 적용한다.​firewall-cmd --reload​firewalld는 on/off가 가능하다.(활성/비활성)systemctl start firewalldsystemctl enable firewalld systemctl stop firewalldsystemctl disable firewalld

OS/Linux 2023.01.03

[Linux] chown, chmod

1. chown -R [소유자.그룹] [파일/디렉토리명]​ex) chown user a.txt -> a.txt의 소유자를 user로 변경한다.chown user.group a.txt -> a.txt의 소유자를 user로, 그룹을 group로 변경한다.​-> 기존 root 사용자, root 그룹에서 원하는 사용자, 그룹으로 변경한다.​​2. chmod [숫자 모드] [파일/디렉토리명] - 권한을 가진 user로 로그인해야 적용가능​r = 읽기 권한, 4w = 쓰기 권한, 2x = 실행 권한, 1ex) r,x 권한 부여 시 5, r,w,x 권한 부여 시 7ex) chmod 755 a.txt -> a.txt의 사용자 권한 r,w,x / 그룹 권한 r,x / 기타 사용자 r,x -> 권한 부여 후 ll (영소문..

OS/Linux 2023.01.03

[Linux] Centos 7 Openjdk 설치 및 환경변수 설정

Centos7 환경에 Openjdk를 설치하는 과정과 환경변수 설정하는 법에 대한 포스팅입니다.​​yum으로 openjdk 설치yum install java-1.8.0-openjdk​2. 환경변수 등록# vi /etc/profile...JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64PATH=$PATH:$JAVA_HOME/binCLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jarexport JAVA_HOME PATH CLASSPATH# source /etc/profile# echo $JAVA_HOME​3. 설치 확인java -version

OS/Linux 2023.01.03
728x90