1. CentOS 7 처음 설치 후 설정
http://hpccloud.tistory.com/385
2. JDK 8 설치
# cd /usr/local/src/
# curl -LO -H "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.rpm"
# rpm -Uvh jdk-8u66-linux-x64.rpm
# vi /etc/profile
export JAVA_HOME=/usr/java/default
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
# source /etc/profile
# vi HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
# javac HelloWorld.java
# java HelloWorld
Hello, World
3. Apache Tomcat 8 설치
# cd /usr/local/
# curl -O http://ftp.riken.jp/net/apache/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.tar.gz
# tar zxvfp apache-tomcat-8.0.30.tar.gz
# ln -sf apache-tomcat-8.0.30 tomcat8
# useradd -M -d /usr/local/tomcat8 tomcat8
# chown -R tomcat8. /usr/local/apache-tomcat-8.0.30
# vi /usr/lib/systemd/system/tomcat8.service
[Unit]
Description=Apache Tomcat 8
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/tomcat8/bin/startup.sh
ExecStop=/usr/local/tomcat8/bin/shutdown.sh
RemainAfterExit=yes
User=tomcat8
Group=tomcat8
[Install]
WantedBy=multi-user.target
'Lang_Development > JSP' 카테고리의 다른 글
[JSP] TOMCAT, Java EE, JSP 호환성 (0) | 2016.01.11 |
---|
최근댓글