Add automation 3rd party software install script

pull/27/head
HardiReady 2018-02-11 12:26:53 +01:00
parent eb3514c075
commit 553dc492a6
2 changed files with 48 additions and 21 deletions

View File

@ -1,36 +1,29 @@
# Operation Pandora Trigger Commandcenter
[MEAN Application](http://mean.io/) created for [www.operation-pandora.com](www.operation-pandora.com) Arma3 Community
[MEAN Application](http://mean.io/) created for [www.operation-pandora.com](https://www.operation-pandora.com) Arma3 Community
## Installation
### Setup mongoDB
### Setup 3rd Party Software
https://docs.mongodb.com/manual/administration/install-community/
Run the installation script located in the docs folder:
### Setup node and npm
./docs/opt-cc-environment/3rd-party-install
sudo apt-get install npm nodejs-legacy
update to latest npm version
sudo npm install -g npm@latest
update node to latest version
sudo npm install -g n@latest
n latest
check versions
npm -v
node -v
It installs NPM, Node and MongoDB on latest versions.
In addition, it sets up the mongo deamon to start up automatically with the system.
## Development and Execution
### Run in dev mode
Before running any execution run
npm install
inside the main folder to trigger all needed npm package installations for the program execution.
### Run in Dev Mode
*TODO*
### Run in Production

View File

@ -0,0 +1,34 @@
#!/bin/bash
#####################################################
###### INSTALL ALL REQUIRED 3RD-PARTY SOFTWARE ######
#####################################################
# MONGO DB COMMUNITY
# NPM
# NODE
# mongodb key & repo
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | \
sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
# install from apt
sudo apt-get update
sudo apt-get install -y mongodb-org npm
# enable mongod for autostart
sudo systemctl enable mongod.service
# install latest node version
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.nvm/nvm.sh
nvm install stable
sudo ln -s ~/.nvm/versions/node/$(node -v)/bin/node /usr/bin/node
# upgrade to latest npm version
sudo npm install -g npm@latest
npm -v
node -v