Rocky Linux Installation previously CentOS: Difference between revisions

mNo edit summary
Line 1: Line 1:
==General Notes (applies to various version of CentOS and Rocky Linux)==
==General Notes (applies to various version of CentOS and Rocky Linux, but modified as it applies to Rocky Linux 8 and above)==


*Hyper-V: Do not use virtual RAM when booting from CD / DVD, it will cause a Kernel Panic
*Hyper-V: Do not use virtual RAM when booting from CD / DVD, it will cause a Kernel Panic
*Bash Prompt (something actually useful): /etc/bashrc: [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\w]\\$ "
 
*Disable SELINUX:/etc/selinux/config, set SELINUX to disabled, ''sestatus'' to check status AND /boot/efi/EFI/centos/grub.cfg, edit first line that starts with "linux..." and ends with a UTF setting, add selinux=0 to the end of the line.
'''Bash Prompt (something actually useful);'''
**This is only temporary (see above for making permanent): If issues occur when disabling SELINUX, reboot, make boot selection (do NOT press enter), press e, edit grub file, look for line near end that usually starts of with "linux..." and ends with a UTF setting, add selinux=0 to the end of the line. (Thanks to: https://www.virtualramblings.com/failed-to-load-selinux-policy-freezing/)
 
*For Existing Users, Current Session, at command prompt: PS1="\h} \w: "
*To make permanent and for New Users edit this File: /etc/bashrc: [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="\h} \w: "
 
'''Disable SELINUX:/etc/selinux/config, set SELINUX to disabled;'''
 
* ''sestatus'' to check status AND check /boot/efi/EFI/centos/grub, edit /etc/default/grub, <s>look for line that starts with "linux..." and ends with a UTF setting, add selinux=0 to the end of the line.</s>
 
*Alternatively or if Issues Occur: When disabling SELINUX, reboot, make boot selection (do NOT press enter), press e, edit grub file, look for line near end that usually starts of with "linux..." and ends with a UTF setting, add selinux=0 to the end of the line. (Thanks to: https://www.virtualramblings.com/failed-to-load-selinux-policy-freezing/)
 
*'''See Below in Rocky Linux 9 Section:''' <s>Show useful information when booting (it is Linux afterall): edit line in /boot/efi/EFI/centos/grub.cfg that usually starts of with "linux..." and ends with a UTF setting, remove ''rhel'' and ''quiet'' switches.</s>
*'''See Below in Rocky Linux 9 Section:''' <s>Show useful information when booting (it is Linux afterall): edit line in /boot/efi/EFI/centos/grub.cfg that usually starts of with "linux..." and ends with a UTF setting, remove ''rhel'' and ''quiet'' switches.</s>
*Boot to a command prompt: systemctl set-default multi-user.target (Thanks to: https://www.itzgeek.com/how-tos/linux/centos-how-tos/change-default-runlevel-in-centos-7-rhel-7.html#axzz3PuGwJi3X)
 
'''Boot to a command prompt instead of GUI;'''
 
*systemctl set-default multi-user.target (Thanks to: https://www.itzgeek.com/how-tos/linux/centos-how-tos/change-default-runlevel-in-centos-7-rhel-7.html#axzz3PuGwJi3X)
**startx will activate GUI
**startx will activate GUI
*Disable firewall (if behind a hardware firewall, etc.): systemctl stop firewalld.service, systemctl disable firewalld.service
*Disable firewall (if behind a hardware firewall, etc.): systemctl stop firewalld.service, systemctl disable firewalld.service
*Install Webmin RPM via Yum (it will also install dependencies automatically)
*Webmin New: Make a repo in /etc/yum.repos.d/webmin.repo (from https://www.webmin.com/rpm.html)
<syntaxhighlight lang="text">
[Webmin]
name=Webmin Distribution Neutral
#baseurl=https://download.webmin.com/download/yum
mirrorlist=https://download.webmin.com/download/yum/mirrorlist
enabled=1
gpgkey=https://download.webmin.com/jcameron-key.asc
gpgcheck=1
</syntaxhighlight>
 
*Webmin Old (now there's a repository available): Install Webmin RPM via Yum (it will also install dependencies automatically)


==Rocky Linux 9 (New Stuff)==
==Rocky Linux 9 (New Stuff)==
For Showing Useful Information While Booting, edit the /etc/default/grub File (get rid of quiet rhel Directives) and then use this command: grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg (equivalent to what BootICE does for the Windows BCD File)
'''For Showing Useful Information While Booting, edit the /etc/default/grub File (get rid of quiet rhel Directives) and then use this command(s) (equivalent to what BootICE does for the Windows BCD File);'''
 
* For UEFI / EFI Boot: grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg or
* For BIOS Boot: grub2-mkconfig -o /boot/grub2/grub.cfg
* If grub-mkconfig is "not found": notice the subtle difference above: grub2-mkconfig (not grub(WITHOUT THE NUMBER 2)-mkconfig)
 
'''Firewall''': If using something like Shorewall, get rid of FirewallD: yum remove firewalld* --noautoremove


*
*


Cockpit AddOns;
'''Cockpit AddOns;'''


*From: https://github.com/45Drives/cockpit-file-sharing
*From: https://github.com/45Drives/cockpit-file-sharing
**Samba PlugIn: dnf install <nowiki>https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.2.9/cockpit-file-sharing-3.2.9-2.el8.noarch.rpm</nowiki>
**Don't use this one (too much of a hastle): Samba PlugIn: dnf install <nowiki>https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.2.9/cockpit-file-sharing-3.2.9-2.el8.noarch.rpm</nowiki>
**Navigator (File Explorer): wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator-0.5.10-1.el8.noarch.rpm, then rpm -Uhv WhateEverFileName
**Navigator (File Explorer): wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator-0.5.10-1.el8.noarch.rpm, then rpm -Uhv WhateEverFileName


SAMBA / SMB: Remember, if SELINUX is enabled it messes up how SAMBA / SMB operates (can be very puzzling and frustrating): edit /etc/selinux/config and set to disabled (...yes I know, but when it's more hassle than it's worth forget it).
'''SAMBA / SMB:'''


REMI (for multiple PHP version)
* smbpasswd -a WhatEverUserName
* Remember, if SELINUX is enabled it messes up how SAMBA / SMB operates (can be very puzzling and frustrating): edit /etc/selinux/config and set to disabled (...yes I know, but when it's more hassle than it's worth forget it).
 
'''REMI (for multiple PHP version)'''


*dnf install epel-release
*dnf install epel-release
Line 54: Line 86:


===Networking===
===Networking===
And under the category of "It isn't broken, so let's fix it" (thanks Red Hat Morons, yes morons, because in all of the documentation available no one has any good reason why the old system really needed replacing), say hello to NetworkManager
And under the category of "It isn't broken, so let's fix it" (thanks Red Hat Morons, yes morons, because in all of the documentation available no one has any good reason why the old system really needed replacing), so say hello to a piece of junk, err, NetworkManager


https://docs.rockylinux.org/gemstones/nmtui/
'''For more information;'''


https://www.redhat.com/en/blog/rhel-9-networking-say-goodbye-ifcfg-files-and-hello-keyfiles
* https://docs.rockylinux.org/gemstones/nmtui/
* https://www.redhat.com/en/blog/rhel-9-networking-say-goodbye-ifcfg-files-and-hello-keyfiles


For things like Webmin, seems to work OK.  Shorewall and other deeper IP stuff, perhaps not so much
For things like Webmin, seems to work OK.  Shorewall and other deeper IP stuff, perhaps not so much


Tips if it is necessary to use it;
'''Tips if it is necessary to use it;'''


*GUI: nm-connection-editor
*GUI: nm-connection-editor
Line 68: Line 101:
*Directory for direct Text Editing: /etc/NetworkManager/system-connections
*Directory for direct Text Editing: /etc/NetworkManager/system-connections


"Over Coming" NetworkManager (not disabling);
'''"Over Coming" NetworkManager (not disabling);'''


*Edit this file to PRIORITIZE the "old fashion" method over NetworkManager: /etc/NetworkManager/NetworkManager.conf, edit the plugins= line and put ifcfg-rh first
*Edit this file to PRIORITIZE the "old fashion" method over NetworkManager: /etc/NetworkManager/NetworkManager.conf, edit the plugins= line and put ifcfg-rh first
Line 75: Line 108:
*ifup (just run the command and it will offer to install the necessary files)
*ifup (just run the command and it will offer to install the necessary files)


Disabling NetworkManager
'''Disabling NetworkManager'''


*From Here: https://www.thegeekdiary.com/centos-rhel-7-how-to-disable-networkmanager/amp/
*From Here: https://www.thegeekdiary.com/centos-rhel-7-how-to-disable-networkmanager/amp/
Line 83: Line 116:
**systemctl enable network (which results in this: /usr/lib/systemd/systemd-sysv-install enable network )
**systemctl enable network (which results in this: /usr/lib/systemd/systemd-sysv-install enable network )
**service network restart OR systemctl restart network
**service network restart OR systemctl restart network
***If needed: yum install network-scripts
'''Disabling IPv6 (hint, it's in the GRUB configuration file);'''


Disabling IPv6: https://www.tecmint.com/disable-ipv6-rhel-rocky-almalinux/
https://www.tecmint.com/disable-ipv6-rhel-rocky-almalinux/


===Boot Time===
===Boot Time===
Line 129: Line 165:
After GUI installation, get it to boot to command line: <nowiki>http://www.itzgeek.com/how-tos/linux/centos-how-tos/change-default-runlevel-in-centos-7-rhel-7.html#axzz3PuGwJi3X</nowiki>
After GUI installation, get it to boot to command line: <nowiki>http://www.itzgeek.com/how-tos/linux/centos-how-tos/change-default-runlevel-in-centos-7-rhel-7.html#axzz3PuGwJi3X</nowiki>


* For Command Line instead of GUI interface:  systemctl set-default multi-user.target
*For Command Line instead of GUI interface:  systemctl set-default multi-user.target
** Display Current Setting: systemctl get-default OR ls -l /usr/lib/systemd/system/default.target
**Display Current Setting: systemctl get-default OR ls -l /usr/lib/systemd/system/default.target
** List what is available: systemctl list units --type target
**List what is available: systemctl list units --type target
** More details here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/working-with-systemd-targets_configuring-basic-system-settings
**More details here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/working-with-systemd-targets_configuring-basic-system-settings
* Start Gnome Desktop from command line; startx
*Start Gnome Desktop from command line; startx


o  Exit Gnome desktop; Click the User Name, and select Logout
o  Exit Gnome desktop; Click the User Name, and select Logout