2018-12-12
This commit is contained in:
parent
a15c4ee435
commit
a028fbe8ee
Binary file not shown.
29
scripts/userdata.sh
Normal file
29
scripts/userdata.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
NVM="$HOME/.nvm"
|
||||
NVM_VERSION="stable"
|
||||
DEV="$HOME/dev"
|
||||
SWAP="/swapfile"
|
||||
|
||||
|
||||
apt-get -y -q update && apt-get -y -q upgrade
|
||||
apt-get --assume-yes install build-essential git htop nodejs npm screen wget curl xorg openbox libasound2
|
||||
apt-get -y -q clean
|
||||
|
||||
fallocate -l 1G $SWAP
|
||||
chmod 600 $SWAP
|
||||
mkswap $SWAP
|
||||
swapon $SWAP
|
||||
|
||||
echo '/swapfile none swap defaults 0 0' >> /etc/fstab
|
||||
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
||||
export NVM_DIR=$NVM
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
source $HOME/.bashrc
|
||||
source $NVM/nvm.sh
|
||||
nvm install $NVM_VERSION
|
||||
|
||||
npm install -g gulp pm2@latest npm-check npm-install-missing
|
||||
pm2 update
|
||||
touch $HOME/martin.txt
|
Loading…
Reference in New Issue
Block a user