-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstallation.html
168 lines (157 loc) · 11.4 KB
/
installation.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta content="True" name="HandheldFriendly">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="viewport" content="width=device-width">
<meta name="description" content="nginx-clojure.github.io : Nginx module for embedding Clojure / Java / Groovy programs, typically those Ring based handlers">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<!-- bootstrap cdn -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="javascripts/fix.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/my.css">
<title>Installation@Nginx-Clojure</title>
</head>
<body>
<div id="header">
<!-- HEADER -->
<nav id="header_wrap" class="" role="navigation">
<header id="header_logo_title" class="inner container">
<ul class="external-link-buttons">
<li>
<a id="forkme_banner" href="https://github.com/nginx-clojure/nginx-clojure" target="_blank">View on GitHub</a>
</li>
<!-- <li>
<a id="google_group_banner" href="https://groups.google.com/forum/#!forum/nginx-clojure" target="_blank">Google Group</a>
</li> -->
</ul>
<div id="project_logo">
<h1 id="project_title">nginx-clojure</h1>
<ul class="social-buttons">
<li>
<iframe class="github-btn" src="github-btn.html?user=nginx-clojure&repo=nginx-clojure&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe>
</li>
<li>
<iframe class="github-btn" src="github-btn.html?user=nginx-clojure&repo=nginx-clojure&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</li>
</ul></div>
<h6 id="project_tagline">Nginx module for embedding Clojure / Java / Groovy programs, typically those Ring based handlers</h6>
</header>
<div class="btn-group" style="border-top-width: 1px;border-top-color: #fff;">
<a href="index.html" class="btn btn-sample btn-md"><span class="glyphicon glyphicon-home"></span> Home</a>
<a href="quickstart.html" class="btn btn-sample btn-md"><span class="glyphicon glyphicon-flash"></span> Quick Start</a>
<a href="downloads.html" class="btn btn-sample btn-md"><span class="glyphicon glyphicon-download-alt"></span> Downloads</a>
<a href="installation.html" class="btn btn-sample btn-md"><span class="glyphicon glyphicon-hdd"></span> Installation</a>
<div class="btn-group">
<button type="button" class="btn btn-sample btn-md dropdown-toggle" data-toggle="dropdown" id="docDropDownBtn"><span class="glyphicon glyphicon-cog"></span> Configuration <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="configuration.html#user-content-21-jvm-path--class-path--other-jvm-options"><span class="glyphicon glyphicon-cog"></span> JVM Path,Class Path & Other JVM Options</a></li>
<li><a href="configuration.html#user-content-22-initialization-handler-for-nginx-worker"><span class="glyphicon glyphicon-cog"></span> Initialization Handler for nginx worker</a></li>
<li><a href="configuration.html#user-content-23-content-ring-handler-for-location"><span class="glyphicon glyphicon-cog"></span> Content Ring Handler for Location</a></li>
<li><a href="configuration.html#user-content-24-chose--coroutine-based-socket-or-asynchronous-socketchannel-or-thread-pool-for-slow-io-operations"><span class="glyphicon glyphicon-cog"></span> Coroutine/Asynchronous Client Channel/Thread Pool </a></li>
<li><a href="configuration.html#user-content-25-nginx-rewrite-handler"><span class="glyphicon glyphicon-cog"></span> Nginx Rewrite Handler</a></li>
<li><a href="configuration.html#user-content-26-nginx-access-handler"><span class="glyphicon glyphicon-cog"></span> Nginx Access Handler</a></li>
<li><a href="configuration.html#user-content-27-nginx-header-filter"><span class="glyphicon glyphicon-cog"></span> Nginx Header Filter</a></li>
<li><a href="configuration.html#user-content-28-nginx-body-filter"><span class="glyphicon glyphicon-cog"></span> Nginx Body Filter</a></li>
<li><a href="configuration.html#user-content-29-nginx-log-handler"><span class="glyphicon glyphicon-cog"></span> Nginx Log Handler</a></li>
</ul>
</div>
<div class="btn-group">
<button type="button" class="btn btn-sample btn-md dropdown-toggle" data-toggle="dropdown" id="docDropDownBtn"><span class="glyphicon glyphicon-book"></span> Documents <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<!-- <li><a href="quickstart.html"><span class="glyphicon glyphicon-flash"></span> Quick Start</a></li> -->
<li><a href="directives.html"><span class="glyphicon glyphicon-th-list text-warning"></span> Directives Reference</a></li>
<li><a href="embed.html"><span class="glyphicon glyphicon-gift"></span> Embedding Nginx-Clojure into A standard App</a></li>
<li><a href="more.html#user-content-34-server-channel-for-long-polling--server-sent-events-sse"><span class="glyphicon glyphicon-envelope"></span> Server Channel for Long Polling & Server Sent Events</a></li>
<li><a href="subpub.html"><span class="glyphicon glyphicon-envelope text-warning"></span> Pub/Sub Among Nginx Worker Processes</a></li>
<li><a href="sharedmap.html"><span class="glyphicon glyphicon-envelope text-warning"></span> Shared Map & Session Store</a></li>
<li><a href="more.html#user-content-36-asynchronous-client-channel"><span class="glyphicon glyphicon-road"></span> Asynchronous Client Channel</a></li>
<li><a href="more.html#user-content-37--about-logging"><span class="glyphicon glyphicon-th-list"></span> About Logging</a></li>
<li><a href="more.html#user-content-38--sever-side-websocket"><span class="glyphicon glyphicon-th-list"></span> Sever Side WebSocket</a></li>
<li><a href="more.html#user-content-39--java-standard-restful-web-services-with-jersey"><span class="glyphicon glyphicon-th-list"></span> Java standard RESTful web services with Jersey</a></li>
<li><a href="more.html#user-content-310-embeding-tomcat"><span class="glyphicon glyphicon-th-list"></span> Embeding Tomcat</a></li>
<li><a href="more.html#user-content-311-more-about-nginx-worker-process"><span class="glyphicon glyphicon-th-list"></span> More about Nginx Worker Process</a></li>
<li><a href="more.html"><span class="glyphicon glyphicon-th-list"></span> More about Nginx-Clojure</a></li>
<li><a href="api/"><span class="glyphicon glyphicon-book text-warning"></span> API Reference (Clojure)</a></li>
</ul>
</div>
<a href="userfullLinks.html" class="btn btn-sample btn-md"><span class="glyphicon glyphicon-share-alt"></span> Useful Links</a>
</div>
</nav>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<h1><a id="user-content-1-installation" class="anchor" aria-hidden="true" href="#1-installation"><span aria-hidden="true" class="octicon octicon-link"></span></a>1. Installation</h1>
<p>The lastest release is 0.5.1. Please check the <a href="downloads.html">Update History</a> for more details.</p>
<h2><a id="user-content-11-installation-by-binary" class="anchor" aria-hidden="true" href="#11-installation-by-binary"><span aria-hidden="true" class="octicon octicon-link"></span></a>1.1 Installation by Binary</h2>
<ol>
<li>First you can download Release 0.5.1 from <a href="https://sourceforge.net/projects/nginx-clojure/files/" rel="nofollow">here</a>.
The zip file includes Nginx-Clojure binaries about Linux x64, Linux i586, Win32, Win64 and Mac OS X.</li>
<li>Unzip the zip file downloaded then rename the file <code>nginx-${os-arc}</code> to <code>nginx</code>, eg. for linux is <code>nginx-linux-x64</code>
</li>
</ol>
<h2><a id="user-content-12-installation-by-source" class="anchor" aria-hidden="true" href="#12-installation-by-source"><span aria-hidden="true" class="octicon octicon-link"></span></a>1.2 Installation by Source</h2>
<p>Nginx-Clojure may be compiled successfully on Linux x64, Linux x86 32bit, Win32, Win64 and Mac OS X x64.</p>
<ol>
<li>
<p>First download from <a href="http://nginx.org/en/download.html" rel="nofollow">nginx site</a> or check out nginx source by hg from <a href="http://hg.nginx.org/nginx" rel="nofollow">http://hg.nginx.org/nginx</a>.
For Win32 users MUST check out nginx source by hg because the zipped source doesn't contain Win32 related code.</p>
</li>
<li>
<p>Check out Nginx-Clojure source from github OR download the zipped source code from <a href="https://github.com/xfeep/nginx-clojure/releases">https://github.com/xfeep/nginx-clojure/releases</a></p>
</li>
<li>
<p>If you want to use Http SSL module, you should install openssl and openssl dev first.</p>
</li>
<li>
<p>Make sure jdk (version should be 1.8+ ) is installed, we can use <code>javac</code>, <code>java</code>, e.g.</p>
<div class="highlight highlight-source-shell"><pre><span class="pl-smi">$javac</span> -version
javac 1.8.0_112</pre></div>
</li>
<li>
<p>Add Nginx-Clojure module to Nginx configure command, here is a simplest example without more details about <a href="http://wiki.nginx.org/InstallOptions" rel="nofollow">InstallOptions</a></p>
<div class="highlight highlight-source-shell"><pre><span class="pl-c"><span class="pl-c">#</span>If nginx source is checked out from hg, please replace ./configure with auto/configure</span>
$./configure \
--add-module=nginx-clojure/src/c
$ make
$ make install</pre></div>
</li>
<li>
<p>Create the jar file about Nginx-Clojure</p>
<p>Please check the lein version <code>lein version</code>, it should be at least 2.0.0.</p>
<div class="highlight highlight-source-shell"><pre>$ <span class="pl-c1">cd</span> nginx-clojure
$ lein jar
<span class="pl-c"><span class="pl-c">#</span> If we build it with jdk 19 we can try below command to enable native coroutine support</span>
$ lein with-profile nativeCoroutine jar</pre></div>
<p>Then you'll find nginx-clojure-${version}.jar (eg. nginx-clojure-0.5.1.jar) in the target folder.
The jar file is self contained. If your project use clojure it naturally depends on the clojure core jar, e.g clojure-1.9.0.jar.
If your project use groovy it naturally depends on the groovy runtime jar, e.g. groovy-2.5.8.jar.</p>
</li>
</ol>
</section>
</div>
<div id="footer">
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p>
Powered by <a href="http://getbootstrap.com/">Twitter Bootstrap</a>
</p>
</footer>
</div>
</div>
<script type="text/javascript">
//$("a[href^='http']").attr("target","_blank");
//setTimeout("fixNavbarIssue();", 1000);
</script>
</body>
</html>