본문 바로가기

728x90

리눅스

[리눅스] gitlab runner 설치 및 실행하기 gitlab runner 설치 및 실행하기 gitlab runner 설치 $ mkdir gitlab-runner $ cd gitlab-runner docker-compose.yml 편집 cat 설정 > CI/CD > Runners 섹션 docker-compose exec gitlab-runner bash gitlab-runner register $ docker-compose exec gitlab-runner bash root@acd54bbc5de3:/$ gitlab-runner register Runtime platform arch=amd64 os=linux pid=25 revision=bd40e3da version=14.9.1 Running in system-mode. Enter the GitLab i.. 더보기
[리눅스] Google OTP를 설치하는 방법 Google OTP를 설치하는 방법 google-authenticator 패키지 설치 $ yum install -y google-authenticator Google Authenticator 인증 파일 생성(QR Code 생성) $ google-authenticator -s ~/.ssh/google_authenticator Do you want authentication tokens to be time-based (y/n) y Do you want me to update your "/home/ec2-user/.ssh/google_authenticator" file? (y/n) y Do you want to disallow multiple uses of the same authentication token.. 더보기
[리눅스] 서비스(데몬) 등록 방법 리눅스 서비스(데몬) 등록 방법 chkconfig --add [서비스 명] chkconfig --level [서비스 명] chkconfig --del [서비스 명] chkconfig --list [서비스 명] CentOS 6 chkconfig 명령으로 서비스 관리 zabbix-agent 서비스 등록 chkconfig --add zabbix-agent zabbix-agent 서비스 확인 $ chkconfig --list | egrep zabbix zabbix-agent 0:off1:off2:off3:off4:off5:off6:off level 3, 5 일 경우 zabbix-agent 서비스 부팅 chkconfig --level 35 zabbix-agent on zabbix-agent 서비스 확인 $ chk.. 더보기
로컬 IP 및 공개 IP 찾는 방법(myip) 로컬 IP 및 공개 IP 찾는 방법(myip) vim ~/.bashrc myip() { externalip=`curl -SsfL ifconfig.co` localip=`ip route get 1.2.3.4 2>/dev/null | grep -Eo 'src [0-9.]+' | grep -Eo '[0-9.]+'` echo "Local IPADDR : $localip" echo "External IPADDR : $externalip" } source ~/.bashrc $ myip Local IPADDR : 10.100.3.188 External IPADDR : 3.14.11.88 더보기
[draft] 우분투에서 sudo를 비밀번호 없이 사용하는 방법 우분투에서 sudo를 비밀번호 없이 사용하는 방법우분투에서 특정 사용자 또는 사용자 그룹이 sudo 명령어를 사용할 때 비밀번호 입력을 생략하도록 설정할 수 있습니다. 이 설정은 보안에 영향을 미칠 수 있으므로 특정 상황에서 임시로 사용하는 것이 좋습니다.1. sudoers 파일 수정sudo 설정 파일(/etc/sudoers)을 수정합니다.sudo visudo$ sudo visudo## This file MUST be edited with the 'visudo' command as root.## Please consider adding local content in /etc/sudoers.d/ instead of# directly modifying this file.## See the man page f.. 더보기
우분투 CLI(Command Line Interface) 환경에서 네트워크 설정(고정 IP 할당) 우분투 CLI(Command Line Interface) 환경에서 네트워크 설정(고정 IP 할당) 테스트 환경 $ lsb_release -d Description: Ubuntu 20.04 LTS $ getconf LONG_BIT 64 고정 IP 설정 ip addr 명령으로 네트워크 인터페이스 이름 확인 일반적으로 eth0, eth1, wlan0 등과 같은 인터페이스 이름이 사용됩니다. ip addr $ ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 ... 2: ens33: mtu 1500 qdisc fq_codel state UP group default qlen 1000 ... 00-installer-config.. 더보기
우분투에서 기본 텍스트 편집기를 변경하는 방법(ubuntu editor) 우분투에서 기본 텍스트 편집기를 변경하는 방법(ubuntu editor) update-alternatives 명령어는 Debian 계열의 Linux 시스템에서 여러 프로그램 간에 대안을 선택하거나 설정하는데 사용됩니다. 주로 여러 버전의 소프트웨어를 시스템에 설치할 때 유용하게 활용됩니다. 기본 텍스트 편집기 변경(vim.basic) update-alternatives --config editor $ sudo update-alternatives --config editor 대체 항목 editor에 대해 (/usr/bin/editor 제공) 4개 선택이 있습니다. 선택 경로 우선순위 상태 ------------------------------------------------------------ * 0 /.. 더보기
우분투에서 fabric 2를 설치하고 사용하는 방법 우분투에서 fabric 2를 설치하고 사용하는 방법 Fabric은 파이썬으로 작성된 서버 관리 및 배포 도구로 특히 SSH를 통한 명령 실행과 파일 전송을 지원합니다. Fabric 2.x 버전은 Fabric 1.x와는 구조가 다르며 여러 기능이 업데이트되었습니다. Fabric 2 Project https://pypi.org/project/fabric2/ 테스트 환경 운영체제 버전 확인 $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.6 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.c.. 더보기

728x90