Difference between revisions of "Installation (Ubuntu)"

Jump to navigation Jump to search
1,307 bytes added ,  07:42, 8 October 2020
m
(→‎Change IP Address: Added "Additional IPs / Multihome")
 
(10 intermediate revisions by the same user not shown)
Line 87: Line 87:
=== Enable Root ===
=== Enable Root ===
# Use the command <code> sudo passwd root </code>
# Use the command <code> sudo passwd root </code>
# Enter your user password
# Enter a strong password for the root account
For Ubuntu 18...
# Use the command <code> sudo passwd</code>
# Enter your user password
# Enter your user password
# Enter a strong password for the root account
# Enter a strong password for the root account
Line 104: Line 109:
#* <code> mdadm --misc -D /dev/md1 </code>
#* <code> mdadm --misc -D /dev/md1 </code>


== Change IP Address ==
== Change IP Address (Pre v18) ==
=== v8 Hardy Heron / v10 Lucid Lynx ===
=== v8 Hardy Heron / v10 Lucid Lynx ===
* Edit the <code> /etc/network/interfaces </code> file in the following fashion to set static address details
* Edit the <code> /etc/network/interfaces </code> file in the following fashion to set static address details
Line 188: Line 193:


'''RTNETLINK answers: File exists''' - Note that you can't use the same default gateway twice, doing so will cause this error
'''RTNETLINK answers: File exists''' - Note that you can't use the same default gateway twice, doing so will cause this error
== Change IP Address (v18 onwards) ==
Ubuntu now uses [https://netplan.io Netplan], do not use the <code>/etc/network/interfaces</code> config file, use either <code>/etc/netplan/01-netcfg.yaml</code> or <code>/etc/netplan/50-cloud-init.yaml</code>. Formatting is very important with YAML files, indents especially.
# Find the interface name (eg <code>ens2</code>)
#* <code> ip link </code>
# Edit the <code>/etc/netplan/01-netcfg.yaml</code> config file as show below
# Apply the changes
#* <code> netplan apply</code>
<pre>
network:
  version: 2
  renderer: networkd
  ethernets:
    ens2:
      dhcp4: no
      addresses:
        - 192.168.1.50/24
      gateway4: 192.168.1.1
      nameservers:
          addresses: [192.168.1.1,8.8.8.8]
</pre>
=== Persistent Route ===
To add a persistent route to an interface, add using the following syntax (example sends traffic to 172.32.1.0/24 via eth1 to 192.168.2.100) to add the <code>routes</code> config to the interface the traffic should go through.
<pre>
    ens2:
      addresses:
        - 192.168.2.50/24
      dhcp4: no
      routes:
        - to: 172.32.1.0/24
          via: 192.168.2.100
</pre>


== Update the OS ==  
== Update the OS ==  
Line 202: Line 243:
#* <code>dpkg --get-selections | grep linux-image</code>
#* <code>dpkg --get-selections | grep linux-image</code>
# Remove unwanted versions (don't remove the current or base/unversioned image)
# Remove unwanted versions (don't remove the current or base/unversioned image)
#* EG <code>apt-get purge linux-image-3.2.0-32-virtual <code>
#* EG <code>apt-get purge linux-image-3.2.0-32-virtual </code>
#* If you've got lots to remove its easier to do lots in one go
#* If you've got lots to remove its easier to do lots in one go
#** EG <code> apt-get purge linux-image-3.2.0-51-virtual linux-image-3.2.0-52-virtual </code>
#** EG <code> apt-get purge linux-image-3.2.0-51-virtual linux-image-3.2.0-52-virtual </code>
Line 224: Line 265:
#* <code> server 3.europe.pool.ntp.org </code>
#* <code> server 3.europe.pool.ntp.org </code>
# Restart the NTP service
# Restart the NTP service
#* <code> service ntp restart </code>
#* <code> systemctl restart ntp </code>
# Verify using the following commands
# Verify using the following commands
#* <code> ntpq -np </code>
#* <code> ntpq -np </code>

Navigation menu