centos下安裝配置jetty

 

下載jdk-8u144-linux-x64.tar.gzjava

# tar -zxvf jdk-8u144-linux-x64.tar.gzlinux

# mv jdk1.8.0_144 /usr/java/web

# update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_144/bin/java 300
# update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_144/bin/javac 300
# update-alternatives --config java
# java -versionapp

# vi /etc/profile 
JAVA_HOME=/usr/java/jdk1.8.0_144
JRE_HOME=/usr/java/jdk1.8.0_144/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME CLASSPATH
# source /etc/profile
# echo $JAVA_HOME
# echo $CLASSPATH
# echo $PATHeclipse

下載jetty-distribution-9.2.5.v20141112.zipwebapp

# wget http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.5.v20141112/jetty-distribution-9.2.5.v20141112.zipmaven

# useradd -m jettyip

# mkdir /data/jetty/webapps/root/get

# chown -R jetty:jetty jettyit

# ln -s /data/jetty/bin/jetty.sh /etc/init.d/jetty

# chkconfig --add jetty

# chkconfig --level 345 jetty on

# vi /etc/default/jetty

JETTY_HOME=/data/jetty
JETTY_USER=jetty
JETTY_PORT=8080
JETTY_HOST=127.0.0.1
JETTY_LOGS=/data/jetty/logs/

 # /etc/rc.d/init.d/jetty start

# wget http://127.0.0.1:8080

相關文章
相關標籤/搜索