Knowledge Base

How to install Grails using the A2 QuickInstaller

This article describes how to use the A2 QuickInstaller to install Grails, a web development framework based on Groovy, Java, Tomcat, and other technologies.

The A2 QuickInstaller is no longer supported, and is only available on older VPS hosting packages. On newer VPS hosting packages, you can use Webuzo to quickly and easily install a wide range of applications and manage your server.

To check if the A2 QuickInstaller supports this application for your Linux distribution, please see this article.

Grails requires at least 2 GB of RAM. If your VPS has less than 2 GB of RAM, you must upgrade the amount of RAM before you can install Grails.

Installing Grails

To install Grails, follow these steps:

  1. Use SSH to log in to your system as the root user.
    To use the A2 QuickInstaller, you must log in as the root user using SSH. You cannot use the serial console in the VPS Control Panel to run the A2 QuickInstaller.
  2. To start the A2 QuickInstaller, type the following command, and then press ENTER:
    sh /usr/sbin/quickinstaller.sh
  3. Under Application Installers, type the option number for Frameworks, and then press ENTER.
  4. On the Framework Menu, type the option number for Grails, and then press ENTER. The A2 QuickInstaller updates your system, and then begins the installation process.
    The installation process takes some time to complete. Do not interrupt the installation process.
  5. The A2 QuickInstaller notifies you when installation is complete.

Testing the Grails installation

To verify that Grails installed correctly, follow these steps:

  1. At the command line, type the following command:
    grails create-app helloworld

    If you receive an error message, log out and log in again to make sure the environment variables are set correctly. The /opt/grails2/bin directory must be in the path. You can verify this by typing the following command at the command line:

    echo $PATH
  2. Type the following commands:

    cd helloworld
    grails -Dserver.port=9090 run-app
    By default, the Tomcat server uses port 8080. To avoid a port conflict, we use the server.port option to specify that the test application runs on port 9090.
  3. To view the project, log in to your system in a separate shell session, and then type the following command:

    lynx 127.0.0.1:9090/helloworld

    You should see the following text:

    Welcome to Grails
    Congratulations, you have successfully started your first Grails application!

More Information