프로젝트_개발환경구축

Download Report

Transcript 프로젝트_개발환경구축

Java 웹 개발 환경구축
김종선
2011.1.22
목차
•
•
•
•
Eclipse 에서 Java 설정
Eclipse 와 Tomcat6.x 연동
Eclipse 와 Oracle11g 연동
SVN 설정
Eclipse에서 Java 설정
설치된 JRE 설정
Windows -> Preferences -> Java -> Installed JREs 에서
JDK 설치된 위치 체크
실행 환경 설정
Installed JREs -> Execution Environments -> JavaSE-1.6 선택
설치된 jdk 체크 -> OK
Eclipse와 Tomcat6.x 연동
Tomcat6.x 다운로드
http://tomcat.apache.org/download-60.cgi
32-bit 다운로드 후 c:\java\tomcat6 에 압축해제
환경변수 설정
1. 시스템속성 -> 환경변수
2. 새로만들기
3.
변수이름 : CATALINA_HOME
변수 값 :
C:\java\tomcat6 (톰캣저장위치)
server.xml 수정
•
•
C:\java\tomcat6\conf 폴더로 이동
server.xml 와 context.xml 파일 편집
1. server.xml 수정
port 번호 변경
8080 에서 8888로
오라클 port와 충돌때문
한글처리를 위한 인코
딩 추가
URIEncoding=“euc-kr”
context.xml 수정
2. context.xml 수정
Eclipse 와 연동
1. Java EE Perspective로 이동
2. Eclipse 아래 View 부분에 Servers 부분으로 이동
보이지 않을 경우 Windows -> Show View -> Servers 추가
3. Servers View 부분에서 마우스 오른쪽 클릭
New -> Server 선택
Eclipse 와 연동
Select the server type
 Apache -> tomcat6.0 server 선
택
Next!
Eclipse 와 연동
Browse 를 눌러 Tomcat 폴더 선
택
C:\java\tomcat6
JRE 변경 후 Finish
server view에 tomcat이 생
김
몇 가지 설정을 위해 더블클릭
Eclipse 와 연동
변경된 포트번호 확
인
1. “Server Location” 부분에서 두 번째 선택
2. deploy path 는 tomcat 폴더가 있는 곳
C:\java\tomcat6\webapps
로 경로지정
3. Ctrl + S (저장 필수!)
Tomcat Server 시작과 종료
1. 시작
 view 오른쪽 끝에 화살표 버튼 클릭
 서버선택 후 마우스 오른쪽 클릭 -> 화살표 클릭
2. 종료
빨간색 네모 버튼 클릭
Tomcat 테스트
 http://localhost:8888 로 접속 후 위와 같은 화면이 나오면 연동 완료
Eclipse와 Oracle 연동
Oracle 다운로드 및 설치
http://www.oracle.com/technetwork/database/enterpriseedition/downloads/index.html
## Oracle 11g R2
## 다운로드 및 설치가 완료되었다는 가정 하에 진행
## Oracle 관련 서비스 실행
Eclipse 와 연동
 view -> Data Source Explorer -> Database Connections
마우스 오른쪽 클릭 후 “New”
Eclipse 와 연동
Connection Profile types
Oracle 선택
Name : oracle
Next
Eclipse 와 연동
Drivers 선택
형광색으로 칠한 버튼 클릭
Driver 설정
Name/Type 설정
 Oracle Thin Driver 11 선택
 JAR List 탭으로 이동
Driver 설정
JAR List 설정
 기존 driver 파일 선택 후
 Edit JAR/Zip 클릭
 아래 경로의 Driver file 선택
Driver 파일 경로 (오라클 설치 위치)
D:\app\jongsun\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar
ojdbc6.jar 파일 선택 후 OK
Eclipse 와 연동
Properties 설정
 SID : orcl (DB이름)
 Host : localhost
 User Name : 오라클 접속 ID
 Password : 비밀번호
Test Connection 클릭
 ping succeeded 가 나오면 성공
Finish!
Eclipse 와 연동
연동이 완료되면 위와 같이 “Database Connection”에 oracle 이 생긴다.
SVN 설정
SVN
•
•
Eclipse에 Subclipse 플러그인 설치
Perspective 에 “SVN Repository Exploring” 추가 또는 Window -> show
view -> others -> svn -> svn repositories 추가
SVN 주소 추가
•
•
•
Perspective 나 view 에서 마우스 오른쪽 클릭 -> new
SVN 주소를 입력
Finish