Connecting to a Linux Virtual Machine Over the Network
1. Stop virtual machine.
2. Highlight virtual machine and click settings in VirtualBox.
3. Nightwork adaptor needs to be Attached to Bridged Adapter, in case you are working on a home network.
4. check if a SSH Server is installed and running. To check this type
ps -ef | grep sshd. Check if it is installed
dpkg -l | grep ssh-server. Or
rpm -qa | grep ssh-server on a RedHat distribution.
On an Ubuntu system:
sudo apt-get update
sudo apt-get install openssh-server openssh-client
sudo service ssh start – To start running sshd.
On a RedHat based system:
sudo yum install openssh-server openssh-client
sudo service sshd start – To start running sshd.
Next, find the IP address:
Look at the inet line, could look like this:
inet 10.0.0.6/24 brd 10.0.0.255 scope global eth1
Now we can connect to the Virtual Machine with the IP address:
exit – To exit out of the virtual machine.
Use of putty on Windows machine:
Enter the IP address and click OPEN in the PuTTY graphical interface.
Installing Apache, MySQL, PHP, and WordPress on Ubuntu
Download the wordpress.tar.gz file.
Install the LAP stack. LAP stands for Linux, Apache, MySQL and PHP.
apt-cache search apache | less – Apache is the HTTP server.
sudo apt-get install apache2 mysql-server php5 php5-gd
mysql -uroot -p
create database WordPress; – Create database in MySql.
create wordpress@localhost identified by 'wppass'; – Create a user.
grant all privileges on wordpress.* to wordpress@localhost; – Give privileges.
Got to download directory where we downloaded WordPress:
tar zxvf wordpress.tar.gz – Extract contents of that file.
cp wp-config-sample.php wp-config.php – Copy wp-config-sample.php.
vi !$ – Edit wp-config-sample.php. !$ uses the file from the previous command.
In VI change name of database to wordpress, username also to wordpress, and the password to wppass. You can also use nano.