Baby steps folks, baby steps...
In my previous post I installed Java SDK 1.6.0_24 and Eclipse EE IDE 3.6.2. When everything goes right, as it did for me, these two installs are a no brainer.
Next in line for installs are MySQL, MySQL Workbench, the MySQL JDBC driver, Apache Tomcat, and Apache Ant
Let's start with MySQL, the MySQL Workbench and JDBC driver.
Prior to the install I watched a free webinar titled "MySQL Essentials Series - Part 1: Building, Installing and Configuring MySQL" which covers in some detail a number of installation and configurations options available for MySQL. I thought the video was worth my time.
My needs should be simple so I opted for the MySQL Community Server 5.5.11 using the MSI Installer for 32-bit Windows. I installed to "C:\Program Files\MySQL\MySQL Server 5.5" and chose to store the MySQL data in my dev directory, "C:\dev\MySQL Datafiles".
I opted to install MySQL as a Windows Service and later configured the service from Automatic startup to Manual. As I've said before, my dev machine is under-powered and I need to conserve RAM usage. I also changed the password for the root user.
I installed MySQL Workbench 5.2.33 alongside MySQL in "C:\Program Files". After installation, I fired it up and created a new connection to my local instance of MySQL running on the default port 3306. I confirmed the workbench can connect to the running MySQL database.
Lastly, I downloaded MySQL Connector/J which is the JDBC driver for MySQL. I unzipped the file and copied the "mysql-connector-java-5.1.15-bin.jar" to my "C:\dev\plugins" directory.
After downloading the driver and placing it in your "plugins" directory (or wherever you are storing it), go ahead and create a Driver Definition for your MySQL database in Eclipse. Reminder: you need the EE version of Eclipse.
Eclipse > Open Perspective > Database Development
Database Connections > New > MySQL > MySQL JDBC Driver 5.1
Enter the values for you MySQL installation, including the location of the JDBC Driver, Database Name, User ID and Password.
I'm looking forward to blogging more about developing against the MySQL database. I used it only once before when testing a Media Wiki instance. Most of my previous database experience has been with Oracle and SQL Server.
Next install was Apache Tomcat.
I downloaded the current stable release, version 7.0.11, which implements implements the Servlet 3.0, JSP 2.2 and EL 2.2 specifications. I chose the zip of the core distribution. As I reflect on this, I'm not sure why I didn't just choose the .exe version which automatically installs Tomcat as a Windows service. I kind of like the zip version because I can simply unzip it anywhere and it will run using the startup.bat found in the Tomcat "bin" directory. Also, why install yet another Windows service that I'm going to change from Automatic startup to Manual on my resource starved dev machine? I'd be interested in any comments or thoughts on which Tomcat install is best.
Confirm your Windows Environment Variable "JAVA_HOME" is pointing to your JDK install. I had to update my "Java_Home" because it was set to a previous JDK install.
I ran startup.bat, watched the console output for errors and confirmed a successful server startup by navigating to http://localhost:8080/ in my browser (which these days is Firefox).
Next, we need to tell Eclipse about Tomcat. In lieu of me explaining step-by-step I'll suggest you read this very good tutorial from coreservlets.com: Tutorial: Installing Tomcat 7 and Using it with Eclipse
Install Ant
The current version of Apache Ant is 1.8.2 which I downloaded and unzipped to "C:\dev\Ant".
Create a new Windows Environment Variable "ANT_HOME" and point it to your Ant install. In my case "ANT_HOME=C:\dev\Ant\apache-ant-1.8.2".
Well, that's it for now. Truth be told, I did these installs about a week ago, before I decided to keep a running blog of my progress. Going forward, my posts should be more detailed (and more accurate?) particularly as I begin configuring Eclipse to use Hibernate and using Ant to build my project.
No comments:
Post a Comment