1 jdk
这里用openjdk
yum install java-1.6.0-openjdk
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
2.tomcat
http://apache.fayea.com/apache-mirror/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz
下载解压
sh bin/startup.sh 启动就ok了
3.manager 页面
在conf/tomcat-users.xml 添加:
<role rolename="manager-gui"/>
<user username="tomcat" password="123" roles="manager-gui"/>magager-gui只是一方面,可以把manager-script 也开启,方便监控程序zabbix 的抓取。
- manager-gui — Access to the HTML interface.
- manager-status — Access to the "Server Status" page only.
- manager-script -Access to the tools-friendly plain text interface that is described in this document,
开了之后能抓到如下的信息
OK - Listed applications for virtual host localhost/:running:0:ROOT/manager:running:1:manager/docs:running:0:docs/examples:running:0:examples/host-manager:running:1:host-manager
4.总结
过程相当简单。
java的东西接触的很少。很多都是都是设置环境变量,JAVA_HOME ,CLASS_PATH 等等的。。