Setup Ubuntu 12.10 x64 web server w/virtual hosting and mysql

SSH into the server as root
or If using a user account then prepend sudo to each of these commands.

Remove Samba if needed

apt-get purge samba -y

Update Server

apt-get update && apt-get upgrade -y

Install Dependencies

apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python nano php5 libapache2-mod-php5 php5-mcrypt

Download Webmin if needed

wget -O webmin_1.660_all.deb

Install Webmin

dpkg -i webmin_1.660_all.deb

MySql/PHP Install

apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql -y

Apache2 enable Mod-Rewrite

a2enmod rewrite

Then restart apache2

service apache2 restart

PHPMyadmin installation if needed.

apt-get install phpmyadmin

Create the WordPress Database and User

mysql -u root -p
CREATE USER wordpressuser@localhost;
SET PASSWORD FOR wordpressuser@localhost= PASSWORD(“password”);
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY ‘password’;

Tar Commands

untar command = tar -xvzf filename.tar or filename.tar.gz (if gzipped)

tar command = tar -ztvf /folder filename.tar or filename.tar.gz (if you want to gzip the file)