-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.html
216 lines (214 loc) · 7.92 KB
/
INSTALL.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
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
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html>
<head>
<title>wsfn - a static web server toolkit</title>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="https://library.caltech.edu"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="./">README</a></li>
<li><a href="user-manual.html">User Manual</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="about.html">About</a></li>
<li><a href="https://github.com/rsdoiel/wsfn">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="installation">Installation</h1>
<p><strong>webaccess</strong> and <strong>webserver</strong> are command
line programs demonstrating the features of wsfn Go package. They
provide a simple static file web server and access control tool (using
BasicAuth). They are targetted at localhost development and not intended
to be a production web server.</p>
<h2 id="quick-install-with-curl">Quick install with curl</h2>
<p>There is an experimental installer.sh script that can be run with the
following command to install lastest table release. This may work for
macOS, Linux and if you’re using Windows with the Unix subsystem.</p>
<pre><code>curl https://caltechlibrary.github.io/wsfn/installer.sh | sh</code></pre>
<p>Below are generalized instructions for installation of a release.</p>
<h2 id="compiled-version">Compiled version</h2>
<p>Compiled versions are available for macOS (Intel and M1 processors as
macos-amd64 or macos-arm64), Linux (amd64 process, linux-amd64), Windows
(amd64 and arm64 processor, windows-amd64 and windows-arm64) and
Rapsberry Pi (arm7 processor, raspbian-arm7)</p>
<p>VERSION_NUMBER is a <a href="http://semver.org/">symantic version
number</a> (e.g. <code>v0.0.10</code>)</p>
<p>For all the released version go to the project page on Github and
click latest release</p>
<blockquote>
<p><a href="https://github.com/caltechlibrary/wsfn/releases/latest"
class="uri">https://github.com/caltechlibrary/wsfn/releases/latest</a></p>
</blockquote>
<table>
<thead>
<tr class="header">
<th>Platform</th>
<th>Zip Filename</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Windows</td>
<td>wsfn-VERSION_NUMBER-Windows-x86_64.zip</td>
</tr>
<tr class="even">
<td>Windows</td>
<td>wsfn-VERSION_NUMBER-Windows-arm64.zip</td>
</tr>
<tr class="odd">
<td>macOS</td>
<td>wsfn-VERSION_NUMBER-macOS-x86_64.zip</td>
</tr>
<tr class="even">
<td>macOS</td>
<td>wsfn-VERSION_NUMBER-macOS-arm64.zip</td>
</tr>
<tr class="odd">
<td>Linux/Intel</td>
<td>wsfn-VERSION_NUMBER-Linux-x86_64.zip</td>
</tr>
<tr class="even">
<td>Linux/ARM64</td>
<td>wsfn-VERSION_NUMBER-Linux-aarch64.zip</td>
</tr>
<tr class="odd">
<td>Raspberry Pi ARM 7</td>
<td>wsfn-VERSION_NUMBER-RaspberryPiOS-arm7.zip</td>
</tr>
</tbody>
</table>
<h2 id="the-basic-recipe">The basic recipe</h2>
<ul>
<li>Find the Zip file listed matching the architecture you’re running
and download it - (e.g. if you’re on a Windows 10 laptop/Surface with a
Intel style CPU you’d choose the Zip file with “Windows-x86_64” in the
name).</li>
<li>Download the zip file and unzip the file.</li>
<li>Copy the contents of the folder named “bin” to a folder that is in
your path - (e.g. “$HOME/bin” is common).</li>
<li>Adjust your PATH if needed -
(e.g. <code>export PATH="\$HOME/bin:\$PATH"</code>)</li>
<li>Test</li>
</ul>
<h3 id="macos">macOS</h3>
<ol type="1">
<li>Download the zip file</li>
<li>Unzip the zip file</li>
<li>Copy the executables to $HOME/bin (or a folder in your path)</li>
<li>Make sure the new location in in our path</li>
<li>Test</li>
</ol>
<p>Here’s an example of the commands run in the Terminal App after
downloading the zip file.</p>
<h4 id="intel-hardware">Intel Hardware</h4>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-macOS-x86_64.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<h4 id="m1-arm64-hardware">M1 (ARM64) Hardware</h4>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-macOS-arm64.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<h3 id="windows">Windows</h3>
<ol type="1">
<li>Download the zip file</li>
<li>Unzip the zip file</li>
<li>Copy the executables to $HOME/bin (or a folder in your path)</li>
<li>Test</li>
</ol>
<p>Here’s an example of the commands run in from the Bash shell on
Windows 10 after downloading the zip file.</p>
<h4 id="intel-hardware-1">Intel Hardware</h4>
<p>Most machines running Windows in 2023 are running using Intel style
processors. The exceptions are some developer boxes targetting ARM CPU
and some surface tablets that run on ARM processors.</p>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-Windows-x86_64.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<h4 id="arm64-hardware">ARM64 Hardware</h4>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-Windows-arm64.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<p>Windows on ARM is relatively rare (in 2023). There are a few Windows
for ARM developer boxes out and some Microsoft Surface tablets use an
ARM processor.</p>
<p>To find out what type of processor you are running on Windows you can
type “systeminfo” into the command prompt or search in the taskbar for
“systeminfo” then click on the System Information menu item. You’re
looking for an entry for “processor”. It may look something like</p>
<p>~~~ Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6
Model 142 Stepping 12 GenuineIntel ~1803 Mhz ~~</p>
<p>If you see “Intel” somewhere in the description choose the Zip file
with “windos” and “amd64” in the name.</p>
<h3 id="linux">Linux</h3>
<ol type="1">
<li>Download the zip file</li>
<li>Unzip the zip file</li>
<li>Copy the executables to $HOME/bin (or a folder in your path)</li>
<li>Test</li>
</ol>
<p>Here’s an example of the commands run in from the Bash shell after
downloading the zip file.</p>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-Linux-x86_64.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<h3 id="raspberry-pi">Raspberry Pi</h3>
<p>Released version is for a Raspberry Pi 2 or later use (i.e. requires
ARM 7 support).</p>
<ol type="1">
<li>Download the zip file</li>
<li>Unzip the zip file</li>
<li>Copy the executables to $HOME/bin (or a folder in your path)</li>
<li>Test</li>
</ol>
<p>Here’s an example of the commands run in from the Bash shell after
downloading the zip file.</p>
<pre class="shell"><code> cd Downloads/
unzip wsfn-*-raspbian-arm7.zip
mkdir -p $HOME/bin
cp -v bin/* $HOME/bin/
export PATH=$HOME/bin:$PATH
webserver -version</code></pre>
<h2 id="compiling-from-source">Compiling from source</h2>
<p><em>wsfn</em> is “go gettable”. Use the “go get” command to download
the dependant packages as well as <em>wsfn</em>’s source code.</p>
<pre class="shell"><code> go get -u github.com/caltechlibrary/wsfn/...</code></pre>
<p>Or clone the repstory and then compile</p>
<pre class="shell"><code> cd
git clone https://github.com/caltechlibrary/wsfn \
src/github.com/caltechlibrary/wsfn
cd src/github.com/caltechlibrary/wsfn
make
make test
make install</code></pre>
</section>
<footer>
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
<span>© 2023 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
<span><a href="mailto:library@caltech.edu">Email Us</a></span>
<a class="cl-hide" href="sitemap.xml">Site Map</a>
</footer>
</body>
</html>