mirror of
https://github.com/torproject/collector.git
synced 2024-11-23 09:29:46 +00:00
Implements task-19015. Removed obsolete scripts and changed INSTALL.md
This commit is contained in:
parent
e89f50ec0e
commit
295adfb877
41
INSTALL.md
41
INSTALL.md
@ -24,26 +24,12 @@ that you're using `/srv/collector.torproject.org/` as working directory,
|
||||
but feel free to use another directory that better suits your needs.
|
||||
|
||||
$ sudo mkdir -p /srv/collector.torproject.org/
|
||||
$ sudo chown vagrant:vagrant /srv/collector.torproject.org/
|
||||
|
||||
Install a few packages:
|
||||
|
||||
$ sudo apt-get install openjdk-6-jdk ant libcommons-codec-java \
|
||||
libcommons-compress-java
|
||||
|
||||
|
||||
Clone the metrics-db repository
|
||||
-------------------------------
|
||||
|
||||
$ cd /srv/collector.torproject.org/
|
||||
$ git clone https://git.torproject.org/metrics-db
|
||||
|
||||
|
||||
Clone required submodule metrics-lib
|
||||
------------------------------------
|
||||
|
||||
$ git submodule init
|
||||
$ git submodule update
|
||||
$ sudo apt-get ant junit4 libasm4-java libcommons-codec-java \
|
||||
libcommons-compress-java libcommons-lang3-java libgoogle-gson-java \
|
||||
liblogback-java liboro-java libslf4j-java libxz-java openjdk-7-jdk
|
||||
|
||||
|
||||
Compile CollecTor
|
||||
@ -55,26 +41,21 @@ $ ant compile
|
||||
Configure the relay descriptor downloader
|
||||
-----------------------------------------
|
||||
|
||||
Edit the config file and uncomment and edit at least the following line:
|
||||
Run
|
||||
$ java -DLOGBASE=/path/to/logs -jar collector-<version>.jar releaydescs
|
||||
once in order to obtain a configuration properties file.
|
||||
|
||||
DownloadRelayDescriptors 1
|
||||
Edit collector.properties and set at least the following value to true:
|
||||
|
||||
DownloadRelayDescriptors = true
|
||||
|
||||
|
||||
Run the relay descriptor downloader
|
||||
-----------------------------------
|
||||
|
||||
$ bin/run-relaydescs
|
||||
$ java -DLOGBASE=/path/to/logs -jar collector-<version>.jar releaydescs
|
||||
|
||||
|
||||
Set up an hourly cronjob for the relay descriptor downloader
|
||||
------------------------------------------------------------
|
||||
|
||||
Ideally, run the relay descriptor downloader once per hour by adding a
|
||||
crontab entry like the following:
|
||||
|
||||
6 * * * * cd /srv/collector.torproject.org/db/ && bin/run-relaydescs
|
||||
|
||||
Watch out for INFO-level logs in the `log/` directory. In particular, the
|
||||
Watch out for INFO-level logs in the log directory you configured. In particular, the
|
||||
lines following "Statistics on the completeness of written relay
|
||||
descriptors:" is quite important.
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
|
||||
|
||||
.level = FINER
|
||||
|
||||
# if the following dir pattern is changed, LOGGINGPATH='log' in run-all
|
||||
# needs to be adapted.
|
||||
java.util.logging.FileHandler.pattern = ./log/collector-%g.log
|
||||
java.util.logging.FileHandler.limit = 5000000
|
||||
java.util.logging.FileHandler.count = 9
|
||||
java.util.logging.FileHandler.append = true
|
||||
java.util.logging.FileHandler.level = FINER
|
||||
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
|
||||
|
||||
java.util.logging.ConsoleHandler.level = WARNING
|
||||
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
||||
|
||||
java.util.logging.SimpleFormatter.format = %1$tF %1$tT %4$s %2$s %5$s%n
|
||||
|
||||
sun.net.www.level = SEVERE
|
||||
sun.level = SEVERE
|
16
bin/run-all
16
bin/run-all
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
TOKEN=`expr substr $1 5 20`
|
||||
|
||||
# if the path is changed in properties, this needs to be adapted.
|
||||
LOGGINGPATH='log'
|
||||
|
||||
if ! test -d $LOGGINGPATH
|
||||
then mkdir $LOGGINGPATH
|
||||
fi
|
||||
|
||||
# the following uses one logging configuration for all modules
|
||||
java -Xmx2g -Djava.util.logging.config.file=./bin/logging.properties -jar collector-0.9.0-dev.jar $TOKEN
|
||||
|
||||
# this would use a special log config for each module
|
||||
# java -Xmx2g -Djava.util.logging.config.file=./bin/logging.$TOKEN.properties -jar collector-0.9.0-dev.jar $TOKEN
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
`dirname $0`/run-all `basename $0`
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
`dirname $0`/run-all `basename $0`
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
`dirname $0`/run-all `basename $0`
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
`dirname $0`/run-all `basename $0`
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
`dirname $0`/run-all run-updateindex
|
||||
|
Loading…
Reference in New Issue
Block a user