728x90
반응형

Linux 22

[Linux] apache/http 한글 깨짐

# html 페이지 한글 깨짐linux에서 apach2 / httpd 로 html페이지를 띄우면 한글이 깨지는 경우가 발생한다.locale의 LANG을 바꾸면 되지만 다른 설정들의 영향을 줄 수 있다.이에 따라 페이지 설정만을 바꾸는 방법을 남긴다.# apache2/etc/apache2/apache2.conf 수정AddDefaultCharset UTF-8 >#AddDefaultCharset UTF-8 위 수정후에도 동일하다면 아래의 파일도 확인./etc/apache2/conf-available/charset.confAddDefaultCharset UTF-8>#AddDefaultCharset UTF-8   # httpd/etc/httpd/conf/httpd.conf 수정AddDefaultCharset UT..

Linux 2025.03.12

[Linux] sed 명령어

sed 명령어1. 수정하기sed -i 's/[수정 전]/[수정 후]/g' [file]* [수정 전] 및 [수정 후] 에 특수문자입력시 \ 로 이스케이프문자 지정.* [file]을 *.txt등으로 여러파일을 한번에 수정 가능.2. 특정 내용이 포함된 줄 삭제 or 특정 내용 포함된 줄 빼고 삭제특정 내용 포함된 줄 삭제sed -i '/[pattern]/d' [file]특정 내용 포함된 줄 빼고 삭제sed -i '/[pattern]/!d' [file]* not을 뜻하는 !를 붙여서 특정 내용이 포함된 줄 삭제 or 제외 후 삭제 가능

Linux 2024.11.25

[Linux] pam_unix(sudo:auth): conversation failed, auth could not identify password for [service]

Symptom..서비스[service]는 올라가있는데(active), 로그를 보면 실패했다~ 안된다~ 는 식으로 나옴.pam_unix(sudo:auth): conversation failedpam_unix(sudo:auth): auth could not identify password for [service]추가로 pam이나 auth, sudo를 얘기함.Touble-shooting../etc/sudoers에 서비스를 사용하는 사용자를 추가해준다.[user] ALL=NOPASSWD:[command]# ex)# test-user ALL=NOPASSWD:/bin/test-service/etc/sudoers파일을 수정 한 후 서비스 재시작하기service [service] restart# orsystemctl ..

Linux 2024.09.27

[Linux] Curl error 60 SSL peer certificate or SSH remote key was not OK

env.RHEL (CentOS 7, Rocky 7)eol이 지난 OS에서 발생한것으로 보임(추측..) Trouble..yum update / upgrade등을 진행할 때 제목에서의 에러가 발생한다.Curl error 60 SSL peer certificate or SSH remote key was not OK 사용하는 OS의 eol때문인지, 기존의 source.list에서 받아오지를 못함. source.list의 url을 변경해봐도 동일. Trouble-Shooting../etc/yum.conf 파일 수정vi /etc/yum.conf 입력모드(i)로 변경 후 맨 아래줄에 해당 라인 추가sslverify=falseorvi편집기로 열지 않고 수정하기echo "sslverify=false" >> /etc/yu..

Linux 2024.09.12

[Linux] /etc/fstab 설정 자동 마운트

/etc/fstab..리눅스 시스템에서 OS디스크 영역말고, 추가 디스크를 사용해 시스템에 붙여 사용하는 경우가 있다.이 경우 마운트를 해서 사용하는데 시스템이 리부팅(reboot)이 되거나 재마운트(moutn -a)하는 경우에 마운트해 사용하던 디스크가 빠진다.해당 이슈를 방지하기 위해 fstab 파일을 통해 자동적으로 원하는 디스크를 원하는 위치로 마운트 시킬수 있는데 이에 대한 글을 남겨본다. fstab 설정아래는 fstab의 기본 예시로 나타냈다.# /etc/fstab[file_system_device] [mount_point] [file_system] [options] [dump fsck]UUID=asdf123-assdf23-assfeg-23v2d / ext4 defaults 0 0/dev/sd..

Linux 2024.09.10

[Linux] stress-ng test 스트레스 테스트

Install stress-ngstress-ng 설치# Ubuntuapt install stress-ng# red-hatyum install stress-ngRun Stress-ngstress-ng로 테스트 실행# Ubuntu, red-hatstress-ng --cpu [cpu_worker_num] --vm [vm_worker_num] --vm-bytes [vm_worker_bytes] -t [time]# ex)stress-ng --cpu 1 -t 1m --metrics-brief # --metrics-brief : 결과값이 0이 아닌 것만 출력 cpu, vm에 들어가는 값은 작업량 느낌으로 이해(프로세스 개수)-t 1m : 시간을 1분동안 설정

Linux 2024.06.27

[Linux] disk label(table) 지우기

디스크 확인[root@test ~]# parted /dev/sda GNU Parted 3.5 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p                                                                 Model: AVAGO MR9361-8i (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:  : gpt label이 붙어있음 partition table 지우기 및 확인dd if=/dev/zero of=/de..

Linux 2024.06.18
728x90
반응형