Building a FC6 server for Java development

· Read in about 2 min · (311 words) ·

It has come upon me to build a FC6 server with a Java build environment that is going to serve as the build machine. This is the first time I’m coming to Fedora - always having used Debian in the past.

  1. OS installation was smooth. I installed with KDE since some folks prefer the GUI.

  2. During the installation, I chose Java Development - and all the gcj components got installed. Then post installation, I downloaded JDK from Sun and installed it too. The (gcj) tomcat of course didnt work very well in this mess. Fixing it was easy - just fired up yum via Add or Remove Programs and removed gcj - which removed all the other gcj tools and libraries too.

  3. Setting the host name - unexpectedly, had trouble doing this - finally used system-config-network.

  4. Environment variables - again a little digging around to figure out how to set environment variables so that they are effective for all users on the system - essentially JAVA_HOME, JRE_HOME, CATALINA_HOME, MAVEN_HOME etc. Finally found that this is best set in /etc/environment where it works for all users.

  5. Downloaded java tools and libraries - housed tomcat and maven under /usr/lib/java/maven-xxx and /usr/lib/java/apache-tomcat-x.xx and created symlinks. Placed symlinks to tomcat’s startup.sh and shutdown.sh in /usr/bin. Placing a symlink to maven doesnt work - but an alias works as well. To make it work for all users, simply put it in /etc/profile

    ` alias maven=/usr/lib/java/maven/bin/maven`

  6. Created a group java and added users to the group. Set permissions on the maven installation folder so that java group has write access (this is so that maven plugin:download for additional plugins works properly and can write to the maven plugins folder)

That’s all there is to it. Just make sure that you do everything as the 'application' user - dont do it with your account or the root account.