A General initial server setup for the LAMP stack on Debian
apt-get update && apt-get upgrade
adduser {username}
enter password
If required set root privileges for the user by running visudo then add the line username ALL=(ALL:ALL) ALL
You can then login as this user and get root privileges (remember to use sudo).
apt-get install apache2
apt-get install mysql-server
enter mysql password
mysql_secure_installation - n, y, y, y, y
apt-get install php5 php-pear php5-mysql phpmyadmin git-core libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential php5-curl git
apt-get update && apt-get upgrade
service apache2 restart
git config --global user.name "Dan Webb"
git config --global user.email d.c.webb1993@gmail.com
apt-get install language-pack-en
locale-gen en_GB.UTF-8
a2enmod rewrite
service apache2 restart
nano /etc/php5/apache2/php.ini
set short open tag to on by default - important for allspark apps
nano /etc/apache2/sites-available/default
set AllowOverride All on all /var/www to enable .htaccess files
service apache2 restart
remember to turn of root ssh access ----
you edit /etc/ssh/sshd_config and there is a line called PermitRootlogin or similar (very small file, easy to find)
just change yes to no, save and then do /etc/init.d/ssh restart