camlistored: help getting started on windows

-fail early when new config has sqlite but no sqlite installed
-hint at the server config doc url
-added windows with mysql section in the server config doc
-fixed typo in mongo indexer option

Change-Id: I4266eb6e34a55901e6af90a32eb1411fb5c37688
This commit is contained in:
mpl 2013-08-15 23:36:06 +02:00
parent b6a8dc3351
commit f5709afdd8
3 changed files with 29 additions and 3 deletions

View File

@ -112,7 +112,7 @@ func main() {
case "linux":
log.Printf("On Linux, run 'sudo apt-get install libsqlite3-dev' or equivalent.")
case "windows":
log.Printf("On Windows, .... click stuff? TODO: fill this in")
log.Printf("SQLite is not easy on windows. Please see http://camlistore.org/docs/server-config#windows")
}
os.Exit(2)
}

View File

@ -25,6 +25,7 @@ import (
"database/sql"
"encoding/json"
"encoding/pem"
"errors"
"flag"
"fmt"
"io/ioutil"
@ -268,7 +269,8 @@ func newDefaultConfigFile(path string) error {
}
}
} else {
log.Printf("Wrote config file assuming SQLite, but SQLite is not available. Recompile with SQLite or modify %s and pick an index type.", path)
log.Printf("Wrote config file assuming SQLite, but SQLite is not available. Recompile with SQLite or modify %s and pick an index type. Please see http://camlistore.org/docs/server-config#windows", path)
return errors.New("Newly written configuration not usable.")
}
return nil
}

View File

@ -53,7 +53,7 @@ to <code>pkg/genconfig</code> welcome.</p>
<p>Unless <b><code>runIndex</code></b> is set to <code>false</code>, exactly one of these must be set:</p>
<ul>
<li><b><code>sqlite</code></b>: path to SQLite database file to use for indexing</li>
<li><b><code>mongo</code></b>: user@host:password</li>
<li><b><code>mongo</code></b>: user:password@host</li>
<li><b><code>mysql</code></b>: user@host:password</li>
<li><b><code>postgres</code></b>: user@host:password</li>
</ul>
@ -76,6 +76,30 @@ config, as used by <code>devcam server</code>.</p>
</pre>
<p>One can create any permanode with camput or the UI and use it as the rootPermanode.</p>
<h2 id="windows">Windows</h2>
<p>
The default configuration comes with SQLite for the indexer. However, getting <a href="https://github.com/mattn/go-sqlite3">mattn go-sqlite3</a> to work on windows is not straightforward, so we suggest using one of the other indexers, like MySQL.
</p>
<p>
The following steps should get you started with MySQL:
<ul>
<li> Dowload and install <a href="https://downloads.mariadb.org/mariadb/5.5.32/">MariaDB</a> or <a href="http://dev.mysql.com/downloads/windows/installer/">MySQL</a> (the latter requires .NET).</li>
<li> Edit your server configuration file (if it does not exit yet, running <b>camlistored</b> will automatically create it):
<ul>
<li> Remove the <b>sqlite</b> option.</li>
<li> Add a <b>dbname</b> option. (ex: "dbname": "camliprod")</li>
<li> Add a <b>mysql</b> option. (ex: "mysql": "foo@localhost:bar")</li>
</ul></li>
<li> Create a dedicated user/password for your mysql server.</li>
<li> Initialize the database with <b>camtool</b>: <code>camtool dbinit --user=foo --password=bar --host=localhost --dbname=camliprod --wipe </code></li>
</ul>
</p>
<p>
Setting up MongoDB is even simpler, but the MongoDB indexer is not as well tested as the MySQL one.
</p>
<h2>App Engine</h2>
<p>