본문 바로가기

프로그래밍/AWS

AWS EC2 접속과 시용

Terninal


- private 키 권한 설정

chmod 400 aws_password.pem


- 현재 위치

pwd


- 디렉토리 및 파일 보기

ls -al


- ssh접속 (윈도우에서 Xshell http://www.netsarang.co.kr 또는 Putty)

ssh -i "aws_password.pem" ubuntu@54.238.222.246


- 아파치 설치

sudo apt-get update

sudo apt-get install apache2


- jdk 다운 및 설치

wget

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz

curl

curl -O -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz


설치

tar -xvf jdk-8u171-linux-x64.tar.gz


환경설정 PATH 설정


폴더명 얼라이어스

ln -s jdk1.8.0_171/ java


cd java -> 해당 폴더로 접근 가능 


cd ~ 로그인한 계정의 홈 디렉토리로 이동


.bash_profile 편집

vi .bash_profile

i 키누르면 insert 모드

PATH=$PATH:~/java/bin

esc 키 누르고

wq 로 저장하고 끝냄.


재부팅 하지 않고 바로 환경설정 불러오기

source .bash_profile


깃설치 (우분투는 설치되어있음)

sudo apt-get update

sudo apt-get install git


깃 버전 확인

git --version


원격지에서 프로젝트 복사

git clone htts://gihub.com/------/-----.git


curl 옵션 설명

  • -O : Write output to a file named as the remote file
  • -j : junk cookies
  • -k : SSL 인증서 유효성 검증 안 함.
  • -L : 서버가 HTTP 301, 302 응답을 전송할 경우 링크를 따라 감.
  • -H [arg] -> headers


-파일 삭제

sudo rm index.html

-파일 생성

sudo nano index.html



원격 프로그램

-맥에서..

Microsoft Remote Desktop