Skip to content

Instantly share code, notes, and snippets.

@kapitanluffy
Last active December 17, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapitanluffy/5564541 to your computer and use it in GitHub Desktop.
Save kapitanluffy/5564541 to your computer and use it in GitHub Desktop.
simple script for prepping an ubuntu development server
#!/bin/bash
# update and upgrade packages
apt-get -y update
apt-get -y upgrade
# install openssh server for remote administration
apt-get -y install openssh-server
# install misc #1
apt-get -y install build-essential
apt-get -y install curl
apt-get -y install gnupg
apt-get -y install vim
# install git
apt-get -y install git
git config --global user.name "Kapitanluffy Pirata"
git config --global user.email "kapitanluffy@gmail.com"
# install apache2
apt-get -y install apache2
a2enmod rewrite
service apache2 restart
# install php
apt-get -y install php5 libapache2-mod-php5 php5-cli php5-cgi php5-curl
apt-get -y install php5-sqlite sqlite3 libsqlite3-dev
# install mysql
apt-get -y install mysql-server libapache2-mod-auth-mysql php5-mysql
# install ruby
apt-get -y install ruby1.9.1 ruby1.9.1-dev
# secure mysql
/usr/bin/mysql_secure_installation
# install tools for administration
# install phpmyadmin
apt-get -y install phpmyadmin
# install webmin
wget http://www.webmin.com/download/webmin-current.tar.gz
tar -zxvf webmin-current.tar.gz
webmin-1.620/setup.sh /usr/local/webmin
# install virtualbox guest additions (if running virtual machine)
apt-get -y install virtualbox-guest-additions
apt-get -y install virtualbox-guest-dkms
# create wwwman (password: namwww)
useradd -s /bin/bash -m -G www-data wwwman
passwd wwwman
adduser wwwman sudo
# own /var/www directory
chown -R wwwman:www-data /var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment