Reboot machine;
Press ‘Esc’ to get to the GRUB menu;
Select the image;
Press ‘e’ to edit;
Change the kernel line from ‘ro’ to ‘rw init=/bin/bash’
From:
To:
Press ‘ctrl+x’ to boot;
From the bash shell:
passwd <username>
See the previous post about install and configure apache2 with multiplue hosts
Download and unzip wordpress:
cd /srv/www/brianwilliams.pro
sudo wget http://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz
sudo mv wordpress/* .
sudo rm -r wordpress
sudo chown -R www-data /srv/www/brianwilliams.pro
cd /srv/www/allaboutyoushelby.com
sudo wget http://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz
sudo mv wordpress/* .
sudo rm -r wordpress
sudo chown -R www-data /srv/www/allaboutyoushelby.com
Configure mysql:
mysql -u root -p
create database brianwilliamspro;
create database allaboutyoushelbycom;
create user wordpressuser;
set password for wordpressuser = password(“wppassword”);
grant all privileges on brianwilliamspro.* to wordpressuser@localhost identified by ‘wppassword’;
grant all privileges on allaboutyoushelbycom.* to wordpressuser@localhost identified by ‘wppassword’;
flush privileges;
exit
Assuming Apache mod_rewrite module is enabled:
sudo a2enmod rewrite
Create the needed website directories:
mkdir /var/www/brianwilliams.pro
mkdir /var/www/allaboutyoushelby.com
Configure Apache:
sudo vi /etc/apache2/sites-available/brianwilliams.pro
<VirtualHost *:80>
DocumentRoot /var/www/brianwilliams.pro
ServerName www.brianwilliams.pro
ServerAlias brianwilliams.pro
</VirtualHost>
sudo vi /etc/apache2/sites-available/allaboutyoushelby.com
<VirtualHost *:80>
DocumentRoot /var/www/allaboutyoushelby.com
ServerName www.allaboutyoushelby.com
ServerAlias allaboutyoushelby.com
</VirtualHost>
Enable the sites in Apache:
cd /etc/apache2/sites-available
sudo a2ensite brianwilliams.pro
sudo a2ensite allaboutyoushelby.com
Restart Apache:
sudo service apache2 restart
Open the network interfaces file:
sudo vi /etc/network/interfaces
DHCP configuration:
auto eth0
iface eth0 inet dhcp
Static configuration:
auto eth0
iface eth0 inet static
address 192.168.20.56
netmask 255.255.255.0
network 192.168.20.0
broadcast 192.168.20.255
gateway 192.168.20.1
dns-nameserver 8.8.8.8 8.8.4.4
Restart the networking service:
sudo /etc/init.d/networking restart