قالب وردپرس درنا توس
Home / How To / How to install Ubuntu 20.04 LTS (Focal Fossa) server

How to install Ubuntu 20.04 LTS (Focal Fossa) server



This tutorial shows the installation of a Ubuntu 20.04 LTS bass server in detail with many screenshots. The purpose of the guide is to show the installation of Ubuntu 20.04 LTS which can be used as a base for our other Ubuntu tutorials here at howtoforge as our perfect server guides. This tutorial uses the LTS branch that receives updates for 5 years from Ubuntu and is recommended for use on servers.

first Requirements

To install an Ubuntu Server, you need the following prerequisites:

2. Preliminary Note

In this tutorial I use the host name server1.example.com with the IP address 192.168.0.100 and gateway 192.168.0.1 These settings may differ take care of you, so you have to replace them where appropriate.

3rd Installing Ubuntu 20.04 Base System

Insert Ubuntu install CD / DVD / USB stick into your system and boot from it. When you install the operating system on a virtual machine like I do here, you should be able to select the downloaded ISO file as a source for the CD / DVD drive in VMWare and Virtualbox without first burning it to CD. Boot the server or virtual machine, it boots the system and launches the installer.

The first screen of the Ubuntu installer shows the language selector. Select your language for the installation process:

On the next screen, you can select the keyboard layout. The English keyboard will be good for many users. In this case, select "Done" at the end of the screen and press "Return" to go to the next step. In my case, I use a German keyboard layout, which means I have to navigate to the "Layout" option by pressing the "Tab" button on my keyboard until the Layout option is highlighted. Then press the "Return" button to open the layout selector.

Select the keyboard layout that matches the keyboard connected to the server.

The right keyboard layout for my installation is now selected. Select "Done" at the end of the screen and press "Return" to go to the next step.

The Ubuntu installer now shows which network card it has detected on the server. The network device name that was automatically assigned is even33. The IPv4 address has been assigned automatically via DHCP. I will change it later to a fixed IP address when the base system is installed. If your network does not have a DHCP server, you can now enter a fixed IP address by selecting the network adapter (press Tab until it is highlighted, and then press Enter).

You can now set a proxy server address in case a proxy is required to access the Internet. In my case, no proxy is required, so I just select "Done" to go to the next installation step.

Here you can choose from which Ubuntu mirror server updates and installation files to download. I keep the standard and go to the next installation screen.

The Ubuntu server installation program now displays the hard drives that it has detected on the server. The installation disk is a 40 GB HD on / dev / sda here. I choose to use the entire disk for my Ubuntu installation. If you need a custom layout that consists of multiple partitions, select "Custom layout" and create partitions as needed.

The installer shows the default storage configuration below. It consists of a 1MB bios_grub partition plus a large / partition containing the operating system installation. Select "Done" to advance to the next screen.

Before the installation starts, the Ubuntu installer requests to confirm the partitioning. Press the "Tab" until the "Continue" option is highlighted in red, then press "Return" to continue.

Ads

Now it is time to set the server name (host name) and username and password for administrator. I choose the username "administrator" here as an example, use a different and more secure name in your real installation. The Ubuntu shell user we create in this step has sudo permissions, which means he can administer the system and become root users via sudo.

Most Linux servers are managed over the network with SSH. In this step, the Ubuntu installer can install the SSH server directly. Select the "Install OpenSSH Server" checkbox and proceed to the next step.

In this step you can pre-install regular services via Snap installer. I choose no services here because the purpose of this guide is to install a minimal base system. You can install services via apt or snap at any time later.

The Ubuntu installer now continues the installation based on the settings we have selected.

The Ubuntu installation has been completed. Select "Restart" to start the server in the newly installed Ubuntu 20.04 system.

Advertising Services

The basic installation is now complete. In the next chapter, I will explain the configuration of the static network address and install a scale-based text editor for editing configuration files.

4th First login

Now log on to the shell (or remotely SSH) on the server that uses "administrator". The username may vary if you have chosen a different name during installation.

Logged in to Ubuntu 20.04 Server.

5th Download Root Permissions

After restarting, you can log in with your previously created username (eg administrator ). Since we have to run all the steps from this tutorial with root privileges, we can either depend on all the commands in this tutorial with the string sudo or we become root right now by writing:

  sudo -s [19659035] You can enable root login by running: 

  sudo passwd root 

And give root a password. You can then log in directly as root, but the Ubuntu developers and the community have this for various reasons. See https://help.ubuntu.com/community/RootSudo.)vud19659038??6. Installing the SSH Server (Optional)

If you did not choose to install the OpenSSH server during the system installation above, you can do so now:

  sudo apt-get -y install ssh openssh-server 

From now you can use an SSH client such as PuTTY and connect from your workstation to your Ubuntu 20.04 (Focal Fosset) server.

7th Installing a scale-based editor (Optional)

Here we install two text-based editors. The nano editor is easier to use for beginners while others prefer the traditional vi / vim editor. The standard program vi has some strange behavior on Ubuntu and Debian; to fix this we install vim-nox :

  sudo apt-get -y install nano vim-nox 

8. Configuring the Network

Since the Ubuntu installer has configured our system to get its network settings via DHCP, we can change it now because a server must have a static IP address. If you want to keep the DHCP-based network configuration, skip this chapter. In Ubuntu 20.04, the network is configured with Netplan and the configuration file is /etc/netplan/01-netcfg.yaml . The traditional network configuration file / etc / network / interface is no longer used. Edit /etc/netplan/00-installer-config.yaml and adjust it to your needs (in this example I will use the IP address 192.168.0.100 and the DNS servers 8.8.4.4, 8.8.8.8 .

Open the network configuration file with nano:

  sudo nano /etc/netplan/00-installer-config.yaml 12719659035 This server is using DHCP directly after installation; the interface file will look like this: 

  # This is the network configuration written by & # 39; subiquity & # 39; 
network:
ethernet:
ens33:
dhcp4: true
version: 2

To use a static IP address 192.168.0.100, I will change the file to look like it afterwards:

  # This file describes the network interfaces available on your system 
# For more information, see grid plan (5).
network:
version: 2
renderer: networkd
ethernet:
ens33:
dhcp4: no
dhcp6: no
addresses: [192.168.0.100/24]
gateway4: 192.168.0.1
name servers:
addresses: [8.8.8.8,8.8.4.4]

IMPORTANT : The indentation of the lines means, add the lines shown above.

Then restart your network to apply the changes:

  sudo netplan generate 
sudo netplan Apply

Then edit / etc / hosts .

  sudo nano / etc / hosts 

Here's how:

  127.0.0.1 localhost 
192.168.1.100 server1.example.com server1

# The following rows are desirable for IPv6 capable hosts
:: 1 localhost ip6-localhost ip6 loopback
ff02 :: 1 ip6 allnodes
ff02 :: 2 ip6 all routers

Now we will change the host name of our machine as follows:

  sudo echo server1> / etc / hostname 
sudo hostname server1

The first command sets the host name "server1" in / etc / hostname file . This file is read by the system at startup time. The second command sets the host name in the current session so that we do not have to restart the server to apply the host name.

As an alternative to the two commands above, you can use the hostnameectl command which is part of the systemd package. Ads

  sudo hostnamectl set-hostname server1 

Then run:

  hostname 
hostname -f [19659035] The first command returns the short hostname while the second command displays the fully qualified domain name (fqdn):

  [email protected]: / home / administrator # hostname 
server1
[email protected]: / home / administrator # hostname - f
server1.example.com
[email protected]: / home / administrator #

To adjust the server's keyboard layout, run this command:

  sudo dpkg-reconfigure keyboard-configuration 

Congratulations! Now we have a basic Ubuntu 20.04 server set that provides a solid foundation for all types of Ubuntu Server settings.

ninth Virtual Machine image

This tutorial is available as a ready-to-use virtual machine in OVA / OVF format for Howtoforge subscribers. The VM format is compatible with VMWare and Virtualbox and other tools that can import the egg or ovf format. You will find the download link on the right menu near the top. Click the file name to start the download.

The login information for the World Cup is:

SSH login

Username: administrator
Password: howtoforge

The administrator user has sudo privileges.

Please change password after first start.

VM is configured for static IP 192.168.0.100, IP can be changed in file / etc / netplan / 00 -installer-config.yaml displayed in lesson step 8. Keyboard layout for the downloadable World Cup is the American keyboard layout.

Ubuntu: http://www.ubuntu.com/strong19659093]

Source link