Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 237 lines (209 sloc) 5.667 kb
21abc5b @klacke Initial revision
authored
1
2 <erl>
3
dbab7a3 @klacke ssi include with var expansion + docs
authored
4 box(Str) ->
5 {'div',[{class,"box"}],
f6dbbc9 @klacke added possibility to name the module in a .yaws file
authored
6 {pre,[], yaws_api:htmlize(Str)}}.
961926f @klacke ""
authored
7
8
dbab7a3 @klacke ssi include with var expansion + docs
authored
9 out(A) ->
54139d8 @klacke prepare for 1.81
authored
10 [{ssi, "TAB.inc", "%%",[{"configuration", "choosen"}]}].
961926f @klacke ""
authored
11
67a6c13 @klacke ""
authored
12 </erl>
cd63bee @klacke ""
authored
13
14
54139d8 @klacke prepare for 1.81
authored
15 <div id="entry">
16 <h1>Build and install Yaws</h1>
17 <p>
18 Yaws used to be hosted at Sourceforge, but as of release 1.81 yaws is
19 hosted at github.
20 </p>
21 <p>
22 The github page is <a href="http://github.com/klacke/yaws">
23 http://github.com/klacke/yaws</a>
24 </p>
25 <p>
26 Tested releases are downloadable from the Yaws download directory
27 at <a href="http://yaws.hyber.org/download" >http://yaws.hyber.org/download
28 </a>
29 </p>
30
31 <p>
32 To check out the latest release and build a number of prerequisites
33 are required. (All code example below on Ubuntu)
34 </p>
35 <ul>
36 <li>
37 <p>
38 Installed erlang + development
39 </p>
40 <div class="box">
41 <pre>
42 # apt-get build-dep erlang yaws
43 # apt-get install erlang-nox erlang-src erlang-manpages erlang-mode
44 # apt-get install erlang-mode erlang-dev
45 </pre>
46 </div>
47 </li>
48 <li>
49 <p>
50 Installed git
51 </p>
52 <div class="box">
53 <pre>
54 # apt-get install git-core
55 </pre>
56 </div>
57 </li>
58
59 <li>
60 <p>
61 To build the docs, all kinds of verious tools are required.
62 latex, man2pdf ... etc.
63
64 </p>
65 </li>
66
67 <li>
68 <p>
69 To build win32 releases - the following is required.
70 </p>
71 <ul>
72 <li>
73 <p>
74 Mingw.
75 <div class="box">
76 <pre>
77 # apt-get install mingw32 mingw32-binutils
78 </pre>
79 </div>
80 </p>
81 </li>
82 <li>
83 Installbuilder. To build win32 installers we're using
84 an install builder that is free to use free of charge
85 for opensource projects.
86 Get the linux installer at
87 <a href="http://www.bitrock.com/download_installbuilder_download.html">
88 bitrock
89 </a>
90 </li>
91 <p>
92 Further instructions are found in the win32 directory
93 in the source tree.
94 </p>
95 </ul>
96 </li>
97 </ul>
98
99 <p>
100 To check out the sources do
101 </p>
102 <div class="box">
103 <pre>
104 # git clone git://github.com/klacke/yaws.git
105 </pre>
106 </div>
107 <p>To build and to what is knows as a local install, e.g.
108 a developer install do:
109 </p>
110 <div class="box">
111 <pre>
112 # cd yaws
5e3b650 Added 'autoconf' as needed when building from a fresh clone.
Torbjorn Tornkvist authored
113 # autoconf; ./configure; make; make local_install
54139d8 @klacke prepare for 1.81
authored
114 </pre>
115 </div>
116 <p>
117 Alternatively, to make a proper install
118 </p>
119 <div class="box">
120 <pre>
121 # cd yaws
122 # ./configure --help
123 # ./configure --localstatedir=/var --sysconfdir=/etc
124 # make
125 # make install
126 </pre>
127 </div>
128
129 <p>
130 The above commands will checkout the HEAD source,
131 build it and install it at
132 127.0.0.1:80 with the docroot set to the local documentation.
133 </p>
134 <p>
135 <em>make</em> (without install) will build the yaws system and
136 make local_install
137 does a local install at http://127.0.0.1:8000
138 </p>
139 <p>
140 This is the typical mode of operation
141 while either just trying out yaws, or hacking yaws. This will install
142 a template configuration file yaws.conf in $HOME.
143 If $HOME/yaws.conf exists, the old file will not be overwritten.
144 </p>
145 <p>
146 To run a locally installed system, we run the yaws script found in the
147 bin directory in the source code tree or $HOME/bin/yaws.
148 </p>
149
150 <p>
151 <tt>make install</tt>
152 will also build the yaws system and also
153 install it in /usr/local. A configuration file /etc/yaws.conf will
154 also be installed unless the file already exists. The default config
155 file will set up the system to listen on http://127.0.0.1:80
156 </p>
157
158
159 <h2>Running yaws</h2>
160 <p>
161 The yaws executable is a shell script which invokes the
162 erlang system and instructs it to start yaws.
163 The command line flags for yaws are documented in
164 <a href="yman.yaws?page=yaws">
165 man page for yaws(1)
166 </a>
167
168 <p>
169 When developing yaws code, the interactive mode is ideal. Typically "
170 yaws is then started as:
171
172 </p>
173 <div class="box">
174 <pre>
175 # yaws -i
176 </pre>
177 </div>
178 <p>
179 Run yaws as a daemon as
180 </p>
181 <div class="box">
182 <pre>
183 # yaws --daemon
184 </pre>
185 </div>
186 <p>
187 All command line flags to yaws are described in the
188 man page for yaws.
189 </p>
190
191 <h2>Configuring Yaws</h2>
192 <p>
193 Web server configuration can be supplied to yaws "
194 in either of two ways depending
195 on whether we run yaws as a standalone daemon or if we run yaws as an
196 embedded application inside another Erlang program.
197 </p>
198 <p>
199 The yaws configuration is described in
200 <a href="yman.yaws?page=yaws.conf">
201 man page for yaws.conf (5)
202 </a>
203 </p>
204
205 <h3>Embedded mode</h3>
206 <p>
207 It is possible to run yaws in embedded mode where yaws is part of a
208 larger application. When running yaws in embedded mode, it is often not
209 possible to let yaws read its configuration data from /etc/yaws.conf.
210 </p>
211
212 <p>
213 The function
214 <tt>yaws_api:setconf(Gconf, Groups)</tt>
215 can be used by an other erlang process to explicitly set a yaws
216 configuration at runtime.
217 To execute Yaws in embedded mode, it must be started with
218 the environment
219 <tt>{embedded, true}</tt>
220 </p>
221 <p>
222 The embedded mode is fully described at
223 <a href="embed.yaws">embed.yaws</a>
224 </p>
225 </p>
226 </div>
227
228
229 <erl>
230
231 out(_) ->
232 {ssi, "END2",[],[]}.
233
234 </erl>
235
cd63bee @klacke ""
authored
236
Something went wrong with that request. Please try again.