README.bin.txt 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. =======================================================================
  2. iEat - the Internet recipe database
  3. Version @VERSION@ @BUILD_DATE@
  4. =======================================================================
  5. This is the binary distribution of iEat. iEat requires a Java 5
  6. runtime environment, a relational database, and a J2EE application
  7. server to run. Open source software exists for all of these
  8. components. iEat is developed using the Sun Java 5 JDK, the PostgreSQL
  9. relational database, and the Apache Tomcat J2EE application server. The
  10. MySQL relational database is another popular product, and iEat is also
  11. tested against it. See the following URLs for information on these
  12. products:
  13. - Java: http://java.sun.com/
  14. - PostgreSQL: http://www.postgresql.org/
  15. - MySQL: http://www.mysql.com/
  16. - Tomcat: http://tomcat.apache.org/
  17. UPGRADE FROM iEat 1.0 =================================================
  18. The database schema has changed significantly in this release from
  19. the 1.0 release. You will not be able to run the @VERSION@ version of
  20. iEat against the 1.0 database. Look for a SQL script named
  21. "upgrade-1.0-1.2.sql" in the setup/sql/<db> directory included in
  22. this distribution that will upgrade a 1.0 database to the new format,
  23. preserving your data. Run this script as your exisitng iEat database
  24. user.
  25. Note that not all database types have upgrade scripts yet!
  26. FIRST-TIME DATABASE CREATION ==========================================
  27. You must initialize your database for first-time use. Currently
  28. PostgreSQL 7.x or later and MySQL 4.1 or later are directly
  29. supported:
  30. POSTGRES ------------------------------------------------------------
  31. 1) Create a database user for iEat
  32. As a Postgres super-user, execute:
  33. $ createuser -ADEP ieat
  34. You will be prompted to enter the ieat user's password. If you
  35. get a permissions error when you attempt to run this command,
  36. make sure you are executing it as a Postgres user with sufficient
  37. privileges. You can explicity run as the Postgres super-user with
  38. $ createuser -U postgres -ADEP ieat
  39. in which you may be prompted for the postgres user's password.
  40. 2) Create a database for iEat
  41. As a Postgres super-user, execute:
  42. $ createdb -E UNICODE -O ieat ieat
  43. Again, you may need to pass the -U flag to specify a Postgres
  44. super-user account to execute the command as. The database
  45. must be created with the Unicode encoding!
  46. MYSQL ---------------------------------------------------------------
  47. 1) Create a database for iEat
  48. As a MySQL super-user, execute the following in the MySQL shell,
  49. i.e. enter 'mysql -u root mysql' to enter the MySQL shell as the
  50. 'root' user:
  51. mysql> create database ieat character set utf8;
  52. 2) Grant privileges for an iEat database user
  53. Still in the MySQL shell, execute:
  54. mysql> grant all privileges on ieat.* to ieat identified by 'ieat';
  55. Here the "identified by 'ieat'" creates the user's password, which
  56. you should set to whatever you please. Note this allows the
  57. database user 'ieat' to connect to the 'ieat' database from any
  58. host. If you plan on running the iEat application on the same
  59. machine as MySLQ is running on, you could limit the ieat user
  60. to connect only from the local machine with
  61. mysql> grant all privileges on ieat.* to 'ieat'@'localhost'
  62. -> identified by 'ieat';
  63. 3) Flush the privileges
  64. To make sure MySQL is ready to be used with the new ieat user,
  65. execute the following (still in the MySQL shell):
  66. mysql> flush privileges;
  67. FIRST-TIME DATABASE SETUP =============================================
  68. After creating the database for the first time, you must run
  69. several SQL scripts to create the iEat database tables.
  70. POSTGRES ------------------------------------------------------------
  71. Execute:
  72. $ psql -U ieat -f setup/sql/postgres/setup.sql ieat
  73. Ignore any warnings about "table X does not exist". Then repeat
  74. the above command for the following SQL scripts (substitue
  75. these paths for the -f argument):
  76. - setup/sql/postgres/create.sql
  77. - setup/sql/postgres/load.sql
  78. - setup/sql/postgres/load-ingredients.sql
  79. MYSQL ---------------------------------------------------------------
  80. Execute:
  81. $ mysql -f -u ieat -p ieat <setup/sql/mysql/setup.sql
  82. Enter the ieat user password if prompted. Ignore warnings about
  83. tables that don't exist Then repeat the above command for the
  84. following SQL scripts (substitute these paths for the
  85. 'setup/sql/mysql/setup.sql' above):
  86. - setup/sql/mysql/create.sql
  87. - setup/sql/mysql/load.sql
  88. - setup/sql/mysql/load-ingredients.sql
  89. FIRST-TIME APPLICATION SERVER SETUP ===================================
  90. iEat depends on the application server it is running in to provide a
  91. JDBC DataSource to connect to the database with and a JavaMail
  92. Session to send emails with. Thus you must configure the deployment
  93. descriptor for iEat the first time you install iEat.
  94. For Tomcat 5.5 or later, create a file located at
  95. <TOMCAT HOME/conf/Catalina/localhost/ieat.xml
  96. The structure of this file should look like this:
  97. <Context path="/ieat" reloadable="false"
  98. docBase="/path/to/ieat-1.0.0.war">
  99. <Resource name="jdbc/ieat"
  100. type="javax.sql.DataSource" scope="Shareable"
  101. driverClassName="org.postgresql.Driver"
  102. url="jdbc:postgresql://localhost:5432/ieat"
  103. username="ieat" password="ieat" maxWait="5000"
  104. maxActive="5" maxIdle="2" removeAbandoned="true"
  105. removeAbandonedTimeout="60" logAbandoned="true"
  106. />
  107. <Resource name="mail/ieat"
  108. auth="Container"
  109. type="javax.mail.Session"
  110. mail.smtp.host="localhost"
  111. />
  112. </Context>
  113. The docBase attribute should point to the absolute path of the
  114. iEat WAR included in this package. Then customize the DataSource
  115. and Session definitions to match your environment. For example,
  116. if you plan to use MySQL instead of PostgreSQL, your DataSource
  117. configuration should look more like this:
  118. <Resource name="jdbc/ieat"
  119. type="javax.sql.DataSource" scope="Shareable"
  120. driverClassName="com.mysql.jdbc.Driver"
  121. url="jdbc:mysql://localhost:3306/ieat"
  122. username="ieat" password="ieat" maxWait="5000"
  123. maxActive="5" maxIdle="2" removeAbandoned="true"
  124. removeAbandonedTimeout="60" logAbandoned="true"
  125. />
  126. JDBC DRIVERS AND JAVAMAIL =============================================
  127. Your J2EE application server will need access to the JDBC driver for
  128. the database you are using. Drivers for PostgreSQL and MySQL are
  129. provided in the setup/lib directory of this package. Copy the
  130. appropriate JAR file into the appropriate library directory of your
  131. application server. For Tomcat this is <TOMCAT HOME>/common/lib.
  132. In addition your application server must make the Java Mail API
  133. available to iEat. If it does not have this (by default Tomcat 5
  134. does NOT provide this) you can copy the activation.jar and mail.jar
  135. files from the setup/lib/javamail directory into the appropriate
  136. directory for your application server. For Tomcat this is
  137. <TOMCAT HOME>/common/lib.
  138. APPLICATION SETUP =====================================================
  139. To install, copy the WAR file included in this package to the path
  140. you specified in your application server config (e.g. the "docBase"
  141. attribute from the deployment descriptor).
  142. Finally, you might want to adjust the application logging, which
  143. by default will attempt to log via Log4J to /var/tmp/ieat.log. You
  144. can adjust the verbosity and location of this log by unpacking the
  145. WAR and editing the <IEAT HOME>/WEB-INF/classes/log4j.properties
  146. Log4J configuration. Then either change your application server
  147. configuration to point to the unpacked WAR directory or zip up the
  148. unpacked WAR directory back to the original file name.
  149. ** Note to MySQL users: you must perform an additional step, to
  150. replace the <IEAT HOME>/WEB-INF/classes/ieat.hbm.xml with
  151. the setup/sql/mysql/ieat.hbm.xml version, which has MySQL
  152. implementations of the iEat SQL queries.
  153. FIRST-TIME USE ========================================================
  154. Start up your application server. Once started, visit
  155. http://<your server>:<port>/ieat
  156. where <your server> is the machine iEat is running on (i.e.
  157. localhost) and <port> is the port the applicaiton server is
  158. listening on (i.e. for Tomcat this defaults to 8080).
  159. You should see the iEat Setup Wizard page. The Setup Wizard will
  160. guide you through configuring the remaining iEat optinos as well as
  161. create your first admin-level user account.
  162. EXSLT/Xerces SUPPORT =================================================
  163. iEat requires a JAXP transformer that includes EXSLT support. Xalan
  164. supports EXLST. You may experience problems using the JAXP parser
  165. supplied with your JDK, however. To get around this, you can use
  166. Xalan and Xerces in place of your JDK's JAXP implementation. To do
  167. this, place the Xalan and Xerces JAR files (available in the
  168. setup/lib/xalan directory) in your app server's "endorsed"
  169. classpath. For Tomcat this means placing these JARs in the
  170. <TOMCAT HOME>/common/endorsed directory.
  171. =======================================================================
  172. Happy eating!