Latest installation instructions

advertisement
=======================
|===================================|
| SOME INSTALLATION INSTRUCTIONS
|
|===================================|
(NOTE: most of these instructions are thanks to Benjamin Ingram http://homes.jcu.edu.au/~jc125786/ )
See new stuff in red
-------------------------SETTING UP JAVA AND SUN STUDIO (written by Benjamin Ingram)
NOTE:
This is a simple set of instructions to assist the CP3120 group to
configure their home systems with Java and SUN Studio. It is not mean
to be a definitive"how-to" install Java and SUN Studio. This is purely
for the benefit of my CP3120 group. If you are a visitor and you find
it useful.... great.
INSTALL JAVA SDK
1. Run the file j2sdk-1_4_1_02-windows-i586.exe from the CD to start
the install wizard
2. Click next in the welcome screen
3. Click "Yes" to the license agreement
4. Accept the default location (c:\j2sdk1.4.1_02). Click next
5. Accept the default components
6. It will find the installed browsers and suggest appropriate plugins. Accept these and click next
7. It will now install a bunch of files and set up the environment.
Once all this happens click finish.
8. Important - the Java install wizard has finished its thing. You
need to make some more changes. Right click on My Computer and
choose “Properties”. Now click on the advanced tab and select
environment variables. In the system variables window
highlight/select “path” and click the “edit” button. The Edit
system variable window comes up.
9. Click in the Variable Value window and push the home button to go
to the start of the Path variable. Then enter:
C:\j2sdk1.4.1_02\bin;C:\j2sdk1.4.1_02\jre;
in front of anything that is there. This is really important; I
have found that if you don't do this you can never find any of
the files you copy into the %java_home/jre/lib/ext directory.
This includes JUnit and the Java MySQL database connector
INSTALL JAVA-MYSQL CONNECTOR
1. Open the zip file mysql-connector-java-3.0.6-stable.zip (This is
in the mySQL directory of the CD. It is also available from the
MySQL web site)
2. You only need to extract one file. Find mysql-connector-java3.0.6-stable.jar and extract it to the directory
c:\j2sdk1.4.1_02\jre\lib\ext\
INSTALL SUN STUDIO
1. Run the file ffj_ce_win32.exe from the CD to start the install
wizard
2. Click next at the welcome window
3. Click next to accept the terms of the license agreement
4. The wizard will then find the Java home. Accept it if it looks
right by clicking next
5. Accept the default directory and click next. It will ask you if
you want to create the directory, click yes
6. Accept the default install components and click next
7. Accept association if you are satisfied. click next
8. Click next at the summary
9. It will then install, once it has finished click finish
10.
Now start SUN Studio
11.
Enter a user directory. c:\ide-userdir seems good and click
OK
12.
Select "No" at import settings and click Finish
13.
Choose your preferred window mode and click Finish
14.
Now choose your registration option - "Never" and click
Finish
MORE INFO:
 If you run the cmd prompt (start button >> run >> “cmd”) then:
 “echo %path%” will show your class path value.
 “set path=C:\j2sdk1.4.1_02\bin;C:\j2sdk1.4.1_02\jre;” sets
the path.
 If “javac” shows a list of commands, you’ve done your
classpath properly. If not; you’ll have to keep trying.
Bugger.
If you get sick of (re)setting classpath (machines are getting reimaged incorrectly) you might want to make a .bat file... open
notepad, type a single line saying:
“set path=C:\j2sdk1.4.1_02\bin;C:\j2sdk1.4.1_02\jre;” and save that
as MY_CLASSPATH_CHANGER.bat :)
-------------------------SETTING UP MYSQL ON A WINDOWS BOX (written by Benjamin Ingram)
NOTE:
This is a simple set of instructions to assist my CP3120 group to
configure their home systems with MySQL Server. It is not mean to be a
definitive “how-to” install MySQL Server. This is purely for the
benefit of my CP3120 group. If you are a visitor and you find it
useful.... great.
INSTALL MYSQL
1. Extract files to temp area from the zip file mysql-4.0.12-win.zip
2. Click on setup.exe from the files you just extracted
3. The MySQL install wizard starts and you just click next at the
welcome screen
4. Another information window comes up. Just click next
5. Accept the default location to install (C:\mysql)
6. Choose the typical setup type and next
7. Click Finish once the installation is over
8. Find the file winmysqladmin.exe and start it up. Follow the
prompts and enter a user that exist on the machine. I used my own
account. This will get the service running
SETTING UP MYSQL
 Configure root password with the following command sequence:
 Open a Command window (Run CMD or command) and go to the
directory c:\mysql\bin
 Open mySQL console
c:\mysql\bin> mysql -u root mysql
 Set up root (administrator password)
mysql> set password for
root@localhost=password('new_password');
 Or you could use the command
mysql> update user set password=password('database')
where user='root';
mysql> flush privileges;
 Create a database with the command sequence:
 Open mySQL console as root if necessary
c:\mysql\bin> mysql -u root -p
 (System prompts for root password if set)
 Create the database
mysql> create database example;
 Create a user for the database in mySQL with the command
sequence:
 Open mySQL console if necessary
mysql -u root -p
 (System prompts for root password if set)
 Use the mysql database
use mysql;
 Create the user account for the local host
mysql> GRANT ALL PRIVILEGES ON example.* TO
exuser@localhost
-> IDENTIFIED BY 'password';
 Create the user account for all other hosts
mysql> GRANT ALL PRIVILEGES ON example.* TO exuser@"%"
-> IDENTIFIED BY 'password';
 Then you can create table with the Data Definition language
you learnt in CP1500 and CP3020!


All of this can seem a bit tricky. You can also create a file
that does it all for you. All you have to do is log onto MySQL as
root and run your sexy file and use the command source filename.
Click here to view/download a file that will create the above
database, and grant privileges as above. It will then put a
record in the database. This is the fastest and easiest way to
update a MySQL database, or any other DB for that matter.
For example, if you download the file above to the temp directory
on c:. You simply log into mysql as root as shown above and run
the command
mysql> source c:\temp\test.txt
-------------------------SETTING UP SUN STUDIOS TOMCAT 4:
NOTE: We used the version of Tomcat which comes with Sun Studios. For
fairly comprehensive instructions on getting tomcat to work go to:
http://javaboutique.internet.com/tutorials/Tomcat/index.html
http://javaboutique.internet.com/tutorials/Tomcat/configure.html
The biggest thing (from memory) was setting the JAVA_HOME environment
variable (yes; another environmental variable).
--BEGIN EXTRACT—
You must set the JAVA_HOME environment variable to tell Tomcat
where to find Java. Failing to properly set this variable
prevents Tomcat from handling JSP pages. This variable should
list the base JDK installation directory, not the bin
subdirectory. For example, if you are on Windows 98/Me and
installed the JDK in C:\J2SDK1.4.1_02, you might put the
following line in your autoexec.bat file.
set JAVA_HOME=C:\J2SDK1.4.1_02
On Windows NT/2000/XP, you would go to the Start menu and select
Settings, then Control Panel, then System, then Environment.
Then, you would enter the JAVA_HOME value.
Rather than setting the JAVA_HOME environment variable globally
in the operating system, some developers prefer to edit the
startup script to set it there. If you prefer this strategy, edit
install_dir/bin/catalina.bat
(\s1studio\ce\tomcat401\bin\catalina.exe) and change the
following:
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo You must set JAVA_HOME to point at ...
goto cleanup
:gotJavaHome
to:
if not "%JAVA_HOME%" == "" goto gotJavaHome
set JAVA_HOME=C:\J2SDK1.4.1_02
:gotJavaHome
Be sure to make a backup copy of catalina.bat before making the
changes.
--END EXTRACT-
NOTE: “Changing the Port to 80” is optional.




If you start \s1studio\ce\tomcat401\bin\startup.exe then visit
http://localhost:8080/ using any browser and see a tomcat page
then you’ve set it up correctly. Yay!
Put all your complied class files in: tomcat401\classes\
Put all your jsp pages in: tomcat401\webapps\ROOT\
If you get this working in under two hours consider yourself
extremely lucky. It took me at least 8 the first time!
-------------------------UNI MACHINES:
In the current (10/8/04) setup of uni computers in E1.017:
 Hopefully Tomcat is installed (and be part of the image) at
C:\java\Tomcat5.0\
 I noticed they removed the startup thing from the start program
menu. My solution was to go into the Tomcat5.0\bin directory and
made a new text file containing “catalina start”, renamed it to a
bat file called “_START_THIS_BASTARD.bat” and executed that. None
of the other bat or exe files seem to work on their own. Crap
hey?
If your working in E1.015 god only know what’s installed.
-------------------------SETTING UP TOMCAT 5:
Run free_software\Tomcat\jakarta-tomcat-5.0.19.exe, and you might get
the whole thing working first go. A shortcut to execute Tomcat will be
added to your start menu – use it, and visit http://localhost:8080/. If
so, celebrate with beer and smarties.
If it doesn’t work, you may have to fiddle with class paths.
NOTE: “jakarta-tomcat-5.0.19” is quite different to Tomcat v 4.
You may have to navigate to the correct drive and directory (jakartatomcat-5.0.19\bin) then change:
set JAVA_HOME=C:\Program Files\j2sdk_nb\j2sdk1.4.2
And (I think):
set CATALINA_HOME=D:\jakarta-tomcat-5.0.19
Now setup.bat should work, but only seems to if you run a new CMD
window & call it from there (navigate to jakarta-tomcat-5.0.19\bin then
type startup.bat). Pretty crappy I agree.
NOTE:
You will put all jsp pages in the tomcat\webapps\ROOT\ directory (as
with version 4), HOWEVER the compiled classes will have to be placed
in: tomcat\webapps\ROOT\WEB-INF\classes\ ... I think.
There is much more too it though, some people learn how to change WEBINF\web.xml and you might need to put extra jar files (eg: the mysql
connector & catalina-root.jar) in the WEB-INF\lib directory; I did when
I uploaded my old project to a manning Tomcat server they setup for us
during 2004 sem1, so best of luck figuring it all out. :)
http://www.coreservlets.com/Apache-Tomcat-Tutorial/ - might tell you.
Good luck chicken little.
-------------------------SOURCE SAFE 6
INSTALLATION:
NOTE: If you have .NET or Visual Studio installed, you might find this
won’t want to install.
Go to \free_software\SourceSafe6\, start SETUP.EXE and follow
installation.
Product key is 876-2217234.
Unclick the option to install MSDN when you get there.
Choose to register never.
USE:
On your “Start Menu>>Programs>>Microsoft SourceSafe” you can run
regular SourceSafe, or the Admin program.
To open an existing SourceSafe “project”: run SourceSafe, browse to the
srcsafe.ini file, then login as admin, with no password. If that
doesn’t work then you’re screwed.
To get stuff “out of” SourceSafe: Select the very root directory,
right-click and select “check out” – you’ll probably then have to then
specify a working directory. Do it again, and click the option
“recursive”. This will copy everything out, so you can have a good look
at it.
To make your own SourceSafe project: From memory only: run the Admin
program, create a new project (somehow), and select it, and add a few
users & edit their passwords. Then run normal SourceSafe to open the
new project. Click the add directory buttons to replicate your
structure, and paste in your class & java files etc. This is a very
slow process, but I don’t think there is any way around it.
Don’t bother using SourceSafe to keep your own project “safe” – it’s
not practical unless it’s set up properly (networked). You’ll probably
only want to use it a day or two before submission.
-------------------------VISUAL PARADIGM
INSTALLATION:
Pretty simple really:
o Log in as administrator to install (u:cisco, p:<same_as_sem1>) –
although for some reason I was able to install it using my jc# also...
o Run free_software\VISUAL_PARADIGM\vpumlse_20040414.exe
o You can install it anywhere - but I’d prefer you to install it to
c:\java\visual_paradigm on uni machines.
o It also asks where to put a “product icon” (shortcut). Put it on the
desktop – may as well. If you log in using your jc**** you probably
might not see it; you’ll have to find it through Explorer to start it
(user profiles are not stored properly in Cairn yet).
o It has a screen with about four options – click the first option
“Visual Paradigm for UML”.
o Now it should be installed.
o Open Internet Explorer, go to www.google.com/ (actually, any site
outside the uni will do), requiring you to type your jc# and password.
I’ll tell you why soon.
o Fire it up visual paradigm.
o I think then there are some preference options; just click next.
o Soon it shows a screen asking for registration key file. Click import
key, browse to and import:
free_software\VISUAL_PARADIGM\James_Cook_University__2004_vpumlse_31.zvpl.
o It should say import successful.
o The reason we connected outside the uni was to get past the firewall.
If you don’t, it prompts for connection proxy/login settings, but for
some crazy reason this never worked for me. Dmitry also said typing
http://authenticate.jcu.edu.au into IE should work at this stage, but
didn’t. Bugger.
o At home you shouldn’t have any problems, but at uni (E1.015), you’ll
have to through the registration key thing every time you logout then
log in! It’s all to do with the profiles not getting stored.
o For this reason, make a copy of
free_software\VISUAL_PARADIGM\James_Cook_University__2004_vpumlse_31.zvpl to c:\java\visual_paradigm, and another copy to the desktop.
This will make it quicker to browse to when you log in as cisco next.
USING:
So far as I can tell at this early stage, it’s a good
program/interface; much easier than Rational Rose. I’ll show you in
classes, but you add new diagrams (e.g.: “class diagram”), then drag
and drop objects (e.g.: “classes”), and also add connectors (e.g.:
“dependency arrow”).
VISUAL PARADIGM FOR NETBEANS:
I don’t advise version. The professional edition of it would be good,
because you can use your UML diagrams to generate skeleton classes/code
shells within NetBeans. As it is, the stand-alone version (above) is
easier to use; mainly because the version for NetBeans seems to save
the projects to odd locations. It seemed to save to C:\Documents And
Settings\jc****\.NetBeans\System\Default\System\default.vpl or
something insane like that. You’d have to read the installed pdf help
document for more info, but it seems you have a set of visual paradigm
drawings for each project.
Download