분류 전체보기

    Linux - 80 포트 접속 시 8080포트로 바인딩, 규칙 삭제

    명령어# 바인딩 명령어sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080# 규칙 삭제 명령어sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080주의사항80 포트와 8080 포트가 모두 열려있는지 확인 해야한다.

    Linux - .sh permission denied 에러

    에러 발생내가 만든 sh 파일을 실행하려고 할 때 파일명.sh permission denied에러가 발생했다.해결 방법아래 명령어로 실행 권한을 부여한다.chmod +x 파일명

    Spring - timezone 한국 고정

    코드public class MySpringApplication { @PostConstruct public void started() { // timezone 한국 고정 TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul")); } public static void main(String[] args) { SpringApplication.run(MySpringApplication.class, args); }}설명started 메소드를 SpringBootApplication에 추가하면 된다.

    Ubuntu - java 21 설치

    명령어# apt 리스트 업데이트sudo apt update# java 21 버전 다운로드sudo apt install openjdk-21-jdk-headless# 설치 가능한 java 버전 확인# sudo apt list openjdk*

    Ubuntu - git 설치

    명령어# 패키지 리스트 업데이트sudo apt-get install git# git 설치sudo apt install git# git version 확인git --version

    Linux - 서버 시간대 한국으로 변경

    현재 서버 시간 확인 명령어date시간대 변경 명령어# 기존 심볼릭 링크 삭제sudo rm /etc/localtime# 한국 시간으로 심볼릭 링크 생성sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

    AWS - git ssh 연동 및 spring 프로젝트 실행

    1. git 설치 확인git --version2. git ssh키 생성cd ~/.sshssh-keygen -t rsa -C github 계정 메일(example@naver.com)3. 키페어 확인cat id_rsa.pub4. github 키 등록github -> settings -> SSH and GPG keys1. new SSH KEY 버튼 클릭2. Title 입력 (자유)3. Key 입력 (3번에서 출력한 키페어 복붙)예시)ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1231231232RtHdzEn484xo4Yt+LvLGuBK7JimMnnqGXKEcDNQpaLfO9Rka7nKNfqc+3zhbcRHWiZODgDJdqPgCcjrcpmOSzV/2h5B6H19wFaQ4izHLbuJO..

    Linux - java 설치

    1. java 설치 여부 확인java --version2. java 설치 가능 리스트 확인yum list java*3. java 설치sudo yum -y install 파일명(java-21-amazon-corretto.x86_64)