Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 14 KB
---
layout : article
title: "[aws] 아마존 웹 서비스 ec2 _ ubuntu에 php(apmsetup) 설치하기"
aside:
toc: true
tags: Web
category : Web
author: melonicedlatte
published : True
hellogohn_num : 138
key : 2017-09-29-183118
---
<p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><span style="font-size: 36px;">- AMP 설치하기&nbsp;</span><br><br><span style="background-color: rgb(206, 222, 231);">Apache2 웹서버, MySQL 데이터베이스 서버, PHP</span>를 Ubuntu에 설치하는 과정을 소개합니다.<br>amp 을 정리해 놓은 글은 많은데, 그 중에서도 가장 잘 된것 같은 글을 참조해서 저도 포스팅 하고 있습니다.<br>하단에 링크 참조했습니다.&nbsp;<br>글 써주신 분 감사합니다!!&nbsp;<br><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">AMP는 Apache, MySQL, PHP의 첫글자만 가지고 만든 약어입니다.</span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;">주로&nbsp;<span style="background-color: rgb(206, 222, 231);">AMPSetup</span>&nbsp;이라는 것으로 많은 분들이 윈도우에서 접해 보셨을 것입니다.&nbsp;&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">1.Apache2 웹서버 설치</span>&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">2.MySQL 서버 설치</span>&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">3.PHP 설치</span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br></span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="font-size: 36px;">- Apache2 설치&nbsp;</span><br><br></p><table style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); max-width: 100%; width: 510.236pt; font-family: Arial, &quot;Spoqa Han Sans&quot;, &quot;Spoqa Han Sans JP&quot;, 나눔바른고딕, 나눔고딕, &quot;맑은 고딕&quot;, &quot;Malgun Gothic&quot;, &quot;Apple SD 산돌고딕 Neo&quot;, AppleSDGothicNeo, sans-serif; font-size: 14px; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><blockquote style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.2; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 24px;">$ sudo apt-get install apache2</span></blockquote></td></tr></tbody></table><p style="color: rgb(51, 51, 51);"><img src="/system/uploads/images/000/001/283/original/image.png?1530195144" style="width: 726px;"><br></p><p style="color: rgb(51, 51, 51);">위의 명령어로 간단하게 설치할 수 있습니다.&nbsp;</p><p style="color: rgb(51, 51, 51);"><br></p><h1 dir="ltr" style="margin-top: 20pt; margin-bottom: 6pt; font-family: Arial, &quot;Spoqa Han Sans&quot;, &quot;Spoqa Han Sans JP&quot;, 나눔바른고딕, 나눔고딕, &quot;맑은 고딕&quot;, &quot;Malgun Gothic&quot;, &quot;Apple SD 산돌고딕 Neo&quot;, AppleSDGothicNeo, sans-serif; line-height: 1.38; color: rgb(0, 0, 0);"><span style="font-size: 20pt; font-family: Arial; background-color: transparent; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 36px;">- MySQL 서버 설치</span>
</span></h1><div dir="ltr" style="color: rgb(51, 51, 51); font-family: Arial, &quot;Spoqa Han Sans&quot;, &quot;Spoqa Han Sans JP&quot;, 나눔바른고딕, 나눔고딕, &quot;맑은 고딕&quot;, &quot;Malgun Gothic&quot;, &quot;Apple SD 산돌고딕 Neo&quot;, AppleSDGothicNeo, sans-serif; font-size: 14px; margin-left: 0pt;"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><blockquote style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 24px;">$ sudo apt-get install mysql-server</span></blockquote></td></tr></tbody></table></div><p style="color: rgb(51, 51, 51);"><br><img src="/system/uploads/images/000/001/284/original/image.png?1530195150" style="width: 733px;"><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);">설치하다보면 비밀번호 설정 창이 뜨게 됩니다.<br>비밀번호를 원하는 대로 설정해줍니다.&nbsp;<br>설정하면 그 다음 과정이 모두 진행됩니다.&nbsp;</p><p style="color: rgb(51, 51, 51);"><img src="/system/uploads/images/000/001/285/original/image.png?1530195156" style="width: 737px;"><br></p><p style="color: rgb(51, 51, 51);"><br></p><h1 dir="ltr" style="margin-top: 20pt; margin-bottom: 6pt; line-height: 1.38; color: rgb(51, 51, 51);"><span style="vertical-align: baseline;">PHP 설치</span></h1><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">PHP는 주로 웹 개발 분야에서 사용되는 스크립트 언어입니다.</span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">여러 가지 버전을 모두 설치한 경우에는&nbsp;</span><span style="vertical-align: baseline;">디폴트 PHP 버전 변경</span><span style="vertical-align: baseline;">&nbsp;항목을 확인하세요.</span></p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">PHP 패키지를 다운로드 받기 위한 저장소(repository)를 추가합니다.<br><br></span></p><div dir="ltr" style="color: rgb(51, 51, 51); margin-left: 0pt;"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><blockquote style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 24px;">$ sudo add-apt-repository ppa:ondrej/php</span></blockquote></td></tr></tbody></table><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><br class="Apple-interchange-newline">&nbsp;</p><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;">설치가 완료되면 apt-get update를 해줍니다.&nbsp;</p></div><div dir="ltr" style="color: rgb(51, 51, 51); margin-left: 0pt;"><br class="Apple-interchange-newline"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><blockquote style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 24px;">$ sudo apt-get update</span></blockquote></td></tr></tbody></table></div><h2 dir="ltr" style="line-height: 1.38; color: rgb(51, 51, 51); margin-top: 18pt; margin-bottom: 6pt;"><span style="vertical-align: baseline;"><br><br>PHP 7.1</span></h2><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;">PHP 7.1 기본적인 패키지를 설치합니다.<br><br></span></p><div dir="ltr" style="color: rgb(51, 51, 51); margin-left: 0pt;"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 24px;">$ sudo apt-get install php7.1 php7.1-common</span></p></td></tr></tbody></table></div><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; color: rgb(51, 51, 51); padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline;"><br class="Apple-interchange-newline"><br>이제 추가적으로 필요한 PHP 7.1 &nbsp;패키지를 설치합니다.</span></p><div dir="ltr" style="color: rgb(51, 51, 51); font-family: Arial, &quot;Spoqa Han Sans&quot;, &quot;Spoqa Han Sans JP&quot;, 나눔바른고딕, 나눔고딕, &quot;맑은 고딕&quot;, &quot;Malgun Gothic&quot;, &quot;Apple SD 산돌고딕 Neo&quot;, AppleSDGothicNeo, sans-serif; font-size: 14px; margin-left: 0pt;"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 18px;">$ sudo apt-get install php7.1-mysql php7.1-curl php7.1-xml php7.1-zip php7.1-gd php7.1-mbstring php7.1-mcrypt</span></p></td></tr></tbody></table></div><p style="color: rgb(51, 51, 51);"><br><img src="/system/uploads/images/000/001/286/original/image.png?1530195162" style="width: 678px;"><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);">아래의 명령어로 php 버전을 확인합니다.&nbsp;</p><div dir="ltr" style="color: rgb(51, 51, 51); font-family: Arial, &quot;Spoqa Han Sans&quot;, &quot;Spoqa Han Sans JP&quot;, 나눔바른고딕, 나눔고딕, &quot;맑은 고딕&quot;, &quot;Malgun Gothic&quot;, &quot;Apple SD 산돌고딕 Neo&quot;, AppleSDGothicNeo, sans-serif; font-size: 14px; margin-left: 0pt;"><table style="max-width: 100%; width: 510.236pt; border: none;"><colgroup><col width="*"></colgroup><tbody><tr style="height: 0pt;"><td style="padding: 5pt; border-width: 1pt; border-style: solid; border-color: rgb(0, 0, 0); vertical-align: top;"><p dir="ltr" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 1.38; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="vertical-align: baseline; font-size: 18px;">$ php -v</span></p></td></tr></tbody></table></div><p style="color: rgb(51, 51, 51);"><img src="/system/uploads/images/000/001/287/original/image.png?1530195168" style="width: 744px;"><br><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);">작동을 확인하면 잘 동작합니다 !!&nbsp;<br><br><img src="/system/uploads/images/000/001/288/original/image.png?1530195181" style="width: 561px;"><br><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);">혹시 아마존 포트 설정을 안해서 접속을 못하고 계시다면 아래의 링크 참조 !!&nbsp;<br><a href="http://hellogohn.com/post_one137">http://hellogohn.com/post_one137</a><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);"><br></p><p style="color: rgb(51, 51, 51);">- 출처 -&nbsp;<br><a href="http://webnautes.tistory.com/1028">http://webnautes.tistory.com/1028</a></p>
You can’t perform that action at this time.