Introduction
Lab Procedure
Prerequisites
- Open an SSH console to your Linux system using the PuTTY software, login with your standard user account
Set a static IP
- using your text editor of choice, open up the file /etc/network/interfaces
- Notice how it is currently set to dhcp for the eth0 interface.
- To set a static IP, you will need to change iface eth0 inet dhcp to iface eth0 inet static.
- Now, under the iface line you just edited, you will need to enter the address, netmask, and gateway for the static network.
- Reminder: it is common practice to indent (tab) static network configuration information in the interfaces file.
- Your configuration should be similar to this:
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
- Now save the file, and exit your file editor.
- Now we are going to apply the static IP change
- NOTE: You should only do network configuration changes when you have physical access to a machine. This way, if you mess up your configuration you will be able to fix it from a local console.
- Using the ifdown and ifup command, we are going to restart the network interface
- in a terminal, run ifdown eth0 && ifup eth0. Notice the two && symbols. This tells the linux shell that it should run the second command right after the first. If we do not define this, then we would be left with a machine that has its networking turned off.
- At this point, your machine should now be using a static address. Verify it is now applied using the ifconfig command.
Install PHP & MySQL
experiment with websites and databases
View Logfiles