140 likes | 381 Views
ITIS 4166 Class #4. Install Latest. Things to do. Install Java Get book examples Install MySQL Create RDB Install Tomcat Install NetBeans. Java. java.sun.com redirects to an Oracle site Java SE Development Kit 8 jdk-8u5… select appropriate for your OS Windows, Linux, or OS X
E N D
ITIS 4166 Class #4 Install Latest
Things to do • Install Java • Get book examples • Install MySQL • Create RDB • Install Tomcat • Install NetBeans
Java • java.sun.com • redirects to an Oracle site • Java SE Development Kit 8 • jdk-8u5… • select appropriate for your OS • Windows, Linux, or OS X • 32 or 64 bit • Use defaults
Examples • www.murach.com • Downloads for 2nd edition • I used the self extractor • Unzipped it directly to c:\murach
MySQL • www.mysql.com • Not "needed" until Ch 14. • Needed to run all Ch2 examples • Download the Community Edition • 5.6.x • Download installer • Note: 32 bit installer works for 32 or 64 bit installs • Two options • Server Only package • Will need a connector later • Dev Package • Has several connectors including Connector/J • Installs Workbench • However, also has other unneeded bagage • Use "sesame" as the PW for root • Create a UID for yourself • Any PW you will remember
Create the database • /murach/servlet_jsp/db/create_db.bat • Will need to edit the cd line for your version of MySQL • Check the directory name in \Program Files\MySQL
MySQL GUI ToolsConnector/J • If you did the Dev package these are already installed • MySQL Tools • Replaced by MySQL Workbench • 6.1 • Download the 32 bit install • Installs the correct one • Connector/J • Windows Installer did not work for me • Got the zip file from the platform independent area • 5.1.31 • Unziped and moved JAR to the JDK/jre/lib/ext dir
Tomcat directly • tomcat.apache.org • 7.0.54 • Select version for your OS • I tried 32-bit/64-bit Windows Service Installer • Failed on my Win 7 64 bit server • Didn't install everything on my 32bit netbook • 64 bit 8.0.8 • Unzipped to c:\ • Renamed c:\apache-tomcat-7.0.54 to c:\tomcat • Copied 4 jars to jdk1.8.0_05/jre/lib/ext • be sure it is the jdkjre lib, not the jre lib • Edit the catalina.bat to add set for Java Location • May need to change default port 8080 to another in server.xml file – I used 4040 for one of my servers • Test with url, e.g.: localhost:4040
Tomcat • Enable Web App Manager • Note: in v8 there are now 4 manager roles • For the GUI use: • rolename="manager-gui" • roles="manager-gui" • Optional: create a bat file in your desktop: • StartTomcat.bat • cd \tomcat\binstartup • StopTomcat.bat • cd \tomcat\binshutdown
Tomcat Summary • Install tomcat by unzipping to c:\ • rename to tomcat • Copy the 4 jar files from Tomcat to Java JDK • Edit catalina.bat • Don't forget to start Tomcat before using!
Updates • Updates • http://www.murach.com/dloads/jsps/jsps_tomcat-5.5.pdf
Netbeans • netbeans.org • Search netbeans java ee download • NetBeans IDE 8.0 Download • Use the Java EE version • Installer – run the exe • Uncheck Tomcat • Would install another tomcat • Uncheck Glassfish • jUnit optional (I didn't install)
NetBeans • Configure Tomcat • Per application • Tools Servers • Add Server… • Select Tomcat • Add the location
NetBeans • Register DB • Per application