smartoffice installer
This commit is contained in:
parent
b9cf591ee0
commit
1814dc1dcf
46
smartoffice_install.sh
Normal file
46
smartoffice_install.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Update initial packages
|
||||
sudo apt-get -y --force-yes update
|
||||
sudo apt-get -y --force-yes upgrade
|
||||
|
||||
# install apps
|
||||
sudo apt-get --assume-yes install build-essential git nginx htop screen wget curl
|
||||
|
||||
# get dot files
|
||||
wget https://dl.dropboxusercontent.com/u/233909/smartoffice/.screenrc -O ~/.screenrc
|
||||
wget https://dl.dropboxusercontent.com/u/233909/smartoffice/.bash_aliases -O ~/.bash_aliases
|
||||
|
||||
# set up and install swap file
|
||||
sudo swapon -s
|
||||
sudo fallocate -l 1G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile
|
||||
sudo swapon -s
|
||||
sudo swapon /swapfile
|
||||
|
||||
# setup node and npm
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
|
||||
source .bashrc
|
||||
nvm install v5.7.0
|
||||
npm install -g gulp bower pm2 npm-check npm-install-missing
|
||||
|
||||
# get source and build
|
||||
mkdir ~/live
|
||||
mkdir ~/dev && cd ~/dev
|
||||
|
||||
git clone https://censis.visualstudio.com/DefaultCollection/SmartOffice/_git/SmartOfficeGit
|
||||
|
||||
cd ~/dev/SmartOffice/Git
|
||||
|
||||
npm install .
|
||||
npm-install-missing
|
||||
bower install
|
||||
|
||||
cp -ra . ~/live
|
||||
|
||||
# Configure nginx
|
||||
sudo fuser -k 80/tcp
|
||||
|
||||
sudo wget https://dl.dropboxusercontent.com/u/233909/smartoffice/smartoffice.nginx -O /etc/nginx/sites-available/smartoffice && sudo ln -s /etc/nginx/sites-available/smartoffice /etc/nginx/sites-enabled/smartoffice
|
||||
|
Loading…
Reference in New Issue
Block a user