Osmium is a user-friendly fitting tool for the EVE Online game.
Osmium is released under the GNU Affero General Public License,
version 3. You can see the full license text in the COPYING
file.
For the full list of Osmium contributors, see the CREDITS
file.
Osmium uses the PHP Markdown Extra library, released under the GNU General Public License, version 2. http://michelf.com/projects/php-markdown/license/
Osmium uses the phpass library, released in the public domain. http://www.openwall.com/phpass/
Osmium uses the Common Loadout Format PHP validator, released under the WTFPL license, version 2. https://github.com/Artefact2/common-loadout-format/blob/master/COPYING
- [email protected]
#osmium
onirc.coldfront.net
If you are NOT using the Apache HTTP Server, you will have to adapt
the rules in the .htaccess
file.
Assuming your webserver process runs with user http
and group
http
, follow the following steps:
-
Clone the repository, switch to latest stable release, and fetch submodules:
git clone git://github.com/Artefact2/osmium.git cd osmium git checkout production git submodule init git submodule update
-
Make cache directories writeable by your webserver:
chgrp http cache static/cache chmod g+rwx cache static/cache
-
Install the dependencies listed below.
-
Run
Make
to generate the stylesheet. -
Start the Sphinx search daemon (usually by running
sphinx-searchd
in thesphinx/
directory). -
Copy the example configuration file
config-example.ini
toconfig.ini
, and edit it accordingly. -
See Initial database setup below.
Assuming your PostgreSQL database name is osmium
and it is owned by
the osmium_user
user, follow these steps:
-
Get the latest Osmium static data dump (see below for how to get it)
-
Import the Osmium static dump:
xzcat osmium-sde-*.sql.xz | psql osmium osmium_user
-
Import the Osmium tables/views:
psql osmium osmium_user < pgsql/osmium.sql
-
Stop your webserver, and backup your database (you can use
bin/backup_osmium
). -
Fetch the latest version and use it:
git fetch origin git merge origin/production git submodule update make
-
Clear stale cache files:
make clear-harmless-cache
-
Read the
UPDATING
file for release-specific upgrade instructions. -
Start your webserver and test changes.
(Only do this if UPDATING
specifies the eve
schema has been
updated.)
-
Backup the
osmium
schema (bin/backup_osmium
). -
Drop the two schemas:
DROP SCHEMA osmium CASCADE; DROP SCHEMA eve CASCADE;
-
Redo step 1 and 2 of the initial database setup section (see above).
-
Restore the
osmium
schema.pg_restore pgsql/osmium-full-XXXXX.pgsql | psql osmium osmium_user
(Only do this if UPDATING
specifies the osmium
schema has been
updated.)
-
Backup the
osmium
schema (bin/backup_osmium
). -
Apply all the database patches for the version you are upgrading from (if you skipped multiple versions, use all patches in versions greater or equal than the version you are upgrading from):
cat pgsql/patches/<previous_version>/*.sql | psql osmium osmium_user
-
PHP >= 5.4, < 5.4.5, with:
- PostgreSQL extension (
pgsql.so
) - MySQLi extension (
mysqli.so
) - cURL extension (
curl.so
) - SimpleXML support (enabled by default)
- Zlib support
- (Optional) iconv extension (
iconv.so
) - (Optional) intl extension (
intl.so
) - (Optional) APC extension (
apc.so
)
- PostgreSQL extension (
-
PostgreSQL >= 9.0
-
Sphinx search server >= 2.0.4 (using the
sphinx.conf
from thesphinx/
directory) -
HTMLPurifier PEAR package, see http://htmlpurifier.org/download#PEAR
-
Sass >= 3.2 (http://sass-lang.com/)
-
(Optional) UglifyJS (
uglifyjs
should be in your$PATH
), see https://github.com/mishoo/UglifyJS (heavily recommended for production) -
(Optional) Horde_Text_Diff+Horde_Autoloader PEAR packages, see http://pear.horde.org (heavily recommended for production)
-
(Optional) PHPUnit, for automated tests
-
(Optional) Xdebug, for debugging and code coverage reports
Get it from here: http://artefact2.com/files/osmium-data/
The dump file is generated from the database of the EVE client itself. Not all of the data (namely dgmexpressions and dgmoperands) are in the official Static Data Dump, so you'll have to dump the database from the client yourself then do some minor transformations to make it PostgreSQL-friendly.
Use the eve2sql.py
script of the Eos repository
https://github.com/DarkFenX/Eos to dump a SQLite database, then dump
it in a text file :
PYTHONPATH=/path/to/reverence/library python2.7 scripts/eve2sql.py -e /path/to/eve -c /path/to/cache -l ~/dump.sqlite
sqlite3 ~/dump.sqlite .dump > ~/dump.txt
Then use the sqlite_to_postgres
script (included in bin/
)
to convert it in PostgreSQL tables:
bin/sqlite_to_postgres ~/dump.txt
This will create two (one for the schema, one for the data) SQL files per table in the dump. Then, import the following (in this order):
# you can find eve.sql in the pgsql directory of the Osmium repo
# it is more or less the raw schema with indexes, foreign keys and proper types
psql osmium osmium_user < pgsql/eve.sql
psql osmium osmium_user
SET search_path TO eve;
\i dgmoperands-schema.sql
\i dgmoperands-data.sql
\i dgmexpressions-schema.sql
\i dgmexpressions-data.sql
\i invcategories-data.sql
\i invgroups-data.sql
\i invmarketgroups-data.sql
\i invtypes-data.sql
\i invmetagroups-data.sql
\i invmetatypes-data.sql
\i dgmattribs-data.sql
\i dgmeffects-data.sql
\i dgmtypeattribs-data.sql
\i dgmtypeeffects-data.sql
Import the Osmium schema:
psql osmium osmium_user < pgsql/osmium.sql
Now, use the cache_expressions script to populate the cacheexpressions
table:
bin/cache_expressions
That's it! You can now delete the dgmoperands
and dgmexpressions
tables, and dump the eve schema for later use (for example by using
the backup_eve
script).