Below are instructions for setting up your development environment.
These instructions assume that you are using Microsoft Windows and
that you are getting the programs from the disc that I gave everyone
in the group.
- Richard
------
MySQL
------
1. If you are working on a Windows NT, 2000, or XP machine, make
sure that you have logged in as a user with administrator privileges.
2. Unzip the mysql-4.0.20b-win.zip file into any directory on your
hard drive. The mysql-4.0.20b-win.zip file is located in the
mysql/windows directory of the disc.
3. Execute the SETUP.EXE file that is located in the root of the
directory where you unzipped mysql-4.0.20b-win.zip. Follow the
instructions to install mysql, picking the "Typical" installation
and any directory that you want, except make sure that the
directory path you choose does NOT have any names with
spaces (like "Program Files").
4. If you didn't pick the default installation directory in the
previous step, then you need to create a text file called "my.ini"
and place that file in the Windows directory. You can determine
the location of the Windows directory by opening a DOS command
prompt and entering the following:
C:\> echo %WINDIR%
My laptop is running Windows XP Home Edition and the Windows
directory is C:\WINDOWS
The contents of "my.ini" should be set to something similar
to the following. The only difference should be that your
"basedir" line should have the path to your mysql installation
that you chose in the previous step and the "datadir" line
should have the path to the data directory under your mysql
installation.
[mysqld]
# set basedir to your installation path
basedir=C:/devel/database/mysql
# set datadir to the location of your data directory
datadir=C:/devel/database/mysql/data
5. Install mysql as a service by opening a DOS command prompt and
executing the following (be sure to use the correct directory
to your mysql installation):
C:\> C:\mysql\bin\mysqld --install-manual
If you ever want to remove a server that is installed as a service
simply execute the following:
C:\> C:\mysql\bin\mysqld --remove
6. Once mysql is installed as a service, you can start the server
by opening a DOS command prompt and executing the following:
C:\> net start mysql
You can stop the mysql service with the following:
C:\> net stop mysql
7. You can connect to a running mysql server with the following:
C:\> C:\mysql\bin\mysql
You can disconnect from mysql with the following:
mysql> quit
You can display the databases that you currently have with the
following (don't forget the semicolon at the end):
mysql> show databases;
To select a database to use for queries enter the following
where "test" is the name of the database that you want to use:
mysql> use test;
Once you have selected a database to use, you can display what
tables are in that database with the following:
mysql> show tables;
For any other commands, refer to the reference manual that is included
with the installation under the Docs directory, or see the following
link:
http://dev.mysql.com/doc/mysql/en/index.html
Next I talk about installing and using MySQL Control Center, which
is a GUI, if you prefer GUIs over the command line.
---------------------
MySQL Control Center
---------------------
1. Unzip the mysqlcc-0.9.4-win32.zip file into any directory on your
hard drive. The mysqlcc-0.9.4-win32.zip file is located in the
mysql/windows directory of the disc.
2. Execute the Setup.exe file that is located in the root of the
directory where you unzipped mysqlcc-0.9.4-win32.zip. Follow the
instructions to install MySQL Control Center, picking any directory
that you want.
3. Startup MySQL Control Center. Under the "MySQL Servers" heading on
the left of the GUI, right-click on "root@localhost:3306" and select
"Connect". This will connect you to the running mysql server. Of
course if mysql isn't running, then you need to start it before doing
this.
4. To add a new database for LCS, right-click on the "Databases" folder
and select "New Database". Enter "lcs" and click "OK". You should now
see a database named "lcs".
5. To connect to the database, right-click on the database and select
"Connect".
6. To create a table in the database, right-click on the "Tables" icon
under the lcs database and select "New Table". From here it's pretty
self explanatory. You simply enter field names, where the field should
allow nulls or not, and the datatype for the field. At the bottom a
tabbed interface allows you to put in the field length, a default value,
and a auto increment status ("Field Properties" tab), and assign primay
keys and indices ("Indexes" tab), and give the table a name and a comment
("Table Properties" tab).
7. To return rows from a table, right-click on the table name and select
"Open Table" -> "Return all rows".
8. To run SQL queries or DDL, select the "SQL" button at the top of the GUI.
From here, type in the SQL and to execute the SQL click on the "!" button.
MySQL accepts standard ANSI SQL syntax where each line must end in a
semicolon.
9. Fonts for the GUI can be modified by selecting "Options" -> "General" from
the top menu. Select the "Syntax Highlighting" tab to adjust fonts.
-----
Java
-----
Under construction...
-------
Tomcat
-------
Under construction...
------
CVSNT
------
Under construction...
--------
Eclipse
--------
Under construction...
Here are some usefull
links to software that I put on the disk.
MySQL: http://dev.mysql.com
Ant: http://ant.apache.org/
Tomcat: http://jakarta.apache.org/tomcat/
Struts: http://jakarta.apache.org/struts/
J2SDK API: http://java.sun.com/j2se/1.4.2/docs/api/
J2EE API: http://java.sun.com/j2ee/1.4/docs/api/
JSTL: http://java.sun.com/products/jsp/jstl/index.jsp
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
JavaServer Faces: http://java.sun.com/j2ee/javaserverfaces/index.jsp
http://jakarta.apache.org/struts/proposals/struts-faces.html
http://www-106.ibm.com/developerworks/library/j-integrate/
CVSNT: http://www.cvsnt.org/wiki/
Eclipse: http://www.eclipse.org/
- Richard
Note: I did NOT create a copy of Richard’s CD on the source forge site. If you want to “recreate” this project you need to get the latest versions of the tools on your own. (Wayne)