ผลต่างระหว่างรุ่นของ "การติดตั้ง Marmoset"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) |
|||
แถว 1: | แถว 1: | ||
== SubmitServer == | == SubmitServer == | ||
+ | |||
+ | === ตัวอย่าง Config ที่แก้ === | ||
+ | |||
+ | ==== server.xml ==== | ||
+ | <pre>--- server.xml 2010-08-19 22:45:13.000000000 +0700 | ||
+ | +++ /etc/tomcat6/server.xml 2010-09-18 07:09:01.600653343 +0700 | ||
+ | @@ -22,9 +22,9 @@ | ||
+ | <Server port="8005" shutdown="SHUTDOWN"> | ||
+ | |||
+ | <!--APR library loader. Documentation at /docs/apr.html --> | ||
+ | - <!-- | ||
+ | <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> | ||
+ | - --> | ||
+ | + | ||
+ | + | ||
+ | <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> | ||
+ | <Listener className="org.apache.catalina.core.JasperListener" /> | ||
+ | <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --> | ||
+ | @@ -80,11 +80,12 @@ | ||
+ | This connector uses the JSSE configuration, when using APR, the | ||
+ | connector should be using the OpenSSL style configuration | ||
+ | described in the APR documentation --> | ||
+ | - <!-- | ||
+ | + | ||
+ | <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" | ||
+ | maxThreads="150" scheme="https" secure="true" | ||
+ | + keystoreFile="/etc/tomcat6/ssl/marmosetKeystore" | ||
+ | + keystorePass="PASSWORD" | ||
+ | clientAuth="false" sslProtocol="TLS" /> | ||
+ | - --> | ||
+ | |||
+ | <!-- Define an AJP 1.3 Connector on port 8009 --> | ||
+ | <!-- | ||
+ | @@ -131,6 +132,9 @@ | ||
+ | unpackWARs="true" autoDeploy="true" | ||
+ | xmlValidation="false" xmlNamespaceAware="false"> | ||
+ | |||
+ | +<Context path="" docBase="submitServer" debug="0" | ||
+ | +reloadable="true"/> | ||
+ | + | ||
+ | <!-- SingleSignOn valve, share authentication between web applications | ||
+ | Documentation at: /docs/config/valve.html --> | ||
+ | <!-- | ||
+ | </pre> | ||
+ | |||
+ | ==== web.xml==== | ||
+ | แก้ตามในคู่มือ marmoset | ||
+ | |||
+ | <pre>--- web.xml 2009-05-14 06:15:14.000000000 +0700 | ||
+ | +++ /etc/tomcat6/web.xml 2010-09-17 17:57:26.155673917 +0700 | ||
+ | @@ -1191,4 +1191,26 @@ | ||
+ | <welcome-file>index.jsp</welcome-file> | ||
+ | </welcome-file-list> | ||
+ | |||
+ | + | ||
+ | +<context-param> | ||
+ | + <param-name>authentication.service</param-name> | ||
+ | + <param-value>edu.umd.cs.submitServer.GenericStudentPasswordAuthenticationService</param-value> | ||
+ | +</context-param> | ||
+ | +<context-param> | ||
+ | + <param-name>database.server.jdbc.url</param-name> | ||
+ | + <param-value> jdbc:mysql://localhost/submitserver</param-value> | ||
+ | +</context-param> | ||
+ | +<context-param> | ||
+ | + <param-name>database.user</param-name> | ||
+ | + <param-value>MYSQLUSER</param-value> | ||
+ | +</context-param> | ||
+ | +<context-param> | ||
+ | + <param-name>database.password</param-name> | ||
+ | + <param-value>MYSQLPASSWORD</param-value> | ||
+ | +</context-param> | ||
+ | +<context-param> | ||
+ | + <param-name>database.driver</param-name> | ||
+ | + <param-value>com.mysql.jdbc.Driver</param-value> | ||
+ | +</context-param> | ||
+ | + | ||
+ | </web-app> | ||
+ | </pre> | ||
=== ขั้นตอนที่ต้องระวัง === | === ขั้นตอนที่ต้องระวัง === |
รุ่นแก้ไขเมื่อ 03:19, 18 กันยายน 2553
เนื้อหา
SubmitServer
ตัวอย่าง Config ที่แก้
server.xml
--- server.xml 2010-08-19 22:45:13.000000000 +0700 +++ /etc/tomcat6/server.xml 2010-09-18 07:09:01.600653343 +0700 @@ -22,9 +22,9 @@ <Server port="8005" shutdown="SHUTDOWN"> <!--APR library loader. Documentation at /docs/apr.html --> - <!-- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> - --> + + <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> <Listener className="org.apache.catalina.core.JasperListener" /> <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --> @@ -80,11 +80,12 @@ This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation --> - <!-- + <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" + keystoreFile="/etc/tomcat6/ssl/marmosetKeystore" + keystorePass="PASSWORD" clientAuth="false" sslProtocol="TLS" /> - --> <!-- Define an AJP 1.3 Connector on port 8009 --> <!-- @@ -131,6 +132,9 @@ unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> +<Context path="" docBase="submitServer" debug="0" +reloadable="true"/> + <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!--
web.xml
แก้ตามในคู่มือ marmoset
--- web.xml 2009-05-14 06:15:14.000000000 +0700 +++ /etc/tomcat6/web.xml 2010-09-17 17:57:26.155673917 +0700 @@ -1191,4 +1191,26 @@ <welcome-file>index.jsp</welcome-file> </welcome-file-list> + +<context-param> + <param-name>authentication.service</param-name> + <param-value>edu.umd.cs.submitServer.GenericStudentPasswordAuthenticationService</param-value> +</context-param> +<context-param> + <param-name>database.server.jdbc.url</param-name> + <param-value> jdbc:mysql://localhost/submitserver</param-value> +</context-param> +<context-param> + <param-name>database.user</param-name> + <param-value>MYSQLUSER</param-value> +</context-param> +<context-param> + <param-name>database.password</param-name> + <param-value>MYSQLPASSWORD</param-value> +</context-param> +<context-param> + <param-name>database.driver</param-name> + <param-value>com.mysql.jdbc.Driver</param-value> +</context-param> + </web-app>
ขั้นตอนที่ต้องระวัง
- ต้องคัดลอกไฟล์ .war และ .jar เอง อย่าลืมคัดลือก log4j.jar ใส่ใน /usr/share/tomcat6/lib ด้วย
- เพื่อให้ log4j เก็บค่าได้ ต้องตั้ง permission
- ติดตั้ง SSL:
- ดูขั้นตอนเพิ่มเติมที่ http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html ใช้ APR