forked from BrowserBox/BrowserBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-yum-installzanj.sh
executable file
·26 lines (26 loc) · 996 Bytes
/
aws-yum-installzanj.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ssh_priv_key_file=$1
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
sudo yum -y install git
sudo echo "$(cat $ssh_priv_key_file)" > .ssh/id_ed25519
sudo chmod 400 .ssh/id_ed25519
git clone [email protected]:/crislin2046/environments.git
cd environments
./basic_setup
cd ..
gclone [email protected]:/dosycorp/zanj.git
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
export NVM_DIR=$HOME/.nvm
source $HOME/.nvm/nvm.sh
nvm install 8.12.0
nvm install-latest-npm
curl https://intoli.com/install-google-chrome.sh | bash
sudo yum -y install google-noto*
npm i -g pm2
cd zanj
npm i
pm2 start index.js
pm2 startup
# the following line may change depending on pm2 startup output
# but I don't know how to select then execute that output line
sudo env PATH=$PATH:/home/ec2-user/.nvm/versions/node/v8.12.0/bin /home/ec2-user/.nvm/versions/node/v8.12.0/lib/node_modules/pm2/bin/pm2 startup systemd -u ec2-user --hp /home/ec2-user