Skip to content
Newer
Older
100644 132 lines (81 sloc) 3.69 KB
961926f @klacke ""
authored Mar 4, 2002
1
e044aaf Testing CVS commit.
Tobbe Tornquist authored Jun 17, 2002
2 This is yaws, a webserver for dynamic content written in Erlang.
961926f @klacke ""
authored Mar 4, 2002
3
4
5 To build and install
6
f674082 @klacke ""
authored Nov 28, 2002
7
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
8 0. Get and install an Erlang system (http://www.erlang.org)
ab5675f @klacke Fixed Issue #27
authored Dec 1, 2009
9
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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
authored Dec 1, 2009
13
14 # autoconf
15
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
16 1.b Install build-deps. On Ubuntu/debian this is pretty much equal to
17 # apt-get build-dep yaws
f674082 @klacke ""
authored Nov 28, 2002
18
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
19 2. You can build using rebar:
5debb9f @klacke README docs
authored Dec 2, 2009
20
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
21 # rebar compile
5debb9f @klacke README docs
authored Dec 2, 2009
22
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
23 or via configure and make:
5debb9f @klacke README docs
authored Dec 2, 2009
24
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
25 # ./configure --prefix=/usr/local
5debb9f @klacke README docs
authored Dec 2, 2009
26
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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 ""
authored Nov 28, 2002
32
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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
authored Apr 27, 2006
35
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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
authored Apr 27, 2006
39 --with-extrainclude=DIR Will add DIR to the include path
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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
authored Apr 27, 2006
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 May 7, 2011
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 Apr 10, 2003
55
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
56 ./configure --prefix=/usr; make
deddbfc Build chain modifications: Install target directories is now totally …
Mikael Karlsson authored Apr 10, 2003
57
c9778e0 @klacke added support for 2 additional configure
authored Apr 27, 2006
58 we can subsequently do:
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
59
c9778e0 @klacke added support for 2 additional configure
authored Apr 27, 2006
60 DESTDIR=/foo/bar make install
61
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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
authored Apr 27, 2006
64
961926f @klacke ""
authored Mar 4, 2002
65 3. make
f674082 @klacke ""
authored Nov 28, 2002
66
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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 Apr 10, 2003
75
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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 ""
authored Mar 4, 2002
80
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
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 ""
authored Mar 4, 2002
98
aef9169 @klacke ""
authored Jun 18, 2002
99 5. as root make install
f674082 @klacke ""
authored Nov 28, 2002
100
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
101 6. as root start as
102
103 /usr/local/bin/yaws -i
38fb85e @klacke ""
authored Apr 30, 2002
104
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
105 This starts an interactive system.
f674082 @klacke ""
authored Nov 28, 2002
106
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
107 7. With the default yaws.conf file, this will create a webserver at
108 http://${host} and one at https://${host}
f674082 @klacke ""
authored Nov 28, 2002
109
bedbc05 @tuncer add rebar support (Tuncer Ayaz and Steve Vinoski)
tuncer authored May 7, 2011
110 8. as root edit /usr/local/etc/yaws/yaws.conf
111
112 9. Create content in /usr/local/var/yaws/www
961926f @klacke ""
authored Mar 4, 2002
113
c9778e0 @klacke added support for 2 additional configure
authored Apr 27, 2006
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
authored Aug 3, 2009
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…
authored Mar 18, 2004
119
120 10b. Or start interactive system as /usr/local/bin/yaws -i
f674082 @klacke ""
authored Nov 28, 2002
121
e5dbee8 @klacke readme docs
authored Aug 3, 2009
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
authored Dec 1, 2009
125 # autoconf
e5dbee8 @klacke readme docs
authored Aug 3, 2009
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.