Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


centos_8_migration_notes

CentOS 8 Migration Notes

When ssh'ing into a CentOS 8 machine via ssh and xterm, slow logouts usually occur. The fix is to not include ssh -X or ssh -Y.

Consult Virtual Box running CentOS8 Stream notes if dnf updates are slow

Fix php for phpmyadmin:

dnf install php-gd php-ldap php-mysqlnd php-pecl-mcrypt php-pecl-zip

Also comment out the cookie validity setting in config.inc.php

Secure the mariadb

Fix php.ini from known good config

Configure $HOME/.vimrc as the following:

autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
# python3 -m pip install --upgrade pip
# python3 -m pip install dictor
# python3 -m pip install wheel
# python3 -m pip install httplib2
# python3 -m pip install PyMySQL

PyMySQL v0.9.3 has been upgraded to v1.0.2 and requires modification to "connect" statement.

Other fixes:

  • Disable WiFi LAN connection with # nmcli radio wifi off

For migrating a system from a different OS, take note of this info first:

  • Make a test user on CentOS7 and one on CentOS8
    • Compare hidden files to see if anything changed between OSs
    • This allows for easy migrating of data for users' $HOME directories
  • ensure all scripts make their own log file directory
    • $log_dir = "/var/tmp/check_disk_space";
    • mkdir ("$log_dir", 0755);
    • should crons write to /tmp and then have a daily script that checks cron logs for errors?

Below is copied from CentOS 7 Migration Notes so modify as needed.

Must-Have functionality:

Customize MATE Desktop displays

  • Adjust System > Preferences > Look and Feel > Appearance
  • Under Fonts tab, set all to size 8
  • Click Details, set resolution to 96 dpi, Smoothing Grayscale, Hinting Slight, Subpixel order RGB
  • Firefox has large bullets for password masking. Theme setting?
  • Set up gnome-terminal preferences
    • General: Font Monospace 9, No terminal bell
    • Colors: Use colors from system theme
      • Or, black background with text color #d3d7cf (from GNOME Dark in RHEL9)
    • Scrolling: unlimited
    • Edit > Keyboard Shortcuts > Reset and Clear > F2
  • Disable Vim auto-indent following Vi and Vim Tips

Change setting on screensaver

  • System > Preferences > Look and Feel > Screensaver

System Monitor (needs mate-system-monitor and mate-applets RPMs):

  • Right-click top panel > Add to Panel
  • In the "Find an item to add to the panel:" search box, enter "System Monitor" and click Add
  • Moving display of current CPU usage should appear

Database work:

  • Backup /etc/my.cnf
    • Add this line under [mysqld]
      • default-storage-engine=MyISAM
  • Add other database users with phpMyAdmin GUI
    • set username
    • set password
    • select "Grant all privileges on wildcard name (username\_%)."
  • Dump all databases from source server to sql file then import on target server
    • mysqldump -u USER -p'PASS' DATABASE > /tmp/DATABASE.sql
    • Ensure database on target server exists; create if necessary
    • mysql DATABASE -h localhost -u USER -p'PASS' < /tmp/DATABASE.sql

Setup ddclient:

Setup duckdns:

  • crontab is
    ~/duckdns/duck.sh >/dev/null 2>&1

Setup ydns:

  • crontab is
    ~/ydns/updater.sh -V -u <snip> -p <snip> -H juckins.ydns.eu >>~/ydns/updater.log 2>&1

Firewall notes:

  • Using firewall-config to close rules from previous machine

rsync /var/www/html/

  • test pages for proper display
  • check soft link to phpmy is correct and current

Restore and test crons

  • check that each cron job runs and the specified log directory exists

Backup /etc/selinux/config and change from enforcing to permissive

Restore /etc/hosts from previous machine as needed

Then, edit the network connections and make sure the "Ethernet" tab for the active connection, such as enp0s3, has the "Device" set to that interface. Reboot to test.

Download sample .png, .gif, .jpg images and test /usr/bin/display for any errors

Install Oracle Java (note, this is not the default CentOS, it will not auto-update)

Install X2Go

Restore Thunderbird profile

Restore Firefox profile

Restore VirtualBox and all machines

Test ASMAD for processing end-to-end

SSH issues

  • Cannot ssh to yourself passwordlessly with default /etc/ssh/sshd_config
  • Comment out the following line, like this:
  • #AuthorizedKeysFile .ssh/authorized_keys
  • This allows you to NX into the CentOS7 machine
  • Update to openssh seems to require RSA keys now and authorized_keys file instead of DSA keys and authorized_keys2 file
  • Set "PermitRootLogin no"
  • But MATE does not work, tried KDE with dnf group install "KDE Plasma Workspaces" and seems to work better but still no icons on the screen
  • But need to configure custom desktop to use /etc/X11/xinit/Xsession mate-session
  • Also tried /usr/bin/startxfce4 but still general odd behavior
  • systemctl restart sshd.service
  • User accounts at remove machines connecting to the new machine will need their $HOME/.ssh/known_hosts either rebuilt or offending entries removed

Update GRUB and splash screen

GRUB_CMDLINE_LINUX_DEFAULT="video=1024x768"
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=keep

Set default GRUB entry

If GRUB2 no longer finds other OS to boot (such as Windows 10) use SourceForge Boot Repair Disk

Install ClamAV

Set up local printer(s)

Firewall Notes

firewall-cmd --get-active-zones
  • It will say either public, dmz, or something else. You should only apply to the zones required.
  • If you want to add a port such as 8080 to your public zone:
firewall-cmd --zone=public --add-port=8080/tcp --permanent
  • Then remember to reload the firewall for changes to take effect.
firewall-cmd --reload

Managing runlevel settings

  • Switch to runlevel 5:
# systemctl isolate graphical.target
  • Initiate runlevel 5 by default:
# systemctl set-default graphical.target
  • Switch to runlevel 3:
# systemctl isolate multi-user.target
  • Initiate runlevel 3 by default:
# systemctl set-default multi-user.target

After machine has been running for a few days, don't forget to use "alpine" and check for local email from crons that indicate any errors or failures.

centos_8_migration_notes.txt · Last modified: 2022/06/08 16:03 by juckins