JRE+MYSQL+JETTY安装部署
<Alvin-zeng.孤独0-1>
目录
一、JRE安装2
1.1、下载软件2
1.2、加执行权限,然后解压2
1.3、移动解压,将目录移动到java目录下面2
二、Mysql5.5安装2
2.1、下载安装Cmake2
2.2、解压缩及安装CMAKE3
2.3、安装MYSQL3
2.4、创建用户及初始化数据库3
三、安装jetty3
3.1、下载软件,解压。无需安装3
3.2、修改8080为80端口4
3.3、将WEB 目录打成war 包,放入/jetty/etc/webapps/4
3.4、启动JETTY4
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
#: mv jre1.6.0_25 /opt/web/java/
#:vim /etc/profile
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
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
#: cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data/mysql -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306
#: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 �Cxvf 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 �Crf /etc/jetty/webapps/*
#: rm �Crf /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 �Ccvf web.war web/*
#: mv web.war /etc/jetty/webapps/
#:cd /etc/jetty/webapps/
#: jar �Cxvf web.war
#: rm web.war
#:cd /jetty/
#:java �Cjar start.jar &