Build Intructions
Here are the things you will need to download, install, and setup to get the site running on your local computer as a dev build.
Resin configuration:
- Find your "resin.conf" file. It will be in the "conf/" folder of the directory you installed resin in.
- Open it in an editor (notepad or anything else you prefer)
- Find the XML tag that starts as: "<http port:'8080'/>". Change the port number to "80" if you don't have any other webservers running on your computer (i.e no apache, IIS, etc). Otherwise, just leave this as 8080.
- Next, find the <doc-dir> tags and put the directory that you are building all your site files (jsps, java classes, etc) to here. This should be the same value as you have in your build.properties file's "deployRoot" property (minus the last part with the ${appDir} stuff). (For example, lets say you want your convention site to be located at: c:\wwwroot\convention. Then, set the <doc-dir> value to "c:\wwwroot" (minus the quotes)).
- Go to the very end of this file. then, look backwards for the "host" close tag (""). Immediately above this, put the following tag:
<web-app id='/convention'/>
That should be it......save the resin.conf file and restart resin. To do this, you should be able to open up a command prompt and type:
> net stop resin
followed by
> net start resin
MySQL:
- install the server as a service: "mysqld --install-manual mysql"
- start the server: "net start mysql"
- At this point, your mysql server is running. You have to start it anytime you reboot or stop it....you can stop it with: "net stop mysql".
- Create the "yja" database: "mysqladmin create yja".
- Create the "yja" database user in mysql:
- Download and install the administrator interface: http://www.mysql.com/downloads/administrator.html (get the windows version).
- Open it, connect to your server at "localhost" and user "root".
- Go to the user management section, right-click, and create a new user named "yja". Set the password to "yja" as well.
- While on that user, go to the "privileges" tab near the top. Then, click on the "yja" db and choose to give all the privileges to that user for that db..
- make sure you save the user settings.
Thats it....test that this works by going to a command prompt and typing in the following:
> mysql -u yja -D yja -p
it'll prompt for a password....type in "yja"....if it allows you to connect...you're all set up with mysql!
Follow these steps to setup your CVS environment correctly.
- First, look at this document on CVS
at SourceForge.
-
Connect to the CVS server using SSH to setup your private keys:
>
ssh -l <username> cvs.sourceforge.net
Enter your password when prompted. This
will immediately disconnect you but will setup your account
properly.
(NOTE: You only need to perform this step once on initial
setup)
- Checkout the yja04 module from CVS if you
have write access:
>
cvs -d :ext:<username>@cvs.sourceforge.net:/cvsroot/yja-convo checkout yja04
You should now have the complete set of files for the project in a "yja04" folder.
- Perform this step anytime you want to get the latest updates from CVS (NOTE: You must be in the "yja04" directory or a sub-directory of it for this to work):
>
cvs update
- cd into the "yja04" directory
- Copy the build.properties.template file to build.properties and update the path properties to your resin/mysql setups.
- Run the following commands to start
building:
>
cd torque
>
ant
>
cd ..
>
ant
At this point, you should have
successfully built the .java database objects for Torque and
successfully compiled all .java files for the site. In addition, all
necessary files will have been copied to the deploy Resin directory and
be ready for viewing through a browser.
This step only needs to be applied anytime that the actual database schema changes. It will load the appropriate tables into your mysql database installation. (NOTE: It will drop all tables before creating the new ones and so ALL DATA WILL BE LOST!)
- cd into the "yja04/etc" directory
- There should be a "yja-schema.sql" file in here. If it is missing, go back and perform the Compile steps first.
- Run the following command to load your mysql database (Remember to replace the arguments inside brackets [ ] with the actual values.):
>
mysql -u [yja_database_user] -D [yja_database_name] -p < yja-schema.sql
That should be it! You should be able to restart your Resin server and go to the defined URL and see the site!