added network file
This commit is contained in:
parent
cb3a6bd9c6
commit
af0f3a198e
2
Censis/network.txt
Normal file
2
Censis/network.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
censis - Censis2016
|
||||||
|
censis-IoT - CensisDemo2015
|
@ -5,6 +5,8 @@ DEV="$HOME/dev"
|
|||||||
LIVE="$HOME/live"
|
LIVE="$HOME/live"
|
||||||
SWAP="/swapfile"
|
SWAP="/swapfile"
|
||||||
DBSETUP="obrand-admin-server/dbrebuild.sh"
|
DBSETUP="obrand-admin-server/dbrebuild.sh"
|
||||||
|
PKG_MANAGER=$( command -v yum || command -v apt-get ) || echo "Neither yum nor apt-get found"
|
||||||
|
PKG_DEVICE=$(basename $PKG_MANAGER)
|
||||||
|
|
||||||
fancy_echo() {
|
fancy_echo() {
|
||||||
local fmt="$1"; shift
|
local fmt="$1"; shift
|
||||||
@ -16,11 +18,15 @@ fancy_echo() {
|
|||||||
fancy_echo "Installing Obrand Admin Server ..."
|
fancy_echo "Installing Obrand Admin Server ..."
|
||||||
## Update initial packages
|
## Update initial packages
|
||||||
|
|
||||||
sudo apt-get -y -q --force-yes update
|
|
||||||
# sudo apt-get -y -q --force-yes upgrade
|
|
||||||
|
|
||||||
# install apps
|
if [ $(basename $PKG_MANAGER) = "yum" ]; then
|
||||||
sudo apt-get --assume-yes install build-essential git nginx htop screen wget curl postgresql postgresql-contrib
|
sudo yum --assumeyes upgrade
|
||||||
|
sudo yum --assumeyes install git make automake gcc gcc-c++ kernel-devel nginx htop screen wget curl postgresql postgresql-contrib
|
||||||
|
else
|
||||||
|
sudo apt-get -y -q --force-yes update
|
||||||
|
sudo apt-get -y -q --force-yes upgrade
|
||||||
|
sudo apt-get --assume-yes install build-essential git nginx htop screen wget curl postgresql postgresql-contrib
|
||||||
|
fi
|
||||||
|
|
||||||
# set up and install swap file
|
# set up and install swap file
|
||||||
if [[ ! -f "$SWAP" ]]; then
|
if [[ ! -f "$SWAP" ]]; then
|
||||||
@ -86,6 +92,7 @@ cd $DEV/obrand-admin-server
|
|||||||
echo Setting up Database server...
|
echo Setting up Database server...
|
||||||
|
|
||||||
sudo su - postgres -c "$DEV/$DBSETUP"
|
sudo su - postgres -c "$DEV/$DBSETUP"
|
||||||
|
node dbconfig.js
|
||||||
|
|
||||||
echo Copying...
|
echo Copying...
|
||||||
rsync -uav --exclude .git $DEV/obrand-admin-server/ $LIVE
|
rsync -uav --exclude .git $DEV/obrand-admin-server/ $LIVE
|
||||||
@ -95,6 +102,8 @@ sudo fuser -k 80/tcp
|
|||||||
|
|
||||||
sudo wget https://dl.dropboxusercontent.com/u/233909/obrand/obrand.nginx -O /etc/nginx/sites-available/obrand && sudo ln -s /etc/nginx/sites-available/obrand /etc/nginx/sites-enabled/obrand
|
sudo wget https://dl.dropboxusercontent.com/u/233909/obrand/obrand.nginx -O /etc/nginx/sites-available/obrand && sudo ln -s /etc/nginx/sites-available/obrand /etc/nginx/sites-enabled/obrand
|
||||||
|
|
||||||
|
sudo rm /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
npm set progress=true
|
npm set progress=true
|
||||||
sudo /etc/init.d/nginx restart
|
sudo /etc/init.d/nginx restart
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user