-
Notifications
You must be signed in to change notification settings - Fork 3
1. Installation
AmSYS, originally developed for The Amarr Republic/Allied Industries, is an application designed to assist in Eve Online Corp or Alliance logistical activities.
I personally have deployed this to remote hosted (DigitalOcean - $5/month) Ubuntu 16 and self hosted Ubuntu 16, Windows, and MacOS. The following guide will explain how to install on Ubuntu 16 (specifically using DigitalOcean, although it should apply to any Ubuntu 16 server).
- Install LAMP stack (Apache2, MySQL, PHP 7.x) DigitalOcean Ubuntu 16 LAMP
- If running with low available memory, add Swap to the server - this improves performance DigitalOcean Adding SWAP
- Install PHPMyAdmin, it will assist with database maintenance DigitalOcean Secure PHPMyAdmin Install
- Install php7-zip and bz2
sudo apt-get install php7.0-zip
sudo apt-get install php7.0-bz2
- Clone Git Repository to
/var/www/html
this will create a folder called 'amsys'
cd /var/www/html
git clone https://github.com/binarygod/AmSYS.git
- Edit
/etc/apache2/sites-enabled/000-default.conf
and add new VirtualHost using your own information. The important parts are the DocumentRoot and Directory configuration.
<VirtualHost *:80>
ServerName sub.yourdomain.com
ServerAlias sub.yourdomain.com
DocumentRoot /var/www/html/amsys/web
<Directory /var/www/html/amsys/web>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>
- Navigate to
/var/www/html/amsys
and download/install Composer with the commands on the site. - Using PHPMyAdmin create two databases, one is for Amsys data, the other is for Eve SDE data. Create a user and GRANT full access on both databases
- Install dependencies by running
php composer.phar install
, if you a 'Killed' message see Troubleshooting below
- Provide configuration details when prompted (These can be edit later via amsys/app/config/parameters.yml)
- Fix permissions on the application, from the
/var/www/html/amsys
directory, run the following (If ACL isn't installed you will need tosudo apt-get install acl
, as of Ubuntu 12 ACL is already enabled on the filesystem)
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
- Navigate to
/var/www/html/amsys/app/config
and check the values of your Parameters.yml for accuracy - Navigate to
/var/www/html/amsys
, runphp app/console doctrine:schema:update --force
to create database tables - Run
php app/console amsys:settings:populate
to create default settings - Run
php app/console amsys:sde:update
to download latest SDE from Fuzzworks - Run
php app/console amsys:cache:update
to pull all Ore/Minerals/Ice/Gas/PI prices and create the cache - Restart Apache
sudo systemctl restart apache2
- Navigate to the web address (the the virtual host points to) and you should see the login page
- Navigate to http://your.com/register and register an account, API is used ONLY to confirm that you own that character
- Login to PHPMyAdmin and load the Users table, change
role
from ROLE_USER to ROLE_ADMIN and save. - Logout of Amsys and log back in, you now have admin permissions
Add Cron Job to pull Ore/Minerals/Ice/Gas/PI prices every 15 minutes.
- crontab -e
- */15 * * * * php /var/www/html/amsys/app/console amsys:cache:update
This is due to the server not having any swap space, add swap space.
Easiest way is to create an update script
- Navigate to
/var/www/html/amsys
and createupdate.sh
- Make is executable,
chmod +x update.sh
- Edit update.sh
git pull https://username:[email protected]/binarygod/amsys.git
php app/console cache:clear --env=prod
- To do an update and get new changes, simply navigate to
/var/www/html/amsys
and run./update.sh
, this will pull the new code and refresh the cache
I never coded an interface in for Groups and permissions, I was the sole coder so it wasn't high priority. Current Roles are as follows
- ROLE_ADMIN: ROLE_OFFICER, ROLE_EDITOR - GOD!
- ROLE_OFFICER: ROLE_MEMBER, ROLE_EDITOR - All of below, can't actually remember what else
- ROLE_EDITOR: ROLE_MEMBER - Can use buyback, gets discounted rate, can Edit/Create 'Pages'
- ROLE_MEMBER: ROLE_USER - Can use buyback, gets discounted rate, can access 'Pages'
- ROLE_USER - Can use buyback, gets discounted rate, cannot access 'Pages'