README.bin.txt 9.6 KB

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