brunch

You can make anything
by writing

C.S.Lewis

by Master Seo May 17. 2020

115. 1) cloud shell,vm - cli

<1> gcp계정과 프로젝트 ID확인하기


화면 오른쪽 위에 Cloud shell 클릭 실행한다.   편지봉투 모양의 아이콘 이다.



// 활성화된 계정 확인

gcloud auth list

Credentialed Accounts

ACTIVE  ACCOUNT*       

topasvga@naver.com

To set the active account, run:    

$ gcloud config set account `ACCOUNT`



//현재 프로젝트 확인

gcloud config list project 

[core] 

project = seo-pj-277509 

Your active configuration is: [cloudshell-27469



참고:  환경 설정하기

https://brunch.co.kr/@topasvga/866




<2> centos8에 achach 설치하기


centos 8

http , https 허용


ssh 접속

SSH클릭한다.



apache 설치

[root@instance-1 ~]# yum install httpd -y


[root@instance-1 html]# /usr/sbin/httpd


[root@instance-1 html]# ps -ef |grep httpd

root 6561 1 0 03:41 ? 00:00:00 /usr/sbin/httpd
apache 6562 6561 0 03:41 ? 00:00:00 /usr/sbin/httpd
apache 6563 6561 0 03:41 ? 00:00:00 /usr/sbin/httpd
apache 6564 6561 0 03:41 ? 00:00:00 /usr/sbin/httpd
apache 6565 6561 0 03:41 ? 00:00:00 /usr/sbin/httpd
root 6778 4832 0 03:41 pts/0 00:00:00 grep --color=auto httpd

공인 IP로 접속하기


centos7   https://www.cloudbooklet.com/install-apache-on-centos-7-google-cloud/

centos8  https://www.cloudbooklet.com/how-to-install-apache-on-centos-8-google-cloud/



데비안인 경우

apt-get update && sudo apt-get install apache2 -y

데비안 apache  설치  https://cloud.google.com/compute/docs/tutorials/basic-webserver-apache?hl=ko


감사합니다.

매거진의 이전글 114.GCP 실습6탄 - VM,방화벽,LB

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari