INSTALL_NOTES 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. Installation notes:
  2. - Create a home directory for the JPlag web service.
  3. - Create a file named "jplag_users.xml" in it with content of the following form
  4. (this case creates two admins having quite some not so valid (say missing)
  5. entries, but they can be just added with the AdminTool):
  6. <?xml version="1.0" encoding="UTF-8"?>
  7. <jplag-users>
  8. <user username="mo" password="om" state="192" />
  9. <user username="emeric" password="emeric" state="192" />
  10. </jplag-users>
  11. VERY IMPORTANT: If you're using Java 1.4.2_06, you'll probably need to use
  12. the -server option,otherwise the complete server will crash
  13. during comparison because of a bug in the VM.
  14. ================================================================================
  15. "SUN One Application Server 8" install notes:
  16. - Home directory setup:
  17. In the JVM Options page on the admin console add
  18. "-Djava_home=<path to jplag home directory>"
  19. Also replace the "-client" option by "-server" if you're using Java 1.4.2_06
  20. Additionally make sure that -Xmx1024M is set to avoid "Out of memory" errors.
  21. - Permission setup:
  22. Add the following lines to the end of the domain's server.policy file to
  23. allow the JPlag web service to create, use and delete files in its home dir:
  24. --------------------------------------------------------------------------------
  25. // These permissions apply to the JPlag web service
  26. grant codeBase "file:${com.sun.aas.instanceRoot}/applications/j2ee-modules/JplagService/WEB-INF/-" {
  27. permission java.io.FilePermission "${jplag_home}${/}-", "read,write,delete";
  28. };
  29. --------------------------------------------------------------------------------
  30. - Copy "jplag.jar" and "antlr.jar" to the "lib/ext" directory inside the used
  31. domain directory
  32. - Copy the "JplagService.war" file to the domains "autodeploy" directory
  33. - (Re-)Start the server (you may try without restarting, though you probably get
  34. problems, if the server doesn't update it's libraries because of antlr.jar,
  35. which is packed inside a server library)
  36. - SSL setup
  37. Go into the domains's "config" directory and execute the following command:
  38. keytool -genkey -alias jplag-server -keystore keystore.jks
  39. Use "changeit" (really "changeit") as keystore and key password.
  40. In the "domain.xml" in the domain's config directory you should also change
  41. the http-listener ports to 2222 for the unsecured one (port 8080) and to
  42. 2223 for the secured one (port 8181) to have the same settings as the
  43. JPlag server.
  44. Additionally you NEED to add the following line inside the 2223-http-listener:
  45. <ssl cert-nickname="jplag-server" client-auth-enabled="false"
  46. ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true"
  47. tls-rollback-enabled="true"/>
  48. There might be more to do because of the JplagBean stuff, but this application
  49. server is currently not supported anymore, although it shouldn't be a problem
  50. to get it to work ;)
  51. ================================================================================
  52. "Tomcat" install notes:
  53. You'll probably need Sun's Tomcat version "Tomcat 5.0 for WSDP 1.5" available at
  54. "http://java.sun.com/webservices/containers/", but other versions may work, too.
  55. Install Java Web Services Developer Pack 2.0 (JWSDP) onto Tomcat (will install
  56. both into Tomcat and into a separate folder) (This needs Java 1.5 and above!)
  57. (available at "http://java.sun.com/webservices/downloads/webservicespack.html"):
  58. - Set the following environment variable before starting the server
  59. (if you know a better way to define a home directory from outside the service
  60. please let us know, as I think, this is a quite ugly solution...)
  61. CATALINA_OPTS="-Djplag_home=<path to jplag home directory> -server -Xmx1024M"
  62. (-Xmx1024M is set to avoid "Out of memory" errors for larger submissions)
  63. (The "-server" option is only needed for Java 1.4.2_06)
  64. - Due to class loader issues,
  65. "jplagWebService/serverAccess/TrustSSLSocketFactor.class" and
  66. "jplagWebService/serverAccess/TrustSSLSocketFactor$1.class" need to be copied
  67. (including their directory structure) into the Tomcat's "common/classes"
  68. folder.
  69. - Permission setup (if required!)
  70. WARNING: This has NOT been tested yet, as my server doesn't start when I
  71. use the "-security" option! You may need to change the codeBase!
  72. Add the following lines to the end of the catalina.policy file to
  73. allow the JPlag web service to create, use and delete files in its home dir:
  74. --------------------------------------------------------------------------------
  75. // These permissions apply to the JPlag web service
  76. grant codeBase "file:${catalina.home}/webapps/JplagService/WEB-INF/-" {
  77. permission java.io.FilePermission "${jplag_home}${/}-", "read,write,delete";
  78. };
  79. --------------------------------------------------------------------------------
  80. - SSL setup
  81. If you don't have a keystore yet, you'll have to execute the following lines,
  82. which can also be found in the bash script "generatecerts.sh":
  83. keytool -genkey -dname "CN=swt.ira.uka.de, OU=[IPD] JPlag Team, O=Uni Karlsruhe, L=Karlsruhe, S=Baden-Wuerttemberg, C=DE" -alias tomcat -keyalg RSA -keystore server.keystore -storepass gulpie! -keypass gulpie!
  84. keytool -export -alias tomcat -keystore server.keystore -file tomcat.cer -storepass gulpie!
  85. keytool -import -alias tomcat-server -keystore server.trust -trustcacerts -file tomcat.cer -storepass gulpie! -noprompt
  86. The "fore- and surname" must be the servers domain name (i.e. swt.ira.uka.de)!
  87. You MUST use the same key password and keystore password!
  88. Add the following lines to the "server.xml" file inside Tomcat's "conf" folder
  89. <Connector port="2223" disableUploadTimeout="true" acceptCount="100"
  90. scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
  91. keystoreFile="<full path to your server.keystore>"
  92. keystorePass="<your keystore password>" />
  93. Of course you've got to replace the <...> stuff with the correct values.
  94. You'll also need the above mentioned script (which also deletes the old files)
  95. to >>update the certificates<<, as those self-signed certificates only last 3
  96. months. After executing that script you'll need to restart the server.
  97. Well, with the new configuration you additionally need to import apache's
  98. certificate found here (change year as needed):
  99. "/etc/apache2/ssl.crt/www-07.crt"
  100. So the following additional line is required:
  101. keytool -import -alias apache-server -keystore server.trust -trustcacerts -file /etc/apache2/ssl.crt/www-07.crt -storepass gulpie! -noprompt
  102. May be the "tomcat-server" import is not needed anymore...
  103. --------------------------------------------------------------------------------
  104. - Updating the www certificate
  105. (when the register page throws RemoteExceptions with SSLHandshakeException)
  106. This happens, when the www server gets a new SSL certificate.
  107. In this case execute the following commands to introduce the new certificate
  108. to our Tomcat server (replacing www-07.crt with the new filename):
  109. In ~jplag/jplag_webservice/tomcat50-jwsdp:
  110. keytool -delete -alias apache-server -keystore server.trust -storepass gulpie! -noprompt
  111. keytool -import -alias apache-server -keystore server.trust -trustcacerts -file /etc/apache2/ssl.crt/www-07.crt -storepass gulpie! -noprompt
  112. In ~jplag/jplag_webservice:
  113. ./stopserver.sh
  114. ./startserver.sh