Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created June 18, 2012 02:27
Show Gist options
  • Save xeoncross/2946480 to your computer and use it in GitHub Desktop.
Save xeoncross/2946480 to your computer and use it in GitHub Desktop.
Simple VPS setup install process
After login as root...
# Create a new user
adduser demo
# Should only belong to the [username] group
groups demo
# Add demo to the sudo group
usermod -a -G sudo demo
# Copy your ssh-key to the ssh keys of this new user so we can start logging in as them
ssh-copy-id -i ~/.ssh/id_rsa.pub demo@192.1.1.1
# Install Git so we can install our server
apt-get install git
# Download the script
git clone git://github.com/Xeoncross/lowendscript.git /root/git/
# Setup locals
dpkg-reconfigure locales
# Run it
cd /root/git
./setup-debian.sh dotdeb
./setup-debian.sh system
./setup-debian.sh dropbear 22
./setup-debian.sh iptables 22
./setup-debian.sh nginx
./setup-debian.sh php
./setup-debian.sh mysql
# Now create a site
./setup-debian.sh site example.com
# You can push a folder from your computer now
sudo rsync -av --stats --progress --rsh='ssh -p22' ./ demo@192.1.1.1:~/foldername
cp -R foldername /var/www/example.com/public
rm foldername
# Or use git to checkout something
cd /var/www/example.com/public
git clone [URL] ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment