-
Notifications
You must be signed in to change notification settings - Fork 0
/
test001-installation.html
204 lines (167 loc) · 4.22 KB
/
test001-installation.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="test.css">
<title>Test 001</title>
</head>
<body>
<header>
<div class="content">
<h1><a class="homelink" href="/">Postsai</a></h1>
<h2>The Commit Database</h2>
<a class="button" href="https://github.com/postsai/postsai">GitHub</a>
<a class="button" href="https://arianne-project.org/postsai/query.html?date=month">Demo</a>
<a class="button download" href="https://github.com/postsai/postsai/releases/download/v0.9.7/postsai-0.9.7.zip">Download</a>
</div>
</header>
<div class="content">
<section>
<table class="table table-bordered">
<tr class="th">
<th colspan="2"><h3>Test 001: Installation</h3></th>
</tr>
<tr>
<th>Objective</th>
<td>Ensure the installation of Postsai works</td>
</tr>
<tr>
<th>Test Status</th>
<td>Stable</td>
</tr>
<tr>
<th>Prerequisite</th>
<td>A minimal ubuntu installation based on <a href="https://help.ubuntu.com/community/Installation/MinimalCD">https://help.ubuntu.com/community/Installation/MinimalCD</a></td>
</tr>
</table>
</section>
<section>
<table class="table table-striped table-bordered table-hover">
<tr class="th">
<th>#</th>
<th>Action</th>
<th>User input</th>
<th>Expected result</th>
</tr>
<tbody>
<tr>
<td>1</td>
<td>Become root</td>
<td><code>sudo -s</code> and enter your password</td>
<td>Root prompt</td>
</tr>
<tr>
<td>2</td>
<td>Install required packages</td>
<td><code>apt-get install -y unzip apache2 mysql-client mysql-server python-mysqldb</code></td>
<td>After some time, you are asked for a MySQL root password</td>
</tr>
<tr>
<td>3</td>
<td>Define mysql root password</td>
<td>Enter: [MysqlRootPassword]</td>
<td>You are asked to repeat the password</td>
</tr>
<tr>
<td>4</td>
<td>Repeat mysql root password</td>
<td>Enter again: [MysqlRootPassword]</td>
<td>apt-get completes successfully</td>
</tr>
<tr>
<td>5</td>
<td>Create database and user</td>
<td><code>echo "CREATE DATABASE postsai; GRANT ALL ON postsai.* TO postsaiuser IDENTIFIED BY '[PostsaiPassword]';" | mysql -p</code></td>
<td>Password prompt</td>
</tr>
<tr>
<td>6</td>
<td>Login to mysql</td>
<td>Enter: [MysqlRootPassword]</td>
<td>Query OK</td>
</tr>
<tr>
<td>7</td>
<td>Edit apache configuration</td>
<td><code>pico /etc/apache2/sites-enabled/000-default.conf</code></td>
<td>Configuration file is opened in editor</td>
</tr>
<tr>
<td>8</td>
<td>Configure cgi inside VirtualHost</td>
<td>Enter the following code and exit the editor via ^O ^X:<pre><Directory /var/www/html>
Options +ExecCGI
AddHandler cgi-script .py
</Directory></pre></td>
<td>Command prompt</td>
</tr>
<tr>
<td>9</td>
<td>Enable cgi in Apache</td>
<td><code>a2enmod cgi</code></td>
<td>Module cgi or cgid was enabled</td>
</tr>
<tr>
<td>10</td>
<td>Restart Apache</td>
<td><code>service apache2 restart</code></td>
<td>No error message</td>
</tr>
<tr>
<td>11</td>
<td>Change to Webroot</td>
<td><code>cd /var/www/html</code></td>
<td>Directory changed</td>
</tr>
<tr>
<td>12</td>
<td>Unzip Postsai</td>
<td><code>unzip [path-to-postsai.zip]</code></td>
<td>A list of unziped files is displayed</td>
</tr>
<tr>
<td>13</td>
<td>Change to postsai folder</td>
<td><code>cd postsai</code></td>
<td>Directory changed</td>
</tr>
<tr>
<td>14</td>
<td>Create configuration file</td>
<td><code>pico config.py</code></td>
<td>Empty configuration file is opened in editor</td>
</tr>
<tr>
<td>15</td>
<td>Configure database connection</td>
<td>Enter the following code and exit the editor via ^O ^X:
<pre>db = {
"host" : "localhost",
"user" : "postsaiuser",
"password" : "[PostsaiPassword]",
"database" : "postsai"
}
</pre></td>
<td>Command prompt</td>
</tr>
<tr>
<td>16</td>
<td>Complete installation</td>
<td><code>./install.py</code></td>
<td>Several lines starting with "OK" and no lines starting with "ERROR".</td>
</tr>
</tbody>
</table>
</section>
<section>
<p>Video currently only works in Firefox and Chrome.</p>
<video id="video" src="test001-installation.webm" controls>
</video>
</section>
<footer>
(C) Copyright 2016-2017 Postsai. Postsai is released as Free and Open Source Software under MIT license.
</footer>
</div>
</body>
</html>