본문 바로가기

전체 글89

[Mac/해결] h2 데이터베이스 파일 접근권한 변경하기 zsh: permission denied: ./h2.sh ✔ 문제 spring boot에서 h2 데이터베이스를 사용하기 위해 h2 데이터베이스 파일을 다운받았다. 터미널에서 다운로드 받은 파일을 열려고 했더니 아래와 같이 권한 거부 오류가 떴다. % cd h2 h2 % cd bin % ls h2-1.4.200.jarh2.bath2.shh2w.bat % ./h2.sh zsh: permission denied: ./h2.sh ✔ 원인 permission denied 가 떴으니 권한을 확인해보자! % ls -l total 4504 -rw-r--r--@ 1 y staff 2292560 10 14 2019 h2-1.4.200.jar -rw-r--r--@ 1 y staff 98 10 14 2019 h2.bat -rw-r--r--@ 1 y staff 109 10 14 20.. 2022. 3. 10.
[Mac] 터미널에서 파일 접근 권한 변경 / 할당 chmod - / r w x / r w x / r w x directory일 때 d 아니면 - /사용자(u) / 그룹(g) / 임의의 모두(o) 대상 a : all 모두 u : user 사용자 g : group 그룹 o : other 임의의 모두 권한 r : 읽기 (1) w : 쓰기 (2) x : 실행 (4) 연산 + : 권한 추가 ( 기존권한 유지 후 추가 ) - : 권한 삭제 = : 권한 할당 ( 기존권한 초기화 후 할당 ) 옵션 -R : 하위 디렉터리 포함. 디렉터리 내부의 모든 파일의 접근 권한 변경. 명령어 - 권한 변경 명령어 chmod 대상 연산 권한 파일명 - 권한 확인 명령어 ls -l 예시 % ls -l // 파일권한 확인 명령어 -rw-r--r--@ 현재 위치의 모든 파일(*)에 대해 모든대상(.. 2022. 3. 10.
[Git] CI/CD 자동화 배포, 리액트 aws S3 에 자동으로 배포하기 환경 및 도구 - Window - VScode - React - Aws 1. aws IAM 권한 추가 - aws IAM -> 사용자 -> 권한 추가 -> CloudFrontFullAccess, AmazonSeFullAccess 권한 부여하기 2. aws_access_key 확인하기 - 윈도우 powershell 에서 본인 aws_acceses_key 확인 - aws configure 명령어로 확인 - type .\.aws\credentials 명령어로 id, key 전체 확인 - key가 여러개면 aws s3 랑 연결된 키 확인 후 등록 PS C:\Users\admin> aws configure AWS Access Key ID [****************EYQX]: AWS Secret Access K.. 2022. 3. 9.
[aws] s3 버킷 생성하기 / 버킷 정책 수정 AWS S3 버킷만들기 https://s3.console.aws.amazon.com/s3/home https://s3.console.aws.amazon.com/s3/home s3.console.aws.amazon.com 1. 버킷 만들기 이름, 리전 설정 다른건 생성 이후 변경 가능 설정 후 버킷 생성하기 2. 정적 웹 사이트 호스팅 활성화 만들어진 버킷 목록에서 버킷 선택 속성 -> 정적웹사이트 호스팅 -> 편집 이렇게 설정 후 변경사항 저장 버튼 클릭 3. 버킷정책 편집 권한 -> 버킷 정책 -> 편집 { "Version": "2012-10-17", "Statement": [ { "Sid": "Statement1", "Effect": "Allow", "Principal": "*", "Action": .. 2022. 3. 3.
[Git] xshell ubuntu 에서 github repository 연결 remote / commit/ push 환경 : window / xshell / ubuntu 에서 진행 1. 본인 github 에서 gitops 로 repository 생성 2. gitops repository 와 연결할 폴더 생성 / 올리고싶은 파일 추가 $ mkdir -p yeonhaaa/gitops $ cd yeonhaaa/gitops $ vi nginx-deploy.yaml $ vi nginx-svc.yaml 3. gitops repository 연결(Remote) / Commit / Push // README.md 파일 추가 -> 없으니까 오류났음 $ echo " # GitOps" >> README.md $ git init $ git config --global user.email "이메일주소" $ git config --global.. 2022. 2. 25.
[해결] requested NFS version or transport protocol is not supported ✔ 문제 test-pd 와 test-pd2 의 STATUS 에 running이 뜨지않음 ubuntu@master1:~/pv$ kubectl -n user1 get po -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES test-pd 0/2 ContainerCreating 0 14s master1 test-pd2 0/2 ContainerCreating 0 5s worker1 ✔ 해결과정 kubectl describe po test-pd 명령어 실행해서 자세히보기 Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 5m15.. 2022. 2. 24.
[kubernetes] 쿠버네티스 dashboard 배포 / 접속하기 1. Metrics-server 생성하기 / 확인하기 // root 에서 metrics-server 설치 ubuntu@master1:~$ sudo -i root@master1:~# kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml serviceaccount/metrics-server created // metrics-server 생성된 것 확인 root@master1:~# kubectl get po -A NAMESPACE NAME READY STATUS RESTARTS AGE kube-system kube-scheduler-master1 1/1 Running 2 .. 2022. 2. 23.
[kubernetes] 쿠버네티스 pod 확장, deployment scaling Scaling a Deployment - 쿠버네티스에서 deployment Scale 변경하는 방법 - pod 확장/축소 --replicas=n 옵션으로 pod 개수를 변경할 수 있다. - Scale out kubectl scale deployment/이름 --replicas=3 - Scale in kubectl scale deployment/이름 --replicas=0 - 확인 kubectl get deploy,rs,po - Example -n : user정하는 옵션 따로 user 정하지 않았으면 그대로 master 에서 진행. // user1 에 example 이라는 deployment 생성. ubuntu@master1:~$ kubectl -n user1 create deploy example --i.. 2022. 2. 23.
[Linux] Xshell 에서 aws 공개키 확인하기/ ssh-key pair 새로 생성하기 1. aws 에서 받은 key-pair 공개키 확인하기 Xshell // .ssh 폴더로 이동 ubuntu@worker1:~$ cd .ssh // 폴더 안에 authorized_keys 파일 확인 ubuntu@worker1:~/.ssh$ ls authorized_keys // autorized_keys 내용 출력 - 본인 공개키확인 ubuntu@worker1:~/.ssh$ cat authorized_keys ssh-rsa~~~key // 경로확인 ubuntu@worker1:~/.ssh$ pwd /home/ubuntu/.ssh 2. 윈도우 명령프롬프트에서 ssh-key 생성 // ssh-key 만들기 -> fingerprint~~나올때까지 enter C:\Users\admin>ssh-keygen Gener.. 2022. 2. 16.