forked from vert-x/vert-x.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.html
128 lines (115 loc) · 4.79 KB
/
install.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<!-- <link rel="stylesheet/less" href="bootstrap/less/bootstrap.less">
<script src="bootstrap/less/less-1.3.3.min.js"></script>
-->
<link href="bootstrap/bootstrap.css" type="text/css" rel="stylesheet"/>
<link href="google-code-prettify/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="google-code-prettify/prettify.js"></script>
<link href="css/vertx.css" type="text/css" rel="stylesheet"/>
<link href="css/sunburst.css" type="text/css" rel="stylesheet"/>
<title>Vert.x</title>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30144458-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body onload="prettyPrint()" class="hp">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse"
data-target=".nav-collapse">
<span class="i-bar"></span>
<span class="i-bar"></span>
<span class="i-bar"></span>
</a>
<a class="brand" href="/">Vert.x</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="/">Home</a></li>
<li><a href="downloads.html">Download</a></li>
<li><a href="install.html">Install</a></li>
<li><a href="docs.html">Documentation</a></li>
<li><a href="examples.html">Examples</a></li>
<li><a href="community.html">Project Info</a></li>
<li><a href="https://github.com/vert-x/vert.x">Github</a></li>
<li><a href="http://modulereg.vertx.io/">Module Registry</a></li>
<li><a href="http://groups.google.com/group/vertx">Google Group</a></li>
<li><a href="http://vertxproject.wordpress.com/">Blog</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span12">
<div class="well">
<h1>Installation Guide</h1>
</div>
</div>
</div>
<div class="row">
<div class="span12">
<div class="well">
<div>
<h1 id="getting-a-distro">Getting a distro</h1><br/>
<p>The easiest way to get hold of a distribution is to <a href="downloads.html">download a binary distro</a>.</p>
<p>Alternatively you can build from source. To do that clone the <a href="https://github.com/vert-x/vert.x">github repository</a>
and read the file <a href="https://github.com/vert-x/vert.x/blob/master/BUILD_README.md"><code>BUILD_README.md</code></a>.</p>
<h1 id="pre-requisites">Pre-requisites</h1><br/>
<ul>
<li>
<p>Operating System. Vert.x runs out of the box on Linux, OSX or Windows.</p>
</li>
<li>
<p>Vert.x requires JDK 1.7.0 or later. You can use the official Oracle distribution or the OpenJDK version. Make sure the JDK bin directory is on your <code>PATH</code>.</p>
</li>
</ul>
<h1 id="install-vertx">Install Vert.x</h1><br/>
<p>Once you've got the pre-requisites installed, you install Vert.x as follows:</p>
<ol>
<li>Unzip the distro somewhere sensible (e.g. your home directory)</li>
<li>Add the Vert.x <code>bin</code> directory to your <code>PATH</code> environment variable.</li>
</ol>
<p>For example</p>
<pre class="prettyprint">tar -zxf ~/Downloads/vert.x-2.0.0-final.tar.gz
</pre>
<p>or</p>
<pre class="prettyprint">unzip ~/Downloads/vert.x-2.0.0-final.tar.gz
</pre>
<h2 id="check-the-version">Check the version</h2><br/>
<p>To make sure you've installed it correctly, use <code>vertx version</code> to display the version.</p>
<pre class="prettyprint">$ vertx version
vert.x 2.0.0-final (built ...)
</pre>
<p>You should see output something like the above.</p>
<h1 id="testing-the-install">Testing the install</h1><br/>
<p>Let's test the install by writing a simple web server.</p>
<p>Copy the following into a text editor and save it as <code>server.js</code></p>
<pre class="prettyprint">var vertx = require('vertx');
vertx.createHttpServer().requestHandler(function(req) {
req.response.end("Hello World!");
}).listen(8080, 'localhost');
</pre>
<p>Open a console in the directory where you saved it, and type:</p>
<pre class="prettyprint">vertx run server.js
</pre>
<p>Open your browser and point it at <a href="http://localhost:8080">http://localhost:8080</a></p>
<p>If you see "Hello World!" in the browser then you're all set to go!</p></div>
</div>
</div>
</div>
</div>
</body>
</html>