웹서버 설치 - JDK설치
-JDK란 무엇이란 말이냐? JFK의 친척인가?
JDK는 Java Develoment Kit의 약자이다. java개발툴이라는 야그다..
아~ 그럼 Java가 뭐다냐? 흔히 보는 자바스크립트란 말이냐?
좀 비슷하기는 하지만 아니다..
java란 선마이크로시스템이라는 미국 굴지의 회사가 개발한것으로 웹브라우져안에서의 프로그래밍 언어라고 할수 있다..
웹브라우져 안에서 그림도 그리고, 게임도 만들고 할수 있다는 야그다..
익스플러러건 파이어폭스건 동일하게 작용한다..
그런데...!! 문제는 웹을 서비스하는 서버에서 JDK를 설치해야 웹을 보는 아그들이 그런 프로그램을 즐길수 있다는것이다..
어느 웹솔루션을 사거나 구해보면..
웹환경 : APACHE (IIS포함) , MySQL , JDK 1.5이상..
이라고 나온다면 JDK가 설치안된 웹서버에서는 쓸수 없다는 애기다..(꼭 내가 프로그래밍 할필요는 없으나 남이 개발한건 쓸수있어야 하지 않는가)
이것은 자바 프로그래밍의 공부와 무관하게 내가 웹서버를 열고있고 누군가에게 서비스하고 있다면 당연히 되어야 하는 귀결적인 내용이다.. 미국의 오렐리 사장이라는 놈이 말한 웹 2.0의 시작은 JDK부터 시작한다고 보면 된다.
http://java.sun.com/javase/downloads/ 일루가면 jdk를 받을수 있다.
우선 ftp를 이용하거나 어떻게 해서든 리눅스로 옮기자..(ftp는 루트접속이 안되기 때문에 일반계정으로 로그인한다음 cp명령으로 이동하자.
[root@localhost ~]# cd /
[root@localhost /]# mkdir app
[root@localhost /]# mv /home/sunnyfm/jdk-* /app/
[root@localhost /]# cd /app
[root@localhost app]# ls
jdk-1_5_0_16-linux-i586-rpm.bin
[root@localhost app]#이방법이 아니라면..
[root@localhost app]# wget -o- http://121.162.110.124/~bestakas/jakarta/jdk-1_5_0_16-linux-i586-rpm.bin
[root@localhost app]# ls
- jdk-1_5_0_16-linux-i586-rpm.bin인터넷주소로 직접 다운받는 방법이 있다.(하지만 저걸 언제 외운단 말이냐)
자 이제 jdk를 설치해보자..
jdk는 jdk와 jre로 구성되어있다. jdk는 한마디로 개발툴이고 jre는 자바용 프로그램들을 시스템에서 구현해주는 툴이라고 보면 된다. jdk설치로 두 가지다 설치된다.
[root@localhost app]# chmod +x jdk-1_5_0_16-linux-i586-rpm.bin
[root@localhost app]# ./jdk-1_5_0_16-linux-i586-rpm.bin이러면 뭔말이 나오는 무시하고 계속 엔터후에 yes를 쳐주자
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU
ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY
SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE
AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE
TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE
AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT
CONTINUE.1. DEFINITIONS. "Software" means the identified above in
binary form, any other machine readable materials
(including, but not limited to, libraries, source files,
header files, and data files), any updates or error
corrections provided by Sun, and any user manuals,
programming guides and other documentation provided to you
---- 중략 -----------------------------------------------------------------Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU
ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY
SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE
AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE
TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE
AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT
CONTINUE.1. DEFINITIONS. "Software" means the identified above in
binary form, any other machine readable materials
(including, but not limited to, libraries, source files,
header files, and data files), any updates or error
corrections provided by Sun, and any user manuals,
programming guides and other documentation provided to youDo you agree to the above license terms? [yes or no]
yesUnpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-1_5_0_16-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]Done.
[root@localhost app]# rpm -qa | grep jdk
jdk-1.5.0_16-fcs.i586
java-1.6.0-openjdk-1.6.0.0-0.10.b09.fc9.i386
java-1.6.0-openjdk-plugin-1.6.0.0-0.10.b09.fc9.i386
[root@localhost app]#install이 끝나고 rpm -qa | grep jdk명령으로 제대로 설치되었는지 확인 사살...
그래도 못 믿을수 있으니..
[root@localhost app]# java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://java.sun.com/javase/reference for more details설치성공...
환경설정으로 들어가자..
[root@localhost app]# ls /usr/java/
jdk1.5.0_16
[root@localhost app]# ln -s /usr/java/jdk1.5.0_16 /usr/local/jdk
[root@localhost app]# vi /etc/profilevi에디터로 /etc/profile을 수정 - 맨 밑에 다음의 문장을 입력후 저장후 나온다.
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib/tools.jar:.----------------------------------------------------------
[root@localhost app]# . /etc/profile (갱신된 profile을 적용)
[root@localhost app]# javac (잘적용되었나 확인)
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system[root@localhost app]#
-- 메세지가 뜨면 OKln명령은 링크를 거는겁니다. 마치, 윈도우즈의 바로가기와 마찬가지이죠.. 모두 타이핑해서 설정하는게 틀리지만요... ^ ^
다음은 apache + tomcat설치를 해보겠습니다.
'manabu & Linux' 카테고리의 다른 글
libmysqlclient.so (0) | 2009.05.02 |
---|---|
웹서버 설치 - apache , openssl , zlib (0) | 2009.04.24 |
PC에서 구성하는 사무실 환경(後/3),ssh , ftp의 사용 (0) | 2009.04.24 |
PC에서 구성하는 사무실 환경(後/2), fedora9 설치 (0) | 2009.04.24 |
PC에서 구성하는 사무실 환경(後/1), fedora9 설치,vmware (0) | 2009.04.24 |