본문 바로가기

728x90

리눅스

[보안취약점] 리눅스 계정 잠금 임계값 설정 리눅스 계정 잠금 임계값 설정 점검 내용 : 사용자 계정 로그인 실패 시 계정잠금 임계값이 설정되어 있는지 점검 판단기준 : 계정 잠금 임계값을 10회 이하의 값으로 설정되어 있는 경우 점검 및 조치 방법 system-auth 파일 vim /etc/pam.d/system-auth #%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth required pam_env.so auth required pam_faildelay.so delay=2000000 auth sufficient pam_unix.so nullok try_first_pass auth requisite.. 더보기
CentOS 7에서 오라클 자바를 설치하는 방법 CentOS 7에서 오라클 자바를 설치하는 방법 웹 페이지(rpm 패키지 링크 복사) http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 오라클 자바 다운로드 wget --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u172-b11/a58eab1ec242421181065cdc37240b08/jdk-8u172-linux-x64.rpm Java(JDK) 설치 sudo yum install jdk-8u172-linux-x64.rpm J.. 더보기
Base64 인코딩(Base64 디코딩) Base64 인코딩(Base64 디코딩) Base64 인코딩 echo -n 'admin:admin' | base64 $ echo -n 'admin:admin' | base64 YWRtaW46YWRtaW4= Base64 디코딩 echo -n 'YWRtaW46YWRtaW4=' | base64 --decode $ echo -n 'YWRtaW46YWRtaW4=' | base64 --decode admin:admin BASE64 Decode and Encode https://www.base64encode.org/ Base64 Encode and Decode - Online Encode to Base64 format or decode from it with various advanced options. Our s.. 더보기
CentOS 7에서 PHP-FPM 8.1을 설치하는 방법 CentOS 7에서 PHP-FPM 8.1을 설치하는 방법 PHP-FPM : PHP FastCGI Process Manager CentOS 7은 PHP 5.x를 지원하며, PHP 8.1은 공식 CentOS 7 저장소에 포함되어 있지 않습니다. PHP 8.1을 CentOS 7에 설치하려면 추가 저장소 설정이 필요하며, Remi 저장소는 이를 제공하는 인기있는 옵션 중 하나입니다. Remi 저장소를 사용하여 CentOS 7에 PHP 8.1을 설치할 수 있습니다. 테스트 환경 운영체제 버전 정보 확인 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ getconf LONG_BIT 64 filewalld 서비스 정지 sudo systemctl st.. 더보기
[리눅스] CentOS 7.x YUM으로 APM 설치 YUM으로 APM 설치 EPEL 및 YUM Utilities 패키지 설치 yum install -y epel-release yum-utils $ yum install -y epel-release yum-utils 컴파일에 필요한 라이브러리 설치 yum install -y gcc gcc-c++ gdbm-devel ncurses-devel $ yum install -y gcc gcc-c++ gdbm-devel ncurses-devel APM 설치에 필요한 라이브러리 설치 yum install -y openssl-devel gd-devel libpng-devel libjpeg-devel freetype-devel fontconfig-devel libxml2-devel gmp-devel mhash-devel l.. 더보기
SSH 접속 시간을 체크하는 방법 SSH 접속 시간을 체크하는 방법 date; echo quit | telnet 10.11.3.81 22 2>/dev/null | egrep -qi Connected; echo $?; date $ date; echo quit | telnet 10.11.3.81 22 2>/dev/null | egrep -qi Connected; echo $?; date 2020년 8월 4일 화요일 16시 09분 29초 KST 0 2020년 8월 4일 화요일 16시 09분 29초 KST 위의 명령어는 telnet을 사용하여 SSH 포트(기본값 22)로 특정 IP 주소(여기서는 10.11.3.81)에 접속하여 연결 여부를 확인하는 방법입니다. 결과적으로 접속이 성공했는지에 따라 0 또는 1을 출력합니다. 여기에 날짜와 시간 정.. 더보기
MySQL 데이터베이스를 백업하고 복원하는 방법 MySQL (또는 MariaDB) 데이터베이스를 백업하고 복원하는 방법 1. 백업하기 전체 데이터베이스 백업: mysqldump -u [사용자] -p [데이터베이스명] > [백업파일명].sql 특정 테이블 백업: mysqldump -u [사용자] -p [데이터베이스명] [테이블명] > [백업파일명].sql 예시: mysqldump -u root -p mydatabase > backup.sql 2. 복원하기 전체 데이터베이스 복원: mysql -u [사용자] -p [데이터베이스명] < [백업파일명].sql 특정 테이블 복원: mysql -u [사용자] -p [데이터베이스명] < [백업파일명].sql 예시: mysql -u root -p mydatabase < backup.sql 참고 [사용자]: MySQL.. 더보기
CentOS 8 미러 서버용 repository 파일 CentOS 8 미러 서버용 repository 파일 CentOS-Base.repo 편집 vim /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorli.. 더보기

728x90