Insert your Ubuntu install CD into your system and boot from it.
If you've selected an uncommon combination of language and location (like English as the language and Germany as the location), the installer might tell you that there is no locale defined for this combination; in this case you have to select the locale manually, such as en_US.UTF-8.
IMPORTANT: Do not use the user name admin as it is a reserved name on Ubuntu 14.04.
If you used a very weak password that consists of less than 8 characters you will be prompted whether you actually do want to use this weak password. As we want a very secure server, select "No" and re-enter a much stronger password.
The system will try to get the time from a network time server. This may take a time, and the system may not be successful in doing this, as it might not have external internet access. Ignore the error.
Note that if you select any one of the “Guided” options for LVM configuration, all the available disk space will be used up, leaving you no free space to grow any logical volume if or when the need arises. Ultimately, our goal is to use just enough space to get the system up and running, and leave the rest for when we need to grow logical volumes.
This is usually the option right in the middle, such as SCSI1 (0, 0, 0) (sda).
WARNING: If you do select "Yes", then this will delete any existing partitions, so ALL data will be lost.
Recent versions of Linux and Ubuntu do support having the /boot volume within the LVM. See Grub2.
However, this sometimes still causes issues, especially after updates, so the instructions we use is to put the boot partition into a non-LVM partition.
Before pressing Enter, make a note of the LV name being worked on.
This can be seen in the line above, for instance LV backup refers to the backup partition.
For the swap partition use the swap area file-system type.
For cases where the mount point is not one of / (root), /tmp, /usr, /var, /srv, /opt, /home select the Enter manually option.
So, for the backup partition, simply use /backup as the manually entered name.
Same for the sharewiz partition, simply use /sharewiz as the manually entered name.
The ALT-F4 key combination can be used to monitor what is actually happening with the install process.
Use the ALT-F1 key combination to return back to the normal install screen.
The system will probably seem to pause for a long time (due to the fact that it cannot yet get external internet access). This is optional, but to speed up the install a bit, press Enter to cancel current step – and the graph should jump to around 80% completed. Enter can be pressed once more to skip to the end of this step).
A choice of different types of server servers can be selected, but nevertheless don't select any of them now in order to have full control over what gets installed on the system. The packages required on the system will be manually installed later on. The only item to select here is OpenSSH server so that one can immediately connect to the system with an SSH client such as PuTTY after the installation has finished.
Login with your previously created Administrator's username and password (e.g.
Because we must run all the next steps from this document with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing:
...and entering the Administrator's password, adminpass.
IMPORTANT: If this is done, then remember to remove the sudo command from the front of any future issued command.
IMPORTANT: Do not use the following command:
and do not enable the root login by running:
and giving root a password.
With these options one can log in as the root user, but this is frowned upon by the Ubuntu developers and community for various reasons.
If for some reason the root account has been enabled then disable it again, issuing the following command:
Because the Ubuntu installer has configured the system to get its network settings via DHCP, we have to change that now because a server should have a static IP address.
Change the following entry iface eth0 inet dhcp in the network interfaces file.
Issue the following command:
and edit the file as follows:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary WAN interface
auto eth0
iface eth0 inet static
address 192.168.0.11
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
# The primary LAN interface
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
You cannot edit /etc/resolv.conf directly anymore, but have to specify your nameservers in your network configuration. Use the command man resolvconf to find out more.
You may need to manually remove the DHCP record (lease) associated to this Ubuntu server from your DHCP server so the correct IP can be found by other machines on the network.
You might also need to manually add a HOST(A) record to your DNS server (for server1.sharewiz.net).
By the way, 8.8.8.8 and 8.8.4.4 are Google's DNS servers. 208.67.222.222 and 208.67.220.220 could also be used. They are the OpenDNS DNS servers.
Lines beginning with the word auto are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) Physical interface names should follow the word auto on the same line.
Issue the following command:
and then:
...and uncomment the line:
net.ipv4.ip_forward=1
To uncomment the line, simply remove the hash mark # from the front of the line.
IP forwarding essentially turns your server into a router, and can be used as the server has multiple Network Interfaces (NICs).
It allows traffic from the internal network to be routed through the external network and vice-versa.
If traffic comes in on one network interface that matches a subnet of another network interface, that traffic will be forwarded to the other network interface.
If using IPv6, then also uncomment the line: net.ipv6.conf.all.forwarding=1
IMPORTANT: When doing routing, security is a very important consideration. It is essential that firewalling and security measures are in place. These requirements will be covered through instructions later on in this setup guide.
Issue the following command:
sysctl is used to modify kernel parameters at runtime.
To enable the new settings to be recognized, the network needs to be restarted.
Issue the following command:
If this fails to restart the network then try using this command instead: sudo /etc/init.d/networking restart.
An error message such as this might be displayed, but can be ignored:
ERROR: Calling a sysvinit script on a system using upstart isn't supported. Please use the 'service' command instead.
Issue the following command:
...which should show something like:
eth0: no autonegotiation, 1000baseT-FD flow-control, link ok
eth1: no autonegotiation, 1000baseT-FD flow-control, link ok
Ensure that all interfaces are shown. If not then revisit the above config changes around the network.
In the example output above, we can see that both eth0 and eth1 have been picked up, so all well.
Edit the /etc/hosts file.
Issue the following command:
and edit the file as follows:
127.0.0.1 localhost.localdomain localhost
192.168.0.11 server1.sharewiz.net server1
192.168.1.1 server1.sharewiz.local server1.local
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Issue the following command:
and make sure the settings are correct.
If it's working then eth0 should show the IP Address 192.168.0.11.
eth1 should also show the IP Address 192.168.1.1.
One of the lines for each NIC should show UP BROADCAST RUNNING MULTICAST.
Issue the following command:
and make sure this is working.
If it's working then multiple lines should start with something like 64 bytes from....
Press CTRL-C to cancel the pinging.
Issue the following command:
To enable the new hostname settings to be recognized, restart the system.
Issue the following command:
Once the system is rebooted simply login again and issue the sudo -i command to continue implementing the system.
To enable the new network settings to be recognized, restart the system.
Issue the following commands:
sudo hostname
and
sudo hostname -f
Both should show server1.sharewiz.net now.
It is better using Putty to connect to the system than directly logging into the console.
Putty is not only usually quicker, but it also allows for scrolling and copying of text.
It also allows commands to be pasted in, which could be copied from these directions.
Start Putty.
Type the following and click the save button:
Host Name: server1 (or the IP Address 192.168.0.11)
Port: 22
Connection Type: SSH
Saved Sessions: server1.sharewiz.net
Double-click on the server1.sharewiz.net session and it will connect to your server.
The first time you connect to the server with Putty you will be shown a Putty Security Alert about the Server's host key not being cached.
Select "Yes" to this alert.
Copyright ShareWiz by Peter Roux