JRE+MYSQL+JETTY安装部署

         <Alvin-zeng.孤独0-1>

目录

http://www.oracle.com/technetwork/java/javase/downloads/jre-6u26-download-400751.html

#: chmod +x jre-6u25-linux-x64.bin

#: ./jre-6u25-linux-x64.bin

,将目录移动到java目录下面

#: mv jre1.6.0_25 /opt/web/java/

#:vim

export JAVA_HOME=/opt/web/java/jre1.6.0_25/

export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar

export JRE_HOME=$JAVA_HOME/jre

export PATH=$JAVA_HOME/bin:$PATH

#:source /etc/profile

#:

java version "1.6.0_25"

Java(TM) SE Runtime Environment (build 1.6.0_25-b06)

Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

http://wwwNaNake.org/files/v2.8/cmake-2.8.4.tar.gz

#: tar -xvf cmake-2.8.4.tar.gz

#: cd cmake-2.8.40

#: ./configure && make && make install

#: tar -xvf mysql-5.5.11.tar.gz

#: cd mysql-5.5.11

#:

#:make && make install

#:useradd mysql

#: mkdir -p /data/mysql/

#: chown -R mysql:mysql /data/mysql

#:cd /usr/local/mysql/scripts

#:./mysql_install_db --user=mysql  --basedir=/usr/local/mysql --datadir=/data/mysql/

#:cp /usr/local/mysql/bin/mysql  /usr/bin/

#:cp /usr/local/mysql/bin/mysqladmin /usr/bin/

#: chmod 755 /usr/bin/mysql

#: chmod 755 /usr/bin/mysqladmin

#: cp support-files/my-medium.cnf /etc/my.cnf

#:cp support-files/mysql.server /etc/init.d/mysql

#: chmod 755 /etc/init.d/mysql

#: /etc/init.d/mysql start

#: tar xvf jetty-hightide-7.4.1.v20110513.tar.gz

#: mv jetty-hightide-7.4.1.v20110513jetty

#: cd jetty

#:vim etc/jetty.xml

<Set name="port"><Property name="jetty.port" default="80"/></Set>

#: rm rf /etc/jetty/webapps/*

#: rm rf /etc/jetty/contexts/*

#: cd /etc/jetty/contexts/my.xml

<?xml version="1.0"?>

<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext">

<Set name="contextPath">/hr</Set>

<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/hr</Set>

<Set name="securityHandler">

   <New class="org.eclipse.jetty.security.ConstraintSecurityHandler">

    <Set name="loginService">

      <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">

        <Set name="name">Test JAAS Realm</Set>

        <Set name="loginModuleName">xyz</Set>

      </New>

    </Set>

   </New>

 </Set>

</Configure>

#: jar cvf web.war web/*

#: mv web.war /etc/jetty/webapps/

#:cd /etc/jetty/webapps/

#: jar xvf web.war

#: rm web.war

#:cd /jetty/

#:java jar start.jar &