Basic Linux Installation Guide: Difference between revisions

From The Maceys in California
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Before We Begin=
There are lots of Unix distributions that are available. The all start with the same basic parts and then create distributions that tend to focus on a particular audience. Some are seriously minimal others are more comprehensive. The first separation is Redhat vs Debian variants. Pick one. They each have a specific way of doing things. This is more important when administering rather than just using. The examples below are all Debian based. Next is the desktop. This obviously doesn't matter if the system is a server version. The two big ones are KDE and Gnome. I tend to prefer KDE but can easily use either.
My current choices are Ubuntu for the VMs and Kubuntu or Zorin the physical one.
=Installing Linux systems=
=Installing Linux systems=
The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built from. The process is similar doing it on a physical machine as it is on a VM. There
The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built on to. The process is similar doing it on a physical machine as it is on a VM.  
==Create a Bootable USB key==
==Setup a Bootable USB key==
If you are installing on a VM, skip on down.
If you are installing on a VM, skip on down.


==Or Create a VM from the Proxmox Console==
Look to see if the desired distribution has been loaded onto the Ventoy USB key.
Pretty much stick to the defaults. Make sure to create the disk on fast1, fast2 or fast3. The distribution ISO files are on local (pve). The current usual candidate is Kubuntu 26.04, but other distributions are available and loaded in the library.
 
If not download from a reputable source and copy it to the key.
{{note|The Ventoy key will mount as two drives on Windows. Ignore the boot partition and copy the distribution to the other once}}


If a distribution that is not currently available is wanted, select local (pve) from the left panel, click on ISO Images and the upload. This will load an image from the local machine to the pve system.
Boot the machine from the key.


A minimal install will work on server VMs. The complete set of tools that comes with the full distribution is not needed. It is nice to have a desktop display that can be run from the console, however.
==Or Create a VM from the Proxmox Console==
If you are not creating a VM skip on down.
===Connect to PVE and verify distro===
Open the Proxmox GUI: [http://pve.lan:8006 http://pve.lan:8006]


Click on Create VM on the upper right to start the process. Proxmox will assign a number, or you can assign one that is not currently in use. Pick a memorable name based on use. I use the distro name if I am testing. Pick  volume that has sufficient space to hold the vdisk.  
Before creating the VM make sure that the desired distribution in in the ISO library. Select pve on the leftmost menu panel. This will display all of the VMs and storage objects. Select local(pve). Select ISO images to display the ISO library. If the desired image is there, continue to create a VM. If not select local (pve) from the left panel, click on ISO Images and the upload. Select the distribution ISO image from the local machine to upload to the library.
===Create the VM===
Click on the Create VM button on the upper right.


The only configuration that is normally needed is to set the number of cores to be assigned. and the size to allocate for memory.
The system will present a sequenced system definition.
General - The defaults are fine. Change the ID if desired.
OS - The defaults are correct. Pick the distribution in the highlighted box.
System - The defaults are fine. Change the Graphics card to one of the VirtIO to experiment.
Disks - The choices are fast1, fast2 and fast3. They are about the same except for space. This is root disk for the install. 50-100GB are good choices.
CPU - 1 socket and set the cores appropriately. 2 or 4 is typical. Scroll to the bottom of Type and select host.
Memory - Depends on the task. 2048, 4096 and 8192 are two, four and eight GB.
Network - Defaults are fine.
Confirm - Review, select Start on create box and click Finish.
The system will create the VM and start it up. Select the machine ID on the left panel and then go to the console for it.


The system will boot after confirmation. Go to the console for the machine to continue the installation of the OS.
===Install the OS Distribution===
A minimal install will work on server VMs. The complete set of tools that comes with the full distribution are not needed. It is nice to have a desktop display that can be run from the console, however. All of the Debian variants, including Ubuntu, Kubuntu and Zorin, run through the same basic steps to install


==Install the Linux Disro==
This is pretty much a case of answer obvious questions and then waiting for the install to complete.
This is pretty much a case of answer obvious questions and then waiting for the install to complete.


Line 34: Line 55:
  Proxmox takes care to boot from the drive rather than the virtual CD: Done
  Proxmox takes care to boot from the drive rather than the virtual CD: Done


The Kubuntu splash screen will appear and move on to configuring the system.
The splash screen will appear and move on to configuring the system.
 
{{note|The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though. DO NOT install with the ZFS option}}
The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though.
{{note|Kubuntu appears to stall at about 90%, but it is working fine.}}
 
{{note|Zorin on my workstation completed with an error. It booted fine though.}}
{{note | If you are installing Ubuntu DO NOT install with the ZFS option}}


=After Installation Actions=
=After Installation Actions=
==First Things First==
===Get the System Up To Date===
===Get the System Up To Date===
In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.
In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.
Line 59: Line 78:
</syntaxhighlight>
</syntaxhighlight>
Open URL from a web browser:
Open URL from a web browser:
<syntaxhighlight lang="shell">
<syntaxhighlight>
  https://<ip address>:9090
  http://<ip address>:9090 or http://localhost:9090
</syntaxhighlight>
</syntaxhighlight>
Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Change the network connection information and verify that the  DNS server is set to 192.168.86.2
Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Assign a fixed IP address. By convention, the main servers are below 30. The thirties are VMs. The fifties are the Raspbery Pi systems. The seventies are physical workstations.
 
Disable IPv6 and verify that the  DNS server is set to 192.168.86.2
====See Also====
====See Also====
[https://www.linode.com/docs/ Cockpit Reference]
[https://www.linode.com/docs/ Cockpit Reference]
Line 68: Line 89:
{{todo | Add the connection information to the Start.me section for connections}}
{{todo | Add the connection information to the Start.me section for connections}}


==Install and Configure sshd (Minimal Install only)==
==Install and Configure sshd==
{{note | With Kubunto user the local Konsole window as ssh is quite broken. The ssh server is still needed}}
The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.
The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.
<syntaxhighlight lang="shell" line>
<syntaxhighlight lang="shell" line>
Line 76: Line 96:
</syntaxhighlight>
</syntaxhighlight>
Input your password if prompted.
Input your password if prompted.
{{note | With Kubunto user the local Konsole window as ssh is quite broken}}
{{note | Kubuntu has problems with cut and paste in terminal windows}}


==Continue configuring the system from an ssh terminal session==
==On Ubuntu continue configuring the system from an ssh terminal session==
{{note | With Kubuntu and Zorin skip this section}}
===Install Putty===  
===Install Putty===  
Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.
Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.
Line 92: Line 113:


Login using the credentials that you entered during the install. Now you can cut and paste.
Login using the credentials that you entered during the install. Now you can cut and paste.
==Terminal Access using Kubuntu==
If you have installed on a desktop it is easy to use the Konsole application.
Just a reminder. Multi line pastes fail when entering commands.
== Fix sudo to not prompt for password==
== Fix sudo to not prompt for password==
As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.  
As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.  


{{highlight|Do this as login user, NOT root.}}
{{note | {{highlight|Do this as login user, NOT root.}} }}


Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.
Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.
For the putty in Kubuntu, pasting commands into the session fails.
<syntaxhighlight lang="shell" line>
cat > ${USER} <<EOF
${USER}    ALL=(ALL) NOPASSWD:ALL
EOF
chmod 440 ${USER}
sudo chown 0:0 ${USER}
</syntaxhighlight>
<syntaxhighlight lang="shell">
<syntaxhighlight lang="shell">
echo "${USER}    ALL=(ALL) NOPASSWD:ALL">${USER};chmod 400 ${USER};sudo chown 0:0 ${USER}
sudo mv ${USER} /etc/sudoers.d/${USER}
sudo mv ${USER} /etc/sudoers.d/${USER}
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 19:51, 25 August 2026

Before We Begin

There are lots of Unix distributions that are available. The all start with the same basic parts and then create distributions that tend to focus on a particular audience. Some are seriously minimal others are more comprehensive. The first separation is Redhat vs Debian variants. Pick one. They each have a specific way of doing things. This is more important when administering rather than just using. The examples below are all Debian based. Next is the desktop. This obviously doesn't matter if the system is a server version. The two big ones are KDE and Gnome. I tend to prefer KDE but can easily use either.

My current choices are Ubuntu for the VMs and Kubuntu or Zorin the physical one.

Installing Linux systems

The installation process for both the desktop physical machines and Linux VMs is pretty straight forward. The idea is to get a vanilla basic installation that can be built on to. The process is similar doing it on a physical machine as it is on a VM.

Setup a Bootable USB key

If you are installing on a VM, skip on down.

Look to see if the desired distribution has been loaded onto the Ventoy USB key.

If not download from a reputable source and copy it to the key.

Note: The Ventoy key will mount as two drives on Windows. Ignore the boot partition and copy the distribution to the other once

Boot the machine from the key.

Or Create a VM from the Proxmox Console

If you are not creating a VM skip on down.

Connect to PVE and verify distro

Open the Proxmox GUI: http://pve.lan:8006

Before creating the VM make sure that the desired distribution in in the ISO library. Select pve on the leftmost menu panel. This will display all of the VMs and storage objects. Select local(pve). Select ISO images to display the ISO library. If the desired image is there, continue to create a VM. If not select local (pve) from the left panel, click on ISO Images and the upload. Select the distribution ISO image from the local machine to upload to the library.

Create the VM

Click on the Create VM button on the upper right.

The system will present a sequenced system definition.

General - The defaults are fine. Change the ID if desired.
OS - The defaults are correct. Pick the distribution in the highlighted box.
System - The defaults are fine. Change the Graphics card to one of the VirtIO to experiment.
Disks - The choices are fast1, fast2 and fast3. They are about the same except for space. This is root disk for the install. 50-100GB are good choices.
CPU - 1 socket and set the cores appropriately. 2 or 4 is typical. Scroll to the bottom of Type and select host.
Memory - Depends on the task. 2048, 4096 and 8192 are two, four and eight GB.
Network - Defaults are fine.
Confirm - Review, select Start on create box and click Finish.

The system will create the VM and start it up. Select the machine ID on the left panel and then go to the console for it.

Install the OS Distribution

A minimal install will work on server VMs. The complete set of tools that comes with the full distribution are not needed. It is nice to have a desktop display that can be run from the console, however. All of the Debian variants, including Ubuntu, Kubuntu and Zorin, run through the same basic steps to install

This is pretty much a case of answer obvious questions and then waiting for the install to complete.

Installation screen: Next 
Timezone: Next unless you want the machine to be elsewhere
Keyboard: Next
Installation mode: Select full for a desktop, minimal for a server VM
  Select Download and install updates: Next
In partitions, the disk is already selected, select erase: Next
Set the user and machine information. Since we are all friends, click on Log oin automatically: Next
Review the confirmation page and fix if necessary: Install
There will be a popup confirming that the disk contents will be destroyed, but we don't care: Install now

Now you can go away for a while. Don't panic, the progress stalls at around 90% for a while but everything is working correctly.

After the install completes, the system will need to reboot. 
Proxmox takes care to boot from the drive rather than the virtual CD: Done

The splash screen will appear and move on to configuring the system.

Note: The process for installing native Ubuntu has a few more options, particularly on formatting the disk. The process is pretty much the same though. DO NOT install with the ZFS option
Note: Kubuntu appears to stall at about 90%, but it is working fine.
Note: Zorin on my workstation completed with an error. It booted fine though.

After Installation Actions

Get the System Up To Date

In spite of selecting to install updates during the main installation, the non-OS packages don't get this treatment in the full install. Regardless, this step is a good idea.

sudo apt update
sudo apt upgrade

Install and Open Cockpit

Cockpit is a very useful tool for viewing and modifying a number of system configuration pieces. All of these can be changed with the installed tools, but Cockpit is an easy way to do them in one place. The main screen also shows system activity.

By default, the system will be assigned a DHCP address.

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit

Open URL from a web browser:

 http://<ip address>:9090 or http://localhost:9090

Login with the user created on the install. After logging in, do a quick check, switch to administrative access and then open the terminal window. Assign a fixed IP address. By convention, the main servers are below 30. The thirties are VMs. The fifties are the Raspbery Pi systems. The seventies are physical workstations.

Disable IPv6 and verify that the DNS server is set to 192.168.86.2

See Also

Cockpit Reference Install Cockpit on Ubuntu

Todo: Add the connection information to the Start.me section for connections


Install and Configure sshd

The sshd server needs to be running so that you can login. This is required in order to cut and paste. This means that you need to type the commands manually.

sudo apt install openssh-server putty-tools -y
sudo systemctl start ssh

Input your password if prompted.

Note: Kubuntu has problems with cut and paste in terminal windows

On Ubuntu continue configuring the system from an ssh terminal session

Note: With Kubuntu and Zorin skip this section

Install Putty

Click on the Application Launcher. Search for the putty app. Click on the selection to connect to ssh servers. Click on install in the installation popup. Once installed, just click on launch. Enter localhost as the Host Name. Accept on the Security Alert popup.

Alternatively you can connect from another system, use:

ip a

to get the systems IP address to use in your local putty session. After entering the host, click on Open.

Initiate putty to continue

Accept on the Security Alert popup.

Login using the credentials that you entered during the install. Now you can cut and paste.

Terminal Access using Kubuntu

If you have installed on a desktop it is easy to use the Konsole application.

Just a reminder. Multi line pastes fail when entering commands.

Fix sudo to not prompt for password

As a person who has worked as the root user since the Unix days, I find being prompted for a password when using sudo to get admin privileges.

Note: Do this as login user, NOT root.

Create a file for the user in the /etc/sudoers.d directory and add the following line to it. ${USER} matches the user created during the install. This needs to be done by the ordinary user or the steps will create a sudoers.d file for root. Do in two steps because you will be asked to authenticate assuming that this is probably the first sudo command of the session.

echo "${USER}    ALL=(ALL) NOPASSWD:ALL">${USER};chmod 400 ${USER};sudo chown 0:0 ${USER}
sudo mv ${USER} /etc/sudoers.d/${USER}

Give yourself superuser privileges before you continue.

sudo /bin/bash