2016년 4월 25일 월요일

MAC OS X + XAMPP

MAC 에 XAMPP 설치를 해보자.

XAMPP 란? Apache + MariaDB + php + perl 을 포함한 PHP 개발 환경을 제공하는 오픈 소스 패키지다.

설치 파일은 아래 링크에서

https://www.apachefriends.org/index.html

설치는 패키지 파일을 더블 클릭 > next 클릭으로 완료된다.

manager-osx 를 실행해보면 Apache Web Server 는 실행 중이다.

MySQL Database Server 를 시작 후 터미널을 열어 root 암호를 설정해야 한다.

초기 설치 시 default root 암호는 설정 되어 있지 않으니 필히 설정하도록 하자.

/Applications/XAMPP/bin/mysqladmin --user=root password "newpass"

이후 phpMyAdmin 을 접속해보자.

주소창에 http://localhost 입력 후 우측 상단의 phpMyAdmin 을 클릭하면....

어라? 접근이 거부된다!는 당연한 것이.. phpmyadmin 설정을 변경해야한다.

/Applications/XAMPP/xamppfiles/phpmyadmin/config.inc.php
..
$cfg['Servers'][$i]['password'] = 'newpass';

에 위에서 변경한 암호를 입력해야 한다.

이후 http://localhost/phpmyadmin 에 접속해보면 바로 접속이 되는 것을 확인 할 수 있다.

그런데... config.inc.php 파일에 계정 정보를 기록하는것이 좀 그렇다.

그럴경우에는 auth_type 을 http 로 변경해 주자. 물론 http 로 변경 할 경우 user 와 password 는 공백으로 수정해야 한다.

$cfg['Servers'][$i]['auth_type'] = 'http';

auth_type 과 관련한 내용은 아래 링크를 참고하자.

https://wiki.phpmyadmin.net/pma/Auth_types




2016년 3월 30일 수요일

Notepad++ ftp 로 AWS EC2 인스턴스 접근

Editplus ftp 로 AWS EC2 인스턴스 접근글에 이어서 이번에는 notepad++ 로 접근하는 방법을 알아본다.

Editplus 설정법은 아래 링크에서...
http://commonkb.blogspot.kr/2016/03/editplus-ftp-aws-ec2.html

Notepad++ 는 아래 링크에서 다운로드 할 수 있다.

https://notepad-plus-plus.org/download/

Notepad++ 는 프리웨어로 GPL 라이선스이다.

Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment, its use is governed by GPL License.

1. Notepad++ 를 실행 후 플러그인(NppFTP)을 설치해야한다.


위 이미지는 이미 nppftp를 설치한 상태이다. Available 탭에서 NppFTP를 검색하여 설치하면 된다.

2. NppFTP 를 설치하면 우측에 FTP windows 가 추가된다.
FTP windows 를 닫았을 경우에는 플러그인 > NppFTP > show NppFTP window 를 체크하면 된다.

3. 톱니바퀴 > Profile settings 에서 새 연결 정보를 등록하자.

4. Connection 탭에서 입력 할 부분은 다음과 같다.

  • Hostname : Public DNS or IP
  • Connection type : SFTP
  • Port : 22
  • Username : ubuntu
5. Authentication 탭에서 변경 할 부분은 다음과 같다.

6. 5번에서 등록하는 프라이빗 키는 EC2 생성할 때 다운로드 한 키 페어(.pem)를 변환 없이 등록하면 된다.

쓰고보니 editplus 보다 훨씬 쉽네....