목록분류 전체보기 (1395)
변군이글루(Mirror)

젠킨스 파이프라인을 이용한 도커 이미지 빌드(CI/CD) Jenkinsfile pipeline { environment { registry = "anti1346/apm" registryCredential = 'dockerimagepush' dockerImage = '' } agent any stages { stage('Build image') { steps { sh 'docker build -t $registry:$BUILD_NUMBER .' sh 'docker image tag $registry:$BUILD_NUMBER $registry:latest' echo 'Build image...' } } stage('Test image') { steps { sh 'docker run -d -p 80:80 --..

git 토큰 로그인 방법 git clone https://:@ $ git clone https://:@github.com/anti1346/centos7.git

jenkins gitlab 연동(webhook 설정) gitlab 구성 .env 편집 cat 액세스 토큰 > 개인 액세스 토큰 (or 프로필 > 환경설정 > 액세스 토큰 > 개인 액세스 토큰) 액세스 토큰 생성 - Token name : gitlabforjenkins - 만료일 : - Select a role : - Select scopes : jenkins 구성 docker-compose.yml 편집 cat Jenkins 관리 > System Configuration > 플러그인 관리 - GitLab Plugin - Generic Webhook Trigger Plugin Jenkins에서 gitlab에서 받은 Token 넣기 Dashboard > Jenkins 관리 > System Configurati..

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 접속 시간을 체크하는 방법 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 (또는 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에서 기본 리포지토리를 미러 서버로 변경하는 방법CentOS 8에서 미러 서버를 사용하여 패키지를 설치하거나 업데이트하려면 /etc/yum.repos.d/ 디렉토리에 새로운 리포지토리 파일을 추가하거나 기존 리포지토리 파일을 편집해야 합니다.1. 리포지토리 파일 생성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 t..

리눅스 tar 명령어를 사용하여 풀 백업, 증분 백업 및 자동 백업을 하는 방법 tar 명령어를 사용하여 풀 백업, 증분 백업 및 자동 백업을 수행할 수 있습니다. 아래에 각 백업 유형에 대한 설명과 예제를 제공합니다. 1. 풀 백업 (Full Backup) 풀 백업은 모든 파일과 디렉토리를 한 번에 백업하는 방식입니다. 아래는 tar 명령어를 사용하여 풀 백업을 생성하는 예제입니다. tar -czvf full_backup.tar.gz /path/to/source 위 명령어는 /path/to/source 경로의 모든 파일과 디렉토리를 압축하여 full_backup.tar.gz라는 이름의 아카이브 파일로 생성합니다. 2. 증분 백업 (Incremental Backup) 증분 백업은 이전 백업과의 차이점만을..