Skip to content

Instantly share code, notes, and snippets.

@lerry
Last active December 26, 2015 18:59
Show Gist options
  • Save lerry/7197995 to your computer and use it in GitHub Desktop.
Save lerry/7197995 to your computer and use it in GitHub Desktop.
vps init
#!/bin/sh
apt-get update&&apt-get upgrade -y
apt-get install vim p7zip-full tmux rcconf mercurial zip unzip python-setuptools -y
cd /dev/shm
echo "PLease input your bitbucket username\n"
read USERNAME
echo "PLease input your bitbucket password\n"
read PASSWD
hg clone https://$USERNAME:[email protected]/lerry/42btc_config
cd 42btc_config
cp files/sources.list /etc/apt/sources.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add -
apt-get update
apt-get remove nginx nginx-common nginx-full -y
apt-get install nginx redis-server -y
cp files/nginx.conf /etc/nginx/nginx.conf
cp redis_slave.conf /etc/redis/redis.conf
useradd -m work
cp files/GeoIP.dat /home/work/
cp -r 42btc/ /home/work/42btc
/etc/init.d/nginx restart
/etc/init.d/redis-server restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment