Rob's web

Installing Linux

End of life

The co-founder of CentOS has started a new distro that we can use instead of CentOS. This is Rocky linux. This is also based on RedHat linux.

Rocky linux
VersionEnd of life date
821-05-2029
931-05-2032

Note: The partitioner is with multiple disks tricky to work with. You can only select the disk after you made the partition. So experiment with it until you find the solution you need.

IPv6

If you don't have a GUA for IPv6 you can forget the IPv6 settings or use an fd00::/64 address. You can work with IPv6 on the LAN.

Anaconda

Anaconda is the installation program used by Fedora, Red Hat Enterprise Linux and some other distributions.

During installation, a target computer's hardware is identified and configured and the appropriate file systems for the system's architecture are created. Finally, anaconda allows the user to install the operating system software on the target computer. Anaconda can also upgrade existing installations of earlier versions of the same distribution. After the installation is complete, you can reboot into your installed system and continue doing customization using the initial setup program.

Anaconda is a fairly sophisticated installer. It supports installation from local and remote sources such as CDs and DVDs, images stored on a hard drive, NFS, HTTP, and FTP. Installation can be scripted with kickstart to provide a fully unattended installation that can be duplicated on scores of machines. It can also be run over VNC on headless machines. A variety of advanced storage devices including LVM, RAID, iSCSI, and multipath are supported from the partitioning program. Anaconda provides advanced debugging features such as remote logging, access to the python interactive debugger, and remote saving of exception dumps.

If you use nano editor change vi into nano.

Steps

  1. Download your installation distro. You can use the minimal version which is for servers. Additional packages are downloaded when you install them. You can find the latest Rocky linux 9.x for x86_64 on the download pages.
  2. Write the iso file to an USB-drive. If you have an working linux system use: dd if="xxx.iso" of="/dev/sd<USB-drive>". On windows you can use Rufus. Better is to make an ventoy usb-drive and copy the iso to it.
  3. Read the release notes.
  4. Read the documents for installation information.
  5. If you use multiple harddisks make a partitionplan.
  6. The machine must boot from USB-drive as first choice and HDD as second. Check your BIOS setup. You can also use the F12 bootmanger to start the USB-drive.
  7. Connect the USB to your machine and reboot.
  8. If you want you can test the install medium first, else start the installation direct. Choose GRUB2 startup.
  9. In the setup pages set the options you want.
    1. Select the language you want to use.
    2. Install options:
      • Select you timezone.
      • Select keyboard.
      • Select minimal install.
      • Partition your drives as needed. You can use physical partitions or LVM if you want.
      • Setup the network for IPv4 and IPv6 with fixed IP addresses.
      • Set the root password.
    3. If all is set as you want, start the installation. All data on the disk(s) are now removed en new is writen.
  10. Reboot the system after install, login as root
  11. Run df -h and see of all the partitions are as you intended. If not redo the installation. You have to remove all partitions and make them again. Restart from 7.
  12. Check the configuration of the system.
    1. # ping 192.168.1.
      # ping -4 www.google.com
      # ping -6 www.google.com
      
    2. Check and configure the firewall for IPv4 and IPv6. At this point only the SSH-port, 22, should be open. You can use an Net Analyzer on android and scan the ports of the server.
    3. Test with an ssh on a external host if you can connect to ssh-server by IPv4 and IPv6.
    4. Only when the above works you can proceed with the rest. You can now start working via SSH access.
  13. # dnf -y update
    # dnf install dnf-utils epel-release
    # dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm
    # dnf config-manager --set-enabled epel
    # dnf config-manager --set-enabled plus
    # dnf config-manager --set-enabled crb
    # dnf install telnet	// This is the telnet client we need for testing.
    # dnf install curl wget tar tree dnf-automatic testssl pinentry net-tools
    
  14. Do the to-do list
  15. Install the rest of the deamons, configure and test them one at a time. Never install Telnet server and keep port 23 closed in all firewalls. Do server maintenance via an SSH-terminal. Install PuTTY on windows machines. If you need telnet for old hardware you can use PuTTY in telnet mode. On linux workstions you can use ssh.
  16. Configure authentication service if you need one (sssd).
  17. Add users and optional extra groups.
  18. If you have an older linux-server
    1. Copy the scripts you made for it to your new server and rewrite parts that are server depandent.
    2. Copy data from old server to the new server.
  19. Set port forwarding in your router to the new server.
  20. Set the DNS settings at your domain provider. Only needed for the IPv6 address.
  21. Test your webserver from an smart-phone thats not connected to your LAN, thus via G4, G5.
  22. Test ftp, email.

TO DO after installation and update and before item 15

We have some things to do.

# cd /etc/default
# vi useradd
CREATE_MAIL_SPOOL=no	// Is not used.

# cd /etc/dnf
# vi dnf.conf
installonly_limit=5	// Give 4 kernels to fallback to.

# cd
# vi .bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias l.='ls -ld .* --color=auto'	// Shows hidden directories and files
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias lz='ls -lZ --color=auto'		// Shows selinux settings

# 

Continue with item 15.

Adding some extras

# dnf install mc	// Midnight commander, a Norton commander clone.
# dnf install tio	// Terminal for ttySx connections.
# dnf install traceroute	// Display the route.
# dnf groupinstall "Development Tools"	// Optional

Links