Permalink
Browse files

Let’s try wrapping code blocks in HTML this time …

  • Loading branch information...
1 parent 7216e6a commit 0b2e04723cab27b70b0e4c9c0c99029e3e1b5e7c @splorp committed Aug 29, 2012
Showing with 66 additions and 44 deletions.
  1. +66 −44 readme.md
View
110 readme.md
@@ -55,22 +55,27 @@ For editing the various configuration and template files.
* Assuming you already have Java 1.3 or later set up properly, open a command line and compile the server:
-```javac npdstracker.java```
+javac npdstracker.java
* Edit ```npdstracker.ini``` and change any settings you see fit. Pay attention to the log settings - NPDS Tracker Server logs are rather verbose and can become quite large over time. You can turn off the logging once you are sure that your server is configured properly. You can also add any tracker servers that you want to share records with.
* Start the server at the command line:
-```java npdstracker```
+<pre>
+<code>java npdstracker</code>
+</pre>
For Java 1.1 and 1.2 installations, start the server using this additional parameter:
-```java -Dsun.net.inetaddr.ttl=0 npdstracker
-```
+<pre>
+<code>java -Dsun.net.inetaddr.ttl=0 npdstracker</code>
+</pre>
* Test the connection to the server by launching your web browser using the following URL:
- http://<ip_address/hostname>:3680/
+<pre>
+<code>http://<ip_address/hostname>:3680/</code>
+</pre>
* Configure an NPDS client to point at the tracker server, making sure it can register properly.
@@ -81,73 +86,90 @@ The basic configuration is great for development, testing, and Windows deploymen
+ For a cleaner installation, create a JAR file at the command line:
- jar cvfm npdstracker.jar manifest.mf *.class
+<pre>
+<code>jar cvfm npdstracker.jar manifest.mf *.class</code>
+</pre>
+ Install the JAR file to ```/usr/local/bin``` from at the command line:
- mkdir -p /usr/local/bin
- install npdstracker.jar /usr/local/bin
+<pre>
+<code>mkdir -p /usr/local/bin
+install npdstracker.jar /usr/local/bin</code>
+</pre>
+ Install the ```npdstracker.ini``` and ```npdscmd.txt``` files in ```/etc``` at the command line:
- mkdir -p /etc/npdstracker
- install npdstracker.ini npdscmd.txt /etc/npdstracker
+<pre>
+<code>mkdir -p /etc/npdstracker
+install npdstracker.ini npdscmd.txt /etc/npdstracker</code>
+</pre>
+ Install the ```template.html``` and ```template.css``` files in ```/usr/local/share``` at the command line:
- mkdir -p /usr/local/share/npdstracker
- install template.html template.css /usr/local/share/npdstracker
+<pre>
+<code>mkdir -p /usr/local/share/npdstracker
+install template.html template.css /usr/local/share/npdstracker</code>
+</pre>
+ Create the log file at the command line:
- touch /var/log/npdstracker.log
+<pre>
+<code>touch /var/log/npdstracker.log</code>
+</pre>
+ Edit ```/etc/npdstracker/npdstracker.ini``` to point to the new paths for all the aforementioned files, especially:
- pageTemplate = /usr/local/share/npdstracker/template.html
- cssTemplate = /usr/local/share/npdstracker/template.css
- logfile = /var/log/npdstracker.log
+<pre>
+<code>pageTemplate = /usr/local/share/npdstracker/template.html
+cssTemplate = /usr/local/share/npdstracker/template.css
+logfile = /var/log/npdstracker.log</code>
+</pre>
+ You can now manually start the NPDS Tracker Server at the command line:
- java -jar /usr/local/bin/npdstracker.jar -c /etc/npdstracker/npdscmd.txt -o /etc/npdstracker/npdstracker.ini
+<pre>
+<code>java -jar /usr/local/bin/npdstracker.jar -c /etc/npdstracker/npdscmd.txt -o /etc/npdstracker/npdstracker.ini</code>
+</pre>
+ On Darwin or Mac OS X, you can create a launch daemon to automatically start the NPDS Tracker Server on boot by creating and editing ```/Library/LaunchDaemons/fr.free.npds.npdstracker.plist``` and pasting in the following (this is assuming following the above Advanced Configuration steps):
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>Label</key>
- <string>fr.free.npds.npdstracker</string>
- <key>ProgramArguments</key>
- <array>
- <string>java</string>
- <string>-jar</string>
- <string>/usr/local/bin/npdstracker.jar</string>
- <string>-c</string>
- <string>/etc/npdstracker/npdscmd.txt</string>
- <string>-o</string>
- <string>/etc/npdstracker/npdstracker.ini</string>
- </array>
- <key>KeepAlive</key>
- <dict>
- <key>NetworkState</key>
- <true/>
- </dict>
- <key>RunAtLoad</key>
- <true/>
- </dict>
- </plist>
+<pre>
+<code><?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>Label</key>
+ <string>fr.free.npds.npdstracker</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>java</string>
+ <string>-jar</string>
+ <string>/usr/local/bin/npdstracker.jar</string>
+ <string>-c</string>
+ <string>/etc/npdstracker/npdscmd.txt</string>
+ <string>-o</string>
+ <string>/etc/npdstracker/npdstracker.ini</string>
+ </array>
+ <key>KeepAlive</key>
+ <dict>
+ <key>NetworkState</key>
+ <true/>
+ </dict>
+ <key>RunAtLoad</key>
+ <true/>
+ </dict>
+</plist></code>
+</pre>
It can be loaded immediately by running the following at the command line, or you can wait until the next reboot:
- sudo launchctl load /Library/LaunchDaemons/fr.free.npds.npdstracker.plist
+<pre>
+<code>sudo launchctl load /Library/LaunchDaemons/fr.free.npds.npdstracker.plist</code>
+</pre>
+ On Linux or BSD systems, you can create ```init.d``` or ```rc.d``` scripts, respectively, to automatically start the NPDS Tracker Server on boot.
-
## Page Template Tag Syntax
The HTML template (```template.html```) can be customized using the following pseudo-SGML tags to insert information into the page.

0 comments on commit 0b2e047

Please sign in to comment.