5월, 2019의 게시물 표시

AWS Route 53 Cloudfront S3 연동

objective: s3 bucket의 static page를 xxx.abc.com domain으로 hosting 하기 1. s3 bucket static website hosting 하기 2. s3와 cloudfront 연결 3. 아래 링크 참고하여 route 53과 cloudfront 연결 http://pyrasis.com/book/TheArtOfAmazonWebServices/Chapter17/04

AWS Route53 도메인과 API Gateway 연결하기

under construction...

MySQL Character Set 정리

이미지
 MySQL Character set 처리 MySQL에서 설정 가능한 Character set 관련 변수들은 아래와 같은 것들이 있다. character_set_system (설정 불가능 변수)     MySQL 서버가 Identifier를 저장할 때 사용하는 Character set이며, 이 값은 섧정 불가능하고 항상 utf8로 설정되어 있다 character-set-server     MySQL 서버의 기본 Character set character_set_client     MySQL 클라이언트의 기본 Character set character_set_connection     쿼리 문장에서 인트로듀서가 없는 리터럴 또는 Number를 String으로 변환할 때 사용하는 Character set character_set_database     MySQL 데이터베이스의 Default Character set character_set_filesystem     LOAD DATA INFILE ... 또는 SELECT ... INTO OUTFILE 문장이 실행될 때, 파일의 읽고 쓰기에 사용되는 Character set character_set_results     MySQL 서버가 쿼리의 처리 결과를 클라이언트로 보낼 때 사용하는 Character set Character set 변환 및 사용 다이어그램 Server - Client 간의 문자셋 변환 쿼리 실행 요청시 사용자가 요청한 쿼리 문장은 현재 character_set_client인데, MySQL 서버는 이 쿼리 문장의 문자 셋을 character_set_connection 으로 변환 후 실행 만약, character_set_client와 character_set_connection이 동일할 경우 변환 없음 쿼리 결과 전송시 컬럼의 문자셋이 Latin2인데, character_set_results가 Latin1이

AWS Bastion Port Forwarding Shell Script

Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 function aws_forwarding_by_bastion { echo "Remove localhost..." ssh-keygen -R localhost echo "connecting to bastion: ${AWS_BASTION_ENDPOINT}" echo "forwarding local SSH port(22) to Test EC2 - ${AWS_TEST_EC2_ENDPOINT}:22." echo "forwarding local Kibana port(9200) to AES:443" echo "forwarding local DB port(3306) to Test DB:3306" echo "" sudo ssh -i ~/.ssh/ { pem file } ec2-user@ ${ AWS_BASTION_ENDPOINT } \ -L 22: ${ AWS_TEST_EC2_ENDPOINT } :22 \ -L 9200: ${ AWS_ES_ENDPOINT } :443 \ -L 3306: ${ AWS_TEST_RDS_ENDPOIN } :3306 }

[Ubuntu] Could not get lock /var/lib/dpkg/lock 오류 해결법

apt update, upgrade등에서 아래와 같은 에러가 발생할 때가 있다. E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 이 문제는 /var/lib/dpkg/lock 파일이 존재하면 패키지 및 인덱스 정보를 업데이트 하지 않기 때문에 생기는 문제이며, 다른 곳에서 사용중이 아닌데도 이 에러가 발생하면 해당 파일을 아래와 같이 삭제해서 문제를 해결 할 수 있다. 1 2 3 4 $> sudo rm /var/lib/apt/lists/lock $> sudo rm /var/cache/apt/archives/lock $> sudo rm /var/lib/dpkg/lock $> sudo dpkg --configure -a

Ubuntu 패키지 관리 툴: apt 사용법

우분투에서 패키지를 관리하는 툴로 apt-get과 apt-cache를 주로 사용해 왔습니다. 요즘에는 두 명령을 결합한 명령이  apt 를 주로 사용합니다. apt는 apt-get/apt-cache를 완전히 통합하는 툴은 아닌 것 같습니다. 사용자 편리성을 위해서 apt-get과 apt-cache의 주요 기능을 결합한 툴입니다. man에서는 apt를 다음과 같이 설명합니다. apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get and apt-cache. 사용자가 일반 리눅스 사용자라면 apt를 사용하는 것이 효과적이고, 패키지 관리의 세밀한 옵션을 주로 사용하는 스크립트 작업에서는 apt-get을 사용하는 것이 좋습니다. 이제부터 기본적인 apt 명령 사용법을 정리하겠습니다. apt 명령과 apt-get/apt-cache 명령 비교 다음은 apt 명령과 기존의 apt-get/apt-cache를 비교한 테이블입니다. apt 명령 기존 명령 설명 apt install apt-get install 패키지 목록 apt remove apt-get remove 패키지 삭제 apt purge apt-get purge 패키지와 관련 설정 제거 apt update apt-get update 레파지토리 인덱스 갱신 apt upgrade apt-get upgrade 업그레이드 가능한 모든 패키지 업그레이드 apt autoremove apt-get autoremove 불필요한 패키지 제거 apt full-upgrade apt-get dist-upgrade 의존