The detail deployment of website in tomcat

This post is about the deployment of website in tomcat. The detail step describes as follows.

Step 1: Install mysql database.

Unzip the file MYSQL55·0·67.zip and install mysql. Configure the database charset and root's password.

Step 2: Install the management tool of mysql.

Unzip the file Navicat_for_MySQL_9.0.15.rar and install it.

Step 3: Restore the database.

3.1) Create the database xxx

3.2) In the management tool of mysql, select the database xxx and click the "new backup" button, then click the "new restore" button.

3.3) Browse the backup file ***.psc and restore it.

Step 4: Deploy the website.

Copy the folder "apache-tomcat-6.0.30" to your disk.

Step 5: modify the mysql connected password in your project.

Open the file "xxx\WEB-INF\classes\applicationContext.xml" and modify the password.

Step 6: Install the JDK6.

6.1) Click the executive file jdk-6u16-windows-i586.exe and install it.

6.2) Configure the environment path of java.

"C:\Program Files\Java\jdk1.6.0_16\bin"

Step 7: Configure the domain name.

Open the file "apache-tomcat-6.0.30\conf\server.xml" and add the following codes:

<Host name="xxx.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->
	<!--
	<Context docBase="C:\Program Files\apache-tomcat-6.0.30\webapps\dhulab" path="" reloadable="true" />
	-->
      </Host>

Step 8: Modify the port to 80.

Open the file "apache-tomcat-6.0.30\conf\server.xml" and modify it as follows:

<Connector port="80" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" URIEncoding="UTF-8"/>

Step 9: Repair the timeout problem of the mysql database.

Open the file "xxx\WEB-INF\classes\applicationContext.xml" and modify it as follows:

		<property name="url" value="jdbc:mysql://localhost/xxx?autoReconnect=true&amp;autoReconnectForPools=true"></property>
		<property name="username" value="root"></property>
		<property name="password" value="****"></property>
		<property name="validationQuery" value="SELECT 1"/>     
		<property name="testOnBorrow" value="true"/>

Attention!: using the "&amp;" to replace the "&".
Step 10: Start the tomcat.

Step 11: Browse your website in the browser.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值