tar xf apache-tomcat-5.5.35.tar -C /usr/local/
java -version 查看有没有安装java
whereis java 找出java位置 本人的在;/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/jre/bin
find . -name jer 找出该文件路劲:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/jre
vim /usr/local/apache-tomcat-5.5.35/bin/catalina.sh :把上面java的路劲写死在tomcat配置文件里面
![](https://images2015.cnblogs.com/blog/918005/201605/918005-20160520131842638-1554091632.png)
./startup.sh 启动服务
./shutdown.sh 关闭服务
如有问题随时到log 目录下查看日志信息
站点目录配置信息 /usr/local/apache-tomcat-5.5.35/webapps/ROOT 默认必须有ROOT 配置文件:/usr/local/apache-tomcat-5.5.35/conf/server.xml appBase="webapps" appBase 指定目录,指定目录下必须有ROOT 配置连接数据库: <GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> <Resource name="jdbc/crm" type="javax.sql.DataSource" password="crm" driverClassName="com.mysql.jdbc.Driver" maxIdle="10" maxWait="5000" username="crm" url="jdbc:mysql://127.0.0.1:3306/crm_gbk?useUnicode=true&characterEncoding=gbk&autoReconnect=true" maxActive="40"/> </GlobalNamingResources> crm_gbk是库名