File: installation.html

package info (click to toggle)
zoph 0.6-2.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,716 kB
  • ctags: 2,283
  • sloc: php: 8,554; perl: 1,601; sh: 760; sql: 382; python: 338; makefile: 71
file content (127 lines) | stat: -rw-r--r-- 6,978 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
        <title>Zoph Documentation - Installation</title>
        <link TYPE="text/css" REL="stylesheet" HREF="style.css">
    </head>
    <body>
    <p>
    All text is available under the terms of the <a href="http://en.wikibooks.org/wiki/GNU_Free_Documentation_License">GNU Free Documentation License</a>. For the latest version of this document, see <a href="http://en.wikibooks.org/wiki/Zoph">Wikibooks</a>.
    </p>
		<h1 class="firstHeading">Zoph/Installation</h1>
		<div id="bodyContent">
			<table id="toc" class="toc" summary="Contents">
<tr>
<td>
<div id="toctitle">
<h2>Contents</h2>
</div>
<ul>
<li class="toclevel-1"><a href="#Requirements"><span class="tocnumber">1</span> <span class="toctext">Requirements</span></a></li>
<li class="toclevel-1"><a href="#Creating_the_database"><span class="tocnumber">2</span> <span class="toctext">Creating the database</span></a>
<ul>
<li class="toclevel-2"><a href="#Create_a_database_and_import_the_tables"><span class="tocnumber">2.1</span> <span class="toctext">Create a database and import the tables</span></a></li>
<li class="toclevel-2"><a href="#Create_users_for_zoph"><span class="tocnumber">2.2</span> <span class="toctext">Create users for zoph</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Configure_the_PHP_templates"><span class="tocnumber">3</span> <span class="toctext">Configure the PHP templates</span></a></li>
<li class="toclevel-1"><a href="#Install_the_templates"><span class="tocnumber">4</span> <span class="toctext">Install the templates</span></a>
<ul>
<li class="toclevel-2"><a href="#Pick_a_location_to_put_Zoph"><span class="tocnumber">4.1</span> <span class="toctext">Pick a location to put Zoph</span></a></li>
<li class="toclevel-2"><a href="#Copy_the_templates"><span class="tocnumber">4.2</span> <span class="toctext">Copy the templates</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Install_the_perl_scripts"><span class="tocnumber">5</span> <span class="toctext">Install the perl scripts</span></a>
<ul>
<li class="toclevel-2"><a href="#Check_the_path_to_perl"><span class="tocnumber">5.1</span> <span class="toctext">Check the path to perl</span></a></li>
<li class="toclevel-2"><a href="#Configure_the_database_variables"><span class="tocnumber">5.2</span> <span class="toctext">Configure the database variables</span></a></li>
<li class="toclevel-2"><a href="#Copy_bin.2FzophImport_and_bin.2FzophExport_to_.2Fusr.2Flocal.2Fbin"><span class="tocnumber">5.3</span> <span class="toctext">Copy bin/zophImport and bin/zophExport to /usr/local/bin</span></a></li>
<li class="toclevel-2"><a href="#Install_the_man_page"><span class="tocnumber">5.4</span> <span class="toctext">Install the man page</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Test_it"><span class="tocnumber">6</span> <span class="toctext">Test it</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript">
//<![CDATA[
 if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } 
//]]>
</script></p>
<p><a name="Requirements" id="Requirements"></a></p>
<h2>Requirements</h2>
<p>First, make sure you meet all the requirements in the <a href="requirements.html" title="Zoph/Requirements">previous chapter</a>.</p>
<p><a name="Creating_the_database" id="Creating_the_database"></a></p>
<h2>Creating the database</h2>
<p><a name="Create_a_database_and_import_the_tables" id="Create_a_database_and_import_the_tables"></a></p>
<h3>Create a database and import the tables</h3>
<pre>
$ mysqladmin -u root -p create zoph
$ mysql -u root -p zoph &lt; sql/zoph.sql
</pre>
<p><a name="Create_users_for_zoph" id="Create_users_for_zoph"></a></p>
<h3>Create users for zoph</h3>
<p>I created two users: zoph_rw is used by the application and zoph_admin is used when I work directly in mysql so I don't have to use root.</p>
<pre>
$ mysql -u root -p
mysql&gt; grant select, insert, update, delete on zoph.* to zoph_rw@localhost identified by 'PASSWORD';
</pre>
<pre>
mysql&gt; grant all on zoph.* to zoph_admin identified by 'PASSWORD';
</pre>
<p><a name="Configure_the_PHP_templates" id="Configure_the_PHP_templates"></a></p>
<h2>Configure the PHP templates</h2>
<p>Please see <a href="configuration.html" title="Zoph/Configuration">the chapter on configuration</a> for details.</p>
<p><a name="Install_the_templates" id="Install_the_templates"></a></p>
<h2>Install the templates</h2>
<p><a name="Pick_a_location_to_put_Zoph" id="Pick_a_location_to_put_Zoph"></a></p>
<h3>Pick a location to put Zoph</h3>
<p>Create a zoph/ directory off the doc root of your web server, or create a Virtual Host with a new doc root.</p>
<pre>
$ mkdir /var/www/html/zoph
</pre>
<p><a name="Copy_the_templates" id="Copy_the_templates"></a></p>
<h3>Copy the templates</h3>
<pre>
$ cp -r php/* /var/www/html/zoph/
</pre>
<p><a name="Install_the_perl_scripts" id="Install_the_perl_scripts"></a></p>
<h2>Install the perl scripts</h2>
<p><a name="Check_the_path_to_perl" id="Check_the_path_to_perl"></a></p>
<h3>Check the path to perl</h3>
<p>The perl scripts points to /usr/bin/perl. If your perl is in a different place, edit the first line of the script.</p>
<p><a name="Configure_the_database_variables" id="Configure_the_database_variables"></a></p>
<h3>Configure the database variables</h3>
<p>Edit bin/zophImport and bin/zophExport so that the following variables match the values you put in config.inc.php:</p>
<pre>
$db_name = 'zoph';
$db_user = 'zoph_rw';
$db_pass = 'password';
</pre>
<p>In addtion, in zophExport set $image_dir to you image directory.</p>
<p><a name="Copy_bin.2FzophImport_and_bin.2FzophExport_to_.2Fusr.2Flocal.2Fbin" id="Copy_bin.2FzophImport_and_bin.2FzophExport_to_.2Fusr.2Flocal.2Fbin"></a></p>
<h3>Copy bin/zophImport and bin/zophExport to /usr/local/bin</h3>
<p>Or some other directory in your PATH.</p>
<p><a name="Install_the_man_page" id="Install_the_man_page"></a></p>
<h3>Install the man page</h3>
<p>A man page for zophImport is in the man/ directory. Copy this to somewhere in your manpath, /usr/local/man/man1 for example.</p>
<p><a name="Test_it" id="Test_it"></a></p>
<h2>Test it</h2>
<p>Try hitting <a href="http://localhost/zoph/logon.php" class="external free" title="http://localhost/zoph/logon.php" rel="nofollow">http://localhost/zoph/logon.php</a>. You should be presented with the logon screen.</p>
<p>If you get a 404 error...</p>
<ul>
<li>make sure the zoph/ folder and templates can be seen by the web server.</li>
</ul>
<p>If you see a bunch of code...</p>
<ul>
<li>make sure Apache is configured to handle PHP (see the REQUIREMENTS file)</li>
</ul>
<p>If you see a MySQL access denied error...</p>
<ul>
<li>make sure the DB_USER you specified in config.inc.php actually has access to the database. If your database is not on localhost, you will need to grant permissions to zoph_rw@hostname for that host.</li>
</ul>


</div>
</html>