Basic Linux Installation Guide: Difference between revisions
Lynn Macey (talk | contribs) |
Lynn Macey (talk | contribs) |
||
| (47 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 | 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. | 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 | 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 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 | 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. | 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 | 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 | | |||
=After Installation Actions= | =After Installation Actions= | ||
===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 | <syntaxhighlight> | ||
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. | 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] | ||
[https://cockpit-project.org/running.html#ubuntu Install Cockpit on Ubuntu] | [https://cockpit-project.org/running.html#ubuntu Install Cockpit on Ubuntu] | ||
{{todo | Add the connection information to the Start.me section for connections}} | |||
==Install and Configure sshd== | |||
==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. | 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 74: | Line 95: | ||
sudo systemctl start ssh | sudo systemctl start ssh | ||
</syntaxhighlight> | </syntaxhighlight> | ||
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: | |||
<syntaxhighlight lang="shell" line> | |||
ip a | |||
</syntaxhighlight> | |||
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 | {{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. | |||
<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} | |||
</syntaxhighlight> | |||
Give yourself superuser privileges before you continue. | |||
<syntaxhighlight lang="shell"> | |||
sudo /bin/bash | |||
</syntaxhighlight> | |||
==[[Post Ubuntu Install]]== | ==[[Post Ubuntu Install]]== | ||
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.
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.
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:9090Login 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
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.
On Ubuntu continue configuring the system from an ssh terminal session
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.
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
