This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
208 lines (164 loc) · 9.32 KB
/
INSTALL
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
INSTALLATION PROCEDURE & PLATFORM INFORMATION
Siege was originally built and tested on GNU/Linux. It has been ported
to other platforms. See the MACHINES document for more details.
This program was built using the GNU autoconf mechanism. If you are
familiar with GNU applications, then siege should present few problems
especially on the above mentioned platforms. For best results, use gcc.
IMPORTANT: If you are upgrading from an earlier version, you MUST delete
the older version before installing this one. The simplest way to remove
the older version to run "make uninstall" in the old source directory.
If you no longer have the old source, you can configure the new version
to be installed in the same place as the old version. Then BEFORE you
run "make install", run "make uninstall" first.
"Hey! I'm impatient, I only read these things when things go wrong!"
If that is the case, then follow the steps in item #1 below...
1. In a nutshell, to install the application in the default directory,
( /usr/local ), run the following commands:
$ ./configure (IMPORTANT: see step 2 for enabling https support)
$ make
$ make uninstall (if you have an older version installed in PREFIX)
$ make install
This will install the application ( siege ) in the default directory
/usr/local/bin. If that directory is in your PATH, then to run siege
and view the online help type:
$ siege --help
To learn more about siege, make sure /usr/local/man is in your MANPATH
and type:
$ man siege
For more detailed information about running siege and stress testing
HTTP servers, type:
$ man layingsiege
For more details, read on. Especially if you want to install siege
in a directory other that /usr/local/bin
2. Configuration
The configure script attempts to guess the values which are set
on your platform. If all goes well, you should only have to run it
with some preferred arguments. The more notable ones are listed
below:
--help prints the configure script's help section
--prefix=/some/dir installs the files in /some/dir
--bindir=/some/bin installs the executable in /some/bin
--mandir=/some/man installs the man page in /some/man
--with-ssl=/some/dir where dir is where you installed ssl, this
flag is used to enable https protocol.
Since siege is a pretty esoteric program, I prefer to install it in my
home directory. Really, how many people are laying siege to http servers
and do you really want them running it by accident? For this reason, I
run configure with my home directory as the prefix.
$ ./configure --prefix=/export/home/jdfulmer
If you don't already, make sure $HOME/bin and $HOME/man are set appropriately
in your .profile. In my case, I set them like this:
# jdfulmer's profile
PATH=/export/home/jdfulmer/bin:$PATH
MANPATH=/export/home/jdfulmer/man:$MANPATH
export PATH MANPATH
~
~
To reload your profile without logging out, do this:
$ . .profile
If it runs successfully, the configure script creates the Makefiles which
lets you build the program. After you configure your environment, the next
step is to build siege. If that next step fails, you may have to return to
this step. Reasons for reconfiguring are mentioned below. If configure
failed to create Makefiles, then you have problems which may be beyond the
scope of this document, such as no compiler ( you'll have to get one ), no
libraries ( again, an acquisition on your part ).
HTTPS support
To enable https, you must have ssl installed on your system. Get the latest
version from http://www.openssl.org. AFTER ssl is installed, then you have
to configure siege to use it:
$ ./configure --prefix=/some/dir --with-ssl=/ssl/install/dir
The openssl default installation is /usr/local/ssl. So if you configured
openssl with the default directory, then you would configure siege like this:
$ ./configure --prefix=/some/dir --with-ssl=/usr/local/ssl
$ make
$ make uninstall ( if you have a previous version already installed )
$ make install
3. Compilation
To compile the program, execute the second step of the nutshell version
mentioned in item #1: type "make" and hope for the best. If your environment
was configured without errors, then configure should have generated the Makefiles
that will enable this step to work.
The make command will invoke your compiler and build siege. If you are using
gcc on any of the platforms mentioned above, then you should not have problems.
In general, any ANSI C compiler should work. Siege does not currently support
K&R compilers and older versions of the operating systems mentioned in MACHINES.
Some systems may require options that were not set by the configure script. You
can set them using the configure step mentioned above:
$ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
You can also set them by editing the Makefiles that were created as a result of
running configure, but this is not preferred.
4. Installation
If the program compiled successfully, follow the third nutshell step
and type "make install" This will install the package in the directories
that you've selected in the configuration step. If they are not already,
make sure PREFIX/bin and PREFIX/man are in your PATH and MANPATH
respectively. This process is described in detail in item #2.
Files installed:
siege --> SIEGE_HOME/bin/siege
bombardment --> SIEGE_HOME/bin/bombardment
siege2csv --> SIEGE_HOME/bin/siege2csv
.siegerc --> $HOME/.siegerc
siege.1 --> SIEGE_HOME/man/man1/siege.1
bombardment.1 --> SIEGE_HOME/man/man1/bombardment.1
siege2csv.1 --> SIEGE_HOME/man/man1/siege2csv.1
layingsiege.1 --> SIEGE_HOME/man/man1/layingsiege.1
urls_text.1 --> SIEGE_HOME/man/man1/urls_txt.1
urls.txt --> SIEGE_HOME/etc/urls.txt
5. Uninstall
To remove the package, type "make uninstall" To make the source
directory completely clean, type "make distclean". There are differences
of opinion regarding this option. Some people claim that it should not
be available as it depends the original Makefiles from the source
directory. Since I tend to hoard all source code, I like this feature.
The point is, if you've installed one version of siege in /usr/local and
another version in $HOME, then make uninstall is obviously not going to
work in both locations. The safest thing to do is manually remove the
files which were installed by make install. The files and their locations
are described in item #4.
6. Read the documentation
The online help is pretty straight forward ( siege --help ):
Usage: siege [options]
Options:
-V, --version VERSION, prints version number to screen.
-h, --help HELP, prints this section.
-v, --verbose VERBOSE, prints notification to screen.
-c, --concurrent=NUM CONCURRENT users, default is 10
-u, --url="URL" URL, a single user defined URL for stress testing.
-i, --internet INTERNET user simulation, hits the URLs randomly.
-b, --benchmark BENCHMARK, signifies no delay for time testing.
-t, --times=NUM TIMES, number of times to run the test, default is 25
-t, --time=NUMm TIME based testing where "m" is the modifier S, M, or H
no space between NUM and "m", ex: --time=1H, 1 hour test.
-f, --file=FILE FILE, change the configuration file to file.
-l, --log LOG, logs the transaction to PREFIX/var/siege.log
-m, --mark="text" MARK, mark the log file with a string separator.
-d, --delay=NUM Time DELAY, random delay between 1 and num designed
to simulate human activity. Default value is 3
For more detailed information, consult the man pages:
$ man siege
$ man layingsiege
$ man siege.config
All the siege man pages are also available online:
http://www.joedog.org/siege/docs/man/index.html
OR, read the html manual, doc/manual.html The manual is also available online:
http://www.joedog.org/siege/docs/manual.html
7. Edit the .siegerc file in your home directory. This file contains runtime
directives for siege. Each directive is well documented with comments. Some
directives exist ONLY in this file; they don't have a command line option.
If you are upgrading from an earlier version, your original version is kept
and a new resource file is installed as .siegerc.new. In order to take
advantage of any new directives, you might want to use this new file instead.
8. Tell me about it
If you like/dislike siege please let me know. See name and email below:
--
Please consult the file, COPYING for complete license information.
Copyright (C)2000-2007 Jeffrey Fulmer <[email protected]>, et al.
Permission is granted to anyone to make or distribute verbatim
copies of this document as received, in any medium, provided that
the copyright notice and this permission notice are preserved, thus
giving the recipient permission to redistribute in turn.
Permission is granted to distribute modified versions of this
document, or of portions of it, under the above conditions,
provided also that they carry prominent notices stating who last
changed them.