zKillboard is a killboard created for EVE-Online, for use on EVE-KILL.net, but can also be used for single entities.
zKillboard is released under the GNU Affero General Public License, version 3. The full license is available in the AGPL.md
file.
zKillboard also uses data and images from EVE-Online, which is covered by a seperate license from CCP. You can see the full license in the CCP.md
file.
It also uses various 3rd party libraries, which all carry their own licensing. Please refer to them for more info.
This is BETA, which means it is a work in progress. It lacks documentation and is currently not meant for use in production.
#esc
on irc.coldfront.net
Mibbit link incase you're lazy: http://chat.mibbit.com/?channel=%23esc&server=irc.coldfront.net
see LICENSE.md
file
- PHP 5.4+ / HHVM 2.4+
- Apache + mod_rewrite, Nginx or Lighttpd
- Linux, Mac OS X or Windows
- MariaDB 5.5+
- Composer
- cURL and it's php library, php5-curl
Always use the /public/ dir in your httpd, many things are located in said directory that are needed for the page to work.
upstream php-upstream {
server unix:/tmp/php-fpm.sock;
server 127.0.0.1:9000;
}
server {
server_name example.com www.example.com;
listen 80;
root /path/to/zkb_install/public;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass php-upstream;
}
}
Apache rewrite is handled by the .htaccess, located in the /public directory.
<VirtualHost *:80>
ServerAlias yourdomain.tld
DocumentRoot /path/to/zkb_install/public/
<Directory /path/to/zkb_install/public/>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
url.redirect = (
"/?a=kill_detail&kll_id=([0-9]+)" => "/evekilldetailintercept/$1/",
"/?a=kill_related&kll_id=([0-9]+)" => "/evekillrelatedintercept/$1/"
)
url.rewrite-if-not-file = (
"(.*)" => "/index.php/$0"
)
server.document-root = "/path/to/zkb_install/public/"
Other webservers are supported, aslong as they can run PHP, they should work. But other webservers have other ways to write rewrites, so from our side of things, they are unsupported. Feel free to issue pull requests to amend this.
- PHP 5.5+ / HHVM 2.4+
- Linux
- MariaDB 5.5+
- Composer
- APC / Memcached / Redis
- cURL and it's php plugin, php5-curl
Installation is handled via command line. Other methods are currently not supported.
cd
to a dir where you want zKillboard to reside.- Do
git clone git@github.com:EVE-KILL/zKillboard.git
. cd
intozKillboard
dir.- Get composer.
curl -s https://getcomposer.org/installer | php
- Install vendor files with composer.
php composer.phar install
cd
intoinstall
dir.- Execute the installation script.
php5 install.php
- Follow the instructions and fill in the prompts
- Setup stomp (Follow guide further down)
- Setup the CLI system.
- Setup cronjobs
- Symlink cli.php to /usr/bin/zkillboard
ln -s /path/to/zkb/cli.php /usr/bin/zkillboard
- Install bash-completion. Under Debian this can be done like so
apt-get install bash-completion
- Move
bash_complete_zkillboard
to/etc/bash_completion.d/zkillboard
- Restart your shell session
- Issue
zkillboard list
and enjoy the zkillboard cli interface, with full tab completion
zKillboard comes with a script that automates the cron execution. It keeps track of when each job has been run and how frequently it needs to be executed. Just run it every minute via cron or a similar system:
* * * * * /var/killboard/zkillboard.com/cron.php >/whatever/log/you/like.txt 2>&1
If you're not happy with the default timeouts, or want to disable/enable some jobs entirely, you can use the cron.overrides file. The cron.overrides file has to be placed into the zKB root dir, next to the cron.php script. It's a simple json file, with the following format:
{
"commandName":{
"timeoutInSeconds":"arguments"
}
}
For example the following would disable stompReceive entirely, and increase the timeout for apiFetch and parseKills to 5 minutes:
{
"stompReceive":{},
"apiFetch":{
"300":""
},
"parseKills":{
"300":""
}
}
If you don't want to use the automated cron script, you can run each command manualy in your crontab:
* * * * * /var/killboard/zkillboard.com/cliLock.sh minutely all
* * * * * /var/killboard/zkillboard.com/cliLock.sh apiFetch
* * * * * /var/killboard/zkillboard.com/cliLock.sh parseKills
* * * * * /var/killboard/zkillboard.com/cliLock.sh p120s
* * * * * /var/killboard/zkillboard.com/cliLock.sh stompReceive
* * * * * /var/killboard/zkillboard.com/cliLock.sh updateCharacters
* * * * * /var/killboard/zkillboard.com/cliLock.sh updateCorporations
* * * * * /var/killboard/zkillboard.com/cliLock.sh populateCharacters
1 * * * * /var/killboard/zkillboard.com/cliLock.sh summary
1 * * * * /var/killboard/zkillboard.com/cliLock.sh hourly
1 * * * * /var/killboard/zkillboard.com/cliLock.sh feed fetch
0 */6 * * * /var/killboard/zkillboard.com/cliLock.sh itemUpdate
9 */8 * * * /var/killboard/zkillboard.com/cliLock.sh populateAlliances
0 12 * * * /var/killboard/zkillboard.com/cliLock.sh priceUpdate
0 16 * * * /var/killboard/zkillboard.com/cliLock.sh calculateAllTimeStatsAndRanks ranks
0 20 * * * /var/killboard/zkillboard.com/cliLock.sh calculateRecentTimeStatsAndRanks stats
All cronjobs can be launched manually with the cli interface.
Stomp uses the STOMP PHP plugin which you can get via git.
Here is a quick one liner: cd /tmp/ && git clone https://github.com/ppetermann/pecl-tools-stomp.git && cd pecl-tools-stomp && phpize && ./configure && make && make install
After that you make a 20-stomp.ini
in /etc/php5/conf.d/
and add extension=stomp.so
to it, and save. And restart your php stuff.
The stomp service is read only. If you need to send data via it, come by IRC and have a chat with us.
- Stomp server: tcp://stomp.zkillboard.com:61613
- Stomp user: guest
- Stomp pass: guest
zKillboard runs perfectly under hhvm, which provides a near 10x speed increase aswell.
To get HHVM look at https://github.com/facebook/hhvm/wiki#installing-pre-built-packages-for-hhvm
Server {
Type = fastcgi
#Port = 9000
#IP = 127.0.0.1
FileSocket = /run/shm/hhvm.sock
APC {
EnableApc = true
TableType = concurrent
ExpireOnSets = true
PurgeFrequency = 4096
}
}
Eval {
Jit = true
JitWarmupRequests = 50
}
Log {
Level = Error
NoSlencer = true
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
InjectedStackTrace = true
NativeStackTrace = true
File = /var/log/hhvm/error.log
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
ErrorHandling {
CallUserHandlerOnFatals = true
MaxLoopCount = 0
NoInfiniteRecursionDetection = false
ThrowBadTypeExceptions = false
ThrowTooManyArguments = false
WarnTooManyArguments = false
ThrowMissingArguments = false
ThrowInvalidArguments = false
EnableHipHopErrors = true
NoticeFrequency = 1 # 1 out of these many notices to log
WarningFrequency = 1 # 1 out of these many warnings to log
AssertActive = false
AssertWarning = false
}
Debug {
FullBacktrace = true
ServerStackTrace = true
ServerErrorMessage = true
TranslateSource = true
RecordInput = false
ClearInputOnSuccess = true
ProfilerOutputDir = /tmp
CoreDumpEmail = email address
CoreDumpReport = true
CoreDumpReportDirectory = /tmp
}
Repo {
Central {
Path = /var/log/hhvm/.hhvm.hhbc
}
}
MySQL {
ReadOnly = false
ConnectTimeout = 1000 # in ms
ReadTimeout = 2000 # in ms
SlowQueryThreshold = 4000 # in ms
KillOnTimeout = true
WaitTimeout = -1
TypedResults = true
}
Every clean zKillboard installation now comes with an admin account, default password admin, it it highly recommended that you immediately change this password after you finish your installation.
Current special features to the admin account:
- Any entities (pilots, corporations, etc.) added to the Admin's tracker will automatically be fetched from https://zkillboard.com up to and including a full fetch of all kills and maintaining a fetch of said kills on an hourly basis. Of course, this is dependent on proper cronjob setup.