Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 132 lines (81 sloc) 3.78 kB
961926f @klacke ""
klacke authored
1
e044aaf Testing CVS commit.
Tobbe Tornquist authored
2 This is yaws, a webserver for dynamic content written in Erlang.
961926f @klacke ""
klacke authored
3
4
5 To build and install
6
f674082 @klacke ""
klacke authored
7
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
8 0. Get and install an Erlang system (http://www.erlang.org)
ab5675f @klacke Fixed Issue #27
klacke authored
9
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
10 1. If you've cloned the source from github and you want to build using
11 configure and make, note there is no ./configure script in the
12 source, so create one:
ab5675f @klacke Fixed Issue #27
klacke authored
13
14 # autoconf
15
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
16 1.b Install build-deps. On Ubuntu/debian this is pretty much equal to
17 # apt-get build-dep yaws
f674082 @klacke ""
klacke authored
18
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
19 2. You can build using rebar:
5debb9f @klacke README docs
klacke authored
20
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
21 # rebar compile
5debb9f @klacke README docs
klacke authored
22
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
23 or via configure and make:
5debb9f @klacke README docs
klacke authored
24
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
25 # ./configure --prefix=/usr/local
5debb9f @klacke README docs
klacke authored
26
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
27 If using rebar, you'll get a local installation with yaws in
28 $HOME/bin and the yaws configuration file in $HOME/yaws.conf. If
29 using configuration and make, the build will be configured by
30 default for installation under /usr/local including var files in
31 /usr/local/var/run/yaws and etc files in /usr/local/etc/yaws.
f674082 @klacke ""
klacke authored
32
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
33 NOTE: With configure, you can also change the target directory for
34 etc and var directories by using:
c9778e0 @klacke added support for 2 additional configure
klacke authored
35
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
36 --localstatedir=DIR for files that should go in /var
37 --sysconfdir=DIR for files that should go in /etc
38 --disable-pam If we for some reason do not want pam support
c9778e0 @klacke added support for 2 additional configure
klacke authored
39 --with-extrainclude=DIR Will add DIR to the include path
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
40 May be useful if e.g. pam is installed
41 somewhere where its usually not found
c9778e0 @klacke added support for 2 additional configure
klacke authored
42 --with-defaultcharset=String Will set the default charset used
43 in generated page headers. Usually never needed.
44
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
45 This way you can precisely control where you install Yaws (This is
46 useful for computers where you do not have right access to the
47 standard systemdirs).
48
49 For example:
50
51 ./configure --prefix=/home/install/yaws --localstatedir=/home/install/yaws/var --sysconfdir=/home/install/etc
52
53 2b. Note to packagers (rpm, deb ...) All install targets support the
54 DESTDIR variable. Thus, if we do
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored
55
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
56 ./configure --prefix=/usr; make
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored
57
c9778e0 @klacke added support for 2 additional configure
klacke authored
58 we can subsequently do:
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
59
c9778e0 @klacke added support for 2 additional configure
klacke authored
60 DESTDIR=/foo/bar make install
61
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
62 All yaws files will be installed under DESTDIR, but all
63 code will assume yaws should be installed under /usr.
c9778e0 @klacke added support for 2 additional configure
klacke authored
64
961926f @klacke ""
klacke authored
65 3. make
f674082 @klacke ""
klacke authored
66
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
67 This will build the system.
68
69 make docs
70
71 (Optional) You can issue this command if you want to build Yaws
72 documentation.
73
74 make local_install
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored
75
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
76 This will create an executable script in the $HOME/bin directory
77 and a config file in $HOME/yaws.conf. This is for developers
78 only. This is the only type of installation "rebar compile"
79 supports.
961926f @klacke ""
klacke authored
80
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
81 4. To test the build, start it as
82
83 ./bin/yaws -i
84
85 If you used rebar to compile yaws, you can alternatively start yaws
86 with
87
88 $HOME/bin/yaws -i
89
90 Either approach will start a webserver at http://0.0.0.0:8000 .
91 Terminate through ^C, or ^G followed by q, or
92
93 > init:stop()
94
95 NOTE: If you've used rebar to build the system, none of the
96 following directions apply. With rebar only local installations are
97 supported.
961926f @klacke ""
klacke authored
98
aef9169 @klacke ""
klacke authored
99 5. as root make install
f674082 @klacke ""
klacke authored
100
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
101 6. as root start as
102
103 /usr/local/bin/yaws -i
38fb85e @klacke ""
klacke authored
104
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
105 This starts an interactive system.
f674082 @klacke ""
klacke authored
106
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
107 7. With the default yaws.conf file, this will create a webserver at
108 http://${host} and one at https://${host}
f674082 @klacke ""
klacke authored
109
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored
110 8. as root edit /usr/local/etc/yaws/yaws.conf
111
112 9. Create content in /usr/local/var/yaws/www
961926f @klacke ""
klacke authored
113
c9778e0 @klacke added support for 2 additional configure
klacke authored
114 10a. Start as /usr/local/bin/yaws --daemon --heart
115 This will start a daemon (--daemon) which will be autorestarted when/if
116 it crashes or hangs (--heart)
e5dbee8 @klacke readme docs
klacke authored
117 Also, for most unices, we create proper start scripts in
118 /etc/init.d (sysconfdir)
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf tem…
klacke authored
119
120 10b. Or start interactive system as /usr/local/bin/yaws -i
f674082 @klacke ""
klacke authored
121
e5dbee8 @klacke readme docs
klacke authored
122 11. Example: Here is how I compile/start the yaws system that runs
123 at http://yaws.hyber.org (Ubuntu server system)
124
ab5675f @klacke Fixed Issue #27
klacke authored
125 # autoconf
e5dbee8 @klacke readme docs
klacke authored
126 # ./configure --sysconfdir=/etc
127 # make && make install
128 # /etc/init.d/yaws start
129
130
131
Something went wrong with that request. Please try again.