Pixsdesign

What I am still learning about the web

Railo Installer Using NSIS

It is my intention to design a simple first step installer for Railo on a tomcat platform. I will do this using the NSIS installer, please comment with any features you would like for this installer.

  • 3 Comments
  • Filed under: Uncategorized
  • Build Railo from Source

    Acknowledgements

    Before I start this article, I would like to  state this is a continuation of a blog written by Sean Corfield which can be found here An Architects View – Railo build blog. And I would strongly advise anyone attempting to build Railo, to read both articles to get a better understanding of the whole process.

    Requirements

    In order to build Railo from the Source in an easy and simple way, you’re going to need a few things first.

    Working Railo Explanation

    If you followed my advice you would have visited Sean’s site and seen the requirement for a running Railo installation. This sometimes puzzles people but can be easily explained. The later sections of the build process are processed in ColdFusion, this means you need an environment capable of parsing CFML, and what better one to use than the one you have decided to build.

    Install Tomcat (optional)

    This part is only for people who wish to do as I did, and use the Windows Tomcat installer to get Railo up and running quickly.

    Use the Windows Service Installer, it’s quick and painless. Once installed check that the service is not running, if it is stop it.

    Install Railo

    Get the latest Railo.war and rename if to something like railobuild.war. This will just make the URL you’re going to need later easier to read. Place the newly renamed war file into the webapps directory within Tomcat and start the Tomcat service, this should unpack the war file into a directory named railobuild in my example or in yours whatever your war file was named.

    Well done Railo is ready. Now we can get the Source.

    Getting the source

    Using your SVN client checkout the latest source from Railo’s repository

    http://anonsvn.jboss.org/repos/railo

    This will take some time but when completed you should have a single Railo folder containing the standard Branches, Tags and Trunk directories at the time of this article being written Branches and tags were empty. But being as we are only interested in Trunk that’s no great shakes.

    Setting up the Eclipse Projects

    Now we have the source code we need to add the projects to eclipse. To do this we will import them. This part is shamefully similar to Sean’s explanation but that’s because there really is only one way to do this part.

    In Eclipse select File > Import > General > Existing Projects into Workspace and click Next >. For the root directory, Browse to railo/trunk/railo-java/railo and Choose that folder. It should now import the project into a directory called Railo. Click Finish.

    Do exactly the same for railo/trunk/railo-java/railo-core, railo/trunk/railo-java/railo-loader and railo/trunk/railo-java/railo-master.

    Fixing the Build Paths

    You will notice that Railo-Core and Railo-Loader have a red ‘x’ on the project. This is due to the build paths being incorrect. Lets fix that by right clicking on the project and selecting Build Path > Configure Build Path navigate to the libraries tab select all the jars apart from the JRE System Library, and click remove. Now we need to replace them with the same jars but in the correct locations. Click Add External Jars then Browse to the railo/trunk/railo-java/libs directory and select all the jars, being careful not to copy the .svn directory and click open. This should populate the libraries tab with all the jars. Make sure you have done this for both Railo-Core and Railo-Loader.

    Preparing your Working Railo

    We need to move some files into the Railo you created earlier, copy the contents of the railo/trunk/railo-cfml directory into the Railo-Build directory on your tomcat railo install.

    This is also a good time to log into your Railo web administrator and set a password. This will be required during the build process.

    Setting the Build Properties

    Within the Railo-Core project you will find the build.properties file, open this within a text editor and within that file change the railo.url to the location of your compileAdmin.cfm which if you have followed this tutorial with no variation will be:

    railo.url=http://localhost:8080/railobuild/compileAdmin.cfm

    Building Railo

    Within the Railo Source project, right click the build.xml file and select Run as > Ant Build. The build will begin and approximately half way through a prompt box will appear asking you for the Railo password you provided in your tomcat Railo setup. Once accepted the build process will complete the final coldfusion parts of the build process. Within the console you should see all the output and  hopefully “Build Successful”.

    Deploying your Railo

    Now right-click the Railo-Core project and select Refresh. The red ‘x’ should go away and you should see build and dist directories inside that project. Open the dist directory and you should see [version].rc file.  Take the created .rc file and paste it into the following directory within your Railo install.

    C:\tomcat\webapps\railobuild\WEB-INF\lib\railo-server\patches
    if this is where you have your directory.

    Now all that is left to do is restart Railo. When you next log into the web administrator you will see within the overview that the version number has changed to the version you have just built.

    LogDigger Mantis Setup

    If you are a frequent web application coder you will no doubt have done endless hours of testing and bug fixing. What this tutorial will hopefully provide you with is a quick and easy way, to setup, and maintain a live Mantis issue tracking system, with an added bonus of utilising the issue reporting application LogDigger. What are they I hear you say, and why use them together. At this point I could ramble on about the two programs but as there sites already do this here are the links:

    now you can as you have probably seen on the LogDigger site use LogDigger witha number of issue tracking applications. I have chosen Mantis because its quick and easy to set-up an environment to use it in.

    Setting up the environment

    Firstly we are going to have to setup a PHP MySQL environment in order for Mantis to work, if you have this already great skip this section if not we can get you up and running really quickly with the very useful package that is WAMP Server LAMP if your on Linux but as I don’t personally use Linux all that much, this tutorial will be based around WAMP.

    WAMP

    WAMP stands for Windows, Apache, MySQL, PHP. and it all comes bundled for you in a handy .exe, so all we need do now is go to the following link and download WAMP.

    Once Installed on your machine (and if you have chosen C:\ as the install location) you will find a directory called wamp within that there is a directory called www this is where we need to place Mantis. To check if WAMP is working you will see in the bottom right of your screen the following icon wamp working. If like in this image its all white your cooking on gas if not check that you have disabled IIS in your services. When you have disabled IIS restart all services associated with WAMP by clicking the following.

    wamprestart

    Mantis

    So now you should have a fully working WAMP server. if you go to the following Link we can get Mantis downloaded.

    with the Mantis zip downloaded. Take that file and unzip it to the following location C:\wamp\www. and rename the directory to mantisbt

    now in a your browser of choice navigate to http://localhost/mantisbt you should be presented with the setup page of mantis asking you for multiple settings passwords and usernames i leave to you. but the most important part of this page is the database. If we refer to the image above you will see that there is a link listed called phpMyAdmin. we need to go there now.

    phpMyAdmin

    Within phpMyAdmin we need to create a new database for Mantis to utilise. This is done by writing the name of the database in the box provided phpMyAminCreateand clicking create. rememember the name and enter this in the Mantis setup page. Run the setup page when all aettings are to your desires. when setup is complete you should have all the fields shown as green.

    mantisgreen

    We should all now have mantis installed and be able to login. (defauly password is usually administrator and the password is usually root).

    follow the simple instructions to create a project within the manage section. This will save time once we have installed LogDigger.

    Tomcat

    Now this is where some die hards will be telling me i have it wrong and I should be implemement a Tomcat with PHP MySQL integrated, and yes I agree but for this quick setup guide to demonstrate the benefits of these systems I am going to use the quick and easy way two seperate installs.

    Get the latest Tomcat from here

    I would reccommend the windows installer as this will be relatively painless.  Install this now if you installed in C:\tomcat you will be able to find your webapps directory here C:\tomcat\webapps this directory will be the one that you will be installing LogDigger upon.

    LogDigger

    We need to get the .war version of LogDigger this will be the quickest and most painless way to install LogDigger find it at the following link

    tomcat will automatically unpack the .war file and install it as a web application, the one point I will make would be that the .war file should be renamed in order for the app to have a sensible name, for example I simply removed the version number to leave logdigger.war. Once renamed place the .war file into the webapps directory and let Tomcat work its magic.

    now we have logDigger installed we need to set it up and test that it is accessible, to do this try the following. If you have left Tomcat on the default port of 8080 then you can navigate to the following url in your browser of choice. http://localhost:8080/logdigger/ this should bring up logdiggersetupthe LogDigger setup page. follow the 6 easy steps and we are nearly there.

    All you need to do now is define a project within LogDigger and if you have done everything up to this point correctly you will see that LogDigger takes all it’s projects from your Mantis installation. Once setup we need to start issue tracking, to do this we need to install the LogDigger browser extension.

    Browser Extension

    At the time I wrote this there were only two extensions available they are for Internet Explorerand Firefox.

    if you go to the link below and download the relevant extension

    once installed you should be able to report issues on the fly while

    JQuery quicky site

    Hi this is a quick post pointing anyone who wants a quick JQuery solution to the following site

    UI JQuery

    Here you can touch up pre-designed templates for the most common JQuery functions and then download them. Always save the best until last, they also come with  a very handy examples page where you can basically strip the code out of and place it straight into yours.

    Short and sweet but hope it helps :-)

    My Tweets

    • London is awesome might move there one day :-) 2 weeks ago
    • Blackburn Rovers season is over and what makes it so sweet is that we knocked them out of both Cups :-) 2 weeks ago
    • suggestions for a Railo installer that is lol (must remember to tell people what i'm talking about!) http://bit.ly/6z9mvY 2 weeks ago