Wednesday, November 13, 2013

Installing Vertx on Ubuntu 13

Environment details

  • Instance type: EC2 hi1.4xlarge
  • OS: Ubuntu 13.10 (64 bit)
  • Java VM: ** java version "1.7.0_25" (IcedTea 2.3.12) ** (7u25-2.3.12-4ubuntu3) ** OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
  • vertx: 2.1M1 (built 2013-10-29 11:11:22)

Installing Software

Java 7 JDK:
 $ sudo apt-get install openjdk-7-jdk


$ wget http://dl.bintray.com/vertx/downloads/vert.x-2.1M1.tar.gz

$ tar -zxf vert.x-2.1M1.tar.gz 

$ ls
vert.x-2.1M1  vert.x-2.1M1.tar.gz
Move into standard Unix structure:
$ sudo mv vert.x-2.1M1 /usr/local/share/

$ ls /usr/local/share/
...  vert.x-2.1M1  xml
Create symbolic link to /usr/local/share/vertx so upgrading is easier.
$ sudo ln -s /usr/local/share/vert.x-2.1M1/ /usr/local/share/vertx
$ ls /usr/local/share/vertx
api-docs  bin  client  conf  lib
Add vertx symbolic link to your /usr/bin/ directory.
$ sudo ln -s /usr/local/share/vertx/bin/vertx /usr/bin/vertx
Install a real damn editor:
$ sudo apt-get install emacs
Create test script to test vertx is installed properly:
var vertx = require('vertx');
vertx.createHttpServer().requestHandler(function(r) {
r.response.end("test 1\n");}).listen(8080);
Now run vertx against test script:
$ vertx run test.js &
[1] 11493
$ Succeeded in deploying verticle 
$ curl
test 1
If you get "test 1", this means vertx is install and able to server verticles.

No comments:

Post a Comment

Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training