Back-end/소프트스퀘어드

AWS EC2에서 Elastic IP를 이용하여 Ubuntu 18.04에 LEMP(Linux, Nginx, MySQL, PHP) 설치하기

탱 'ㅅ' 2020. 10. 18. 13:41

Amazon Web Service = Cloud Server

AWS EC2 instance

athilog.github.io/aws/AWS%20EC2%20%EC%9B%B9%EC%84%9C%EB%B2%84%20%EC%99%B8%EB%B6%80%EC%A0%91%EC%86%8D%20%EC%84%A4%EC%A0%95/

 

AWS EC2 웹서버 외부접속 설정 - 아띠의 개발블로그

아띠의 개발일지

athilog.github.io

 

 

 

 

askubuntu.com/questions/223484/permission-denied-are-you-root

 

Permission denied, are you root?

I get this error whenever I try to install programs using the terminal: home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unab...

askubuntu.com

www.linuxbabe.com/ubuntu/install-lemp-stack-nginx-mariadb-php7-2-ubuntu-18-04-lts

 

How to Install LEMP Stack (Nginx, MariaDB, PHP7.2) on Ubuntu 18.04

This tutorial is going to show you how to install Nginx, MariaDB and PHP7.2 (LEMP) on Ubuntu 18.04. PHP7.2 has a minor performance boost over PHP7.1.

www.linuxbabe.com

하지만 ec2는 “Security Group”을 사용하여 접근 제어를 합니다.

ec2 security group을 설정하기 위해 ec2 웹콘솔로 접근하여 ec2 서비스를 선택합니다.

 

접속할 ip 주소 = elastic ip

 

curl -4 icanhazip.com     = elastic/public ip

 

 

Install MySQL devanswers.co/installing-nginx-mysql-php-lemp-stack-ubuntu-18-04

 

Installing Nginx, MySQL, PHP (LEMP) Stack on Ubuntu 18.04 / 19.10 | DevAnswers.co

How-to guide on configuring a LEMP Stack for Ubuntu 18.04 / 19.10. Set up a web server with Nginx, MySQL and PHP. DigitalOcean Droplet support.

devanswers.co

www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04

 

How To Install Linux, Nginx, MySQL, PHP (LEMP stack) on Ubuntu 18.04 | DigitalOcean

This tutorial details the process for installing and configuring the components that constitute a LEMP stack on an Ubuntu 18.04 server, including Nginx, MySQL, and PHP. It also includes instructions for testing that these components can communicate ef

www.digitalocean.com

 

sudo apt update && sudo install mysql-server

y

sudo service mysql status == systemctl status mysql

y

1

[new mysql password]

[re-enter]

y

y

 

Install php

sudo apt update && sudo apt install php-fpm php-mysql

fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

sudo nano /etc/nginx/sites-available/default

blog.gomgom.net/502-bad-gateway-solution-on-nginx-php_fpm/ /var/run/php/php7.2-fpm.sock

 

share4share.tistory.com/28

 

[AWS / Ubuntu] MySQL 서버 원격접속하기

우분투에 설치되어있는 MySQL 서버를 외부 툴로 이용해서 접속하는 방법을 소개하도록 하겠습니다. 우분투에 MySQL 서버 설치가 안되어있다면 관련 포스트를 확인해주세요 [확인하러 가기] MySQL 서

share4share.tistory.com

loy124.tistory.com/199

 

아마존 AWS EC2 Mysql 서버 구축하기 (2) - mysql 설치

먼저 1에 이어서 쓰는 글이다. https://loy124.tistory.com/198 아마존 AWS EC2 Mysql 서버 구축하기 (1) - 회원가입및 EC2 구축 필요한것 : 해외결제 가능한 카드(체크카드도 된다, 실제로 결제하지는 않지만 필

loy124.tistory.com

kamang-it.tistory.com/entry/MySQL%ED%8C%A8%EC%8A%A4%EC%9B%8C%EB%93%9C-%EC%A0%95%EC%B1%85-%ED%99%95%EC%9D%B8-%EB%B3%80%EA%B2%BD%ED%95%98%EA%B8%B0

 

[MySQL]패스워드 정책 확인, 변경하기

MySQL이 새로 업로드 된후에 패스워드 정책이 변경됬다. 그걸 모르고 사용하다보니 아래와 같이 에러가 뜬다. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 패스워드 정..

kamang-it.tistory.com

 

ufw port 3306 anywhere open

hannom.tistory.com/113

 

[mysql]Can't connect to MySQL server on .... (10061)

우분투 16.04 버전에 mysql을 설치하고 윈도우PC에서 접속시도를 할때 아래와 같이 에러 메시지가 나왔다. Can't connect to MySQL server on .... (10061) 해당 ip는 공유기 내부망 ip이므로 상관은 없다. mysql..

hannom.tistory.com

 

 

천안에서 내 하다가 잠실 와서 할려고 보니까 계속 putty에서 connection failed: timed out 에러남.

알고보니 연결되는 공유기에 따라 공인ip 변하는 거였음.

네이버 ip 주소 확인 다시 검색하니 다른 ip 나옴.

일단 새로운 공인 ip도 인바운드 규칙에 http, ssh 추가하니 접속 잘됨.

login : ubuntu

패스워드는 key가 처리함.

 

deepweller.tistory.com/16

 

nginx에서 virtual host 사용하기

시작하며 Spring boot로 간단한 웹서비스를 구축하는 튜토리얼을 진행 중이다. (tutorial) 튜토리얼을 진행하고 있는데, nginx를 리버스 프록시 서버로 활용하여 무중단 배포를 진행하는 과정에서 하나

deepweller.tistory.com

NginX

Server Block

Virtual Host

Reverse Proxy Server