Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


centos_8_migration_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
centos_8_migration_notes [2020/10/15 18:30]
juckins
centos_8_migration_notes [2022/06/08 16:03] (current)
juckins
Line 1: Line 1:
 ==== CentOS 8 Migration Notes ==== ==== CentOS 8 Migration Notes ====
  
-<color #ed1c24>**Below is copied from [[centos_7_migration_notes|CentOS 7 Migration Notes]] so modify as needed.**</color>+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 [[virtualbox_for_centos_stream_notes|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: Other fixes:
Line 30: Line 55:
     * uninstall [[https://phoenixnap.com/kb/setup-configure-modsecurity-on-apache|mod_security]] if necessary     * uninstall [[https://phoenixnap.com/kb/setup-configure-modsecurity-on-apache|mod_security]] if necessary
   * [[https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-8|Add https and http to firewall rules]]   * [[https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-8|Add https and http to firewall rules]]
 +    * ''firewall-cmd --zone=public --add-service=http --permanent''
 +    * ''firewall-cmd --zone=public --add-service=https --permanent''
   * <color #ed1c24>MySQL / MariaDB Database and users</color>   * <color #ed1c24>MySQL / MariaDB Database and users</color>
     * [[https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password|Reset mysql root password]]     * [[https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password|Reset mysql root password]]
Line 64: Line 91:
   * Note firewall rules   * Note firewall rules
     * [[https://serverfault.com/questions/655851/is-there-a-simple-way-to-export-import-firewalld-settings|Export Firewall Rules to new server]]     * [[https://serverfault.com/questions/655851/is-there-a-simple-way-to-export-import-firewalld-settings|Export Firewall Rules to new server]]
 +
 +<color #ed1c24>**Below is copied from [[centos_7_migration_notes|CentOS 7 Migration Notes]] so modify as needed.**</color>
  
 Must-Have functionality: Must-Have functionality:
   * Apache, MySQL, PHP, Perl   * Apache, MySQL, PHP, Perl
-  * [[https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-centos-7|fail2ban]]+  * [[https://www.cyberciti.biz/faq/how-to-protect-ssh-with-fail2ban-on-centos-8/|fail2ban]]
     * edit /etc/fail2ban/jail.local to ban for longer than default of 1 hour     * edit /etc/fail2ban/jail.local to ban for longer than default of 1 hour
     * Check logs: # cat /var/log/fail2ban.log     * Check logs: # cat /var/log/fail2ban.log
Line 97: Line 126:
     * General: Font Monospace 9, No terminal bell     * General: Font Monospace 9, No terminal bell
     * Colors: Use colors from system theme     * Colors: Use colors from system theme
 +      * Or, black background with text color #d3d7cf (from GNOME Dark in RHEL9)
     * Scrolling: unlimited     * Scrolling: unlimited
     * Edit > Keyboard Shortcuts > Reset and Clear > F2     * Edit > Keyboard Shortcuts > Reset and Clear > F2
   * Disable Vim auto-indent following [[vim_tips|Vi and Vim Tips]]   * Disable Vim auto-indent following [[vim_tips|Vi and Vim Tips]]
-  * <del>Adjust System > Preferences > Personal > Startup Applications</del> 
-    * <del>Disable the SELinux Troubleshooter</del> 
-    * <del>Add PackageKit Update Applet</del> 
-      * <del>description: PackageKit Update Applet</del> 
-      * <del>command: gpk-update-viewer</del> 
  
 Change setting on screensaver Change setting on screensaver
Line 114: Line 139:
   * Moving display of current CPU usage should appear   * Moving display of current CPU usage should appear
  
-__Fresh VirtualBox Installation Notes 8 Nov 2015 (previous install 30 Sept 2014)__ +----
- +
-  * Preferable to use local .iso file to conserve bandwidth for multiple installs  +
-  * Used http://mirrors.sonic.net/centos/7.7.1908/os/x86_64/ for package repository +
-  * On initial config screen, ensure the network connection is activated +
-  * You can also disable SELinux +
-  * <del>Manually set mount points for /boot, /, swap</del> +
-  * * <del>Make sure /boot is 1024MB large</del> +
-  * Let system create mount points automatically +
-    * After they are suggested, change from LVM to Standard Mount +
-    * May want to increase the boot and "efi" boot partitions from 500MB to 750MB and 200MB to 500MB +
-  * Used default "xfs" filesystem +
-  * For software packages, if you only choose something like Web Server you will not get graphical login +
-  * Choose a general desktop option, too +
-  * Boot into machine +
-  * Note the IP address +
- +
-Use nmtui-hostname to [[http://www.itzgeek.com/how-tos/linux/centos-how-tos/change-hostname-in-centos-7-rhel-7.html|change the system hostname]] +
-<code> +
-# nmcli general hostname +
-# nmcli general hostname new_server_name +
-# systemctl restart systemd-hostnamed +
-</code> +
- +
-dnf -y update, reboot, verify latest kernel is loaded by GRUB +
- +
-Only keep 1 old kernel +
- +
-Ensure gcc, make, kernel-devel are installed. +
- +
-Install Virtual Box Guest Additions +
-  * Took 10 minutes to install +
- +
-Reboot +
- +
-Add 2nd hard drive to /etc/fstab [[adding_a_second_hard_drive|following these notes]] +
- +
-Prepare to run the local dnf installer script +
-  * Also installs [[https://wiki.centos.org/AdditionalResources/Repositories|EPEL repository]] +
-  * Best to run the script by establishing SSH connection to box from a different machine. +
-  * Pipe output to log file and tail the log file +
-  * [[yum_installer_bash_script_centos8|dnf installer bash script (CentOS 8)]] +
- +
-[[install_configure_cpan|CPAN packages]] to install: +
-  * <color #ed1c24>NOTE</color>: Do not update .bashrc for library locations or else they will go into the wrong path +
-    * [[http://stackoverflow.com/questions/33636231/installed-cpan-modules-in-problematic-location|Wrong location of perl libraries]] +
-  * Array::Utils +
-    * //Note, this module is not needed. Was used in ASMAD compare_stops.pl and compare_origin.pl// +
-    * Start up cpan as root (initial time) +
-    * Run through the manual configuration process, accept the defaults +
-    * Start up cpan as root +
-    * > install CPAN (this updates the CPAN packages) +
-    * cpan Array::Utils +
-  * Time::Elapsed (cpan) +
-    * //Note, this module is not needed. Was used in syncing to CDN.// +
-    * As root, had to: +
-    * cd /root/.cpan/build/Time-Elapsed-0.31-N9mZvj/lib/Time +
-    * cp -rp * /usr/share/perl5/Time +
-    * Another option is to install modules locally +
-    * Yet another option is to use modules that are in a repository +
- +
-[[http://www.if-not-true-then-false.com/2010/install-adobe-flash-player-10-on-fedora-centos-red-hat-rhel/|Ensure Adobe Flash plugin is installed]] +
- +
-[[http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/|Ensure Apache is installed and running]] +
-  * check /etc/httpd.conf as well as permissions on html/ directory +
-  * [[http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver|Tips for users and permissions #1]] +
-  * [[http://howtolamp.com/lamp/httpd/2.4/customizing/|Tips for users and permissions #2]] +
- +
-[[centos_php7.2_upgrade|Upgrade PHP to version 7.2]] +
- +
-Migrate /etc/php.ini from old server and relax settings due to test env: +
-<code> +
-;max_execution_time = 30      +
-max_execution_time = 3600     +
-;max_input_time = 60 +
-max_input_time = 3600 +
-;memory_limit = 128M +
-memory_limit = 1024M +
-;display_errors = Off +
-display_errors = On +
-;post_max_size = 8M +
-post_max_size = 250M +
-;upload_max_filesize = 2M +
-upload_max_filesize = 250M +
-;date.timezone =  +
-date.timezone = "America/New_York" +
-;session.gc_maxlifetime = 1440 +
-session.gc_maxlifetime = 7200 +
-</code> +
-<code> +
-# systemctl restart httpd.service +
-</code> +
- +
-[[http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/|Install and Secure MySQL (mariadb)]]+
  
 Database work: Database work:
Line 233: Line 165:
       * systemctl enable mariadb.service       * systemctl enable mariadb.service
     * mysql DATABASE -h localhost -u USER -p'PASS' < /tmp/DATABASE.sql     * mysql DATABASE -h localhost -u USER -p'PASS' < /tmp/DATABASE.sql
- 
-  * Note CentOS7 comes with PHP 5.4 and latest version of phpMyAdmin that will work is 4.4.x 
-    * [[centos_php5.6_upgrade|Install PHP 5.6 on CentOS 7]] 
-  * Run through phpmyadmin install steps listed in [[installing_phpmyadmin_tips]] 
-    * [[https://www.phpmyadmin.net/|Download and Install phpMyAdmin]] 
-    * With PHP 5.6, the latest version of phpMyAdmin (4.6.4) is fully supported 
-  * Copy config from previous machine 
  
 Setup ddclient: Setup ddclient:
Line 265: Line 190:
  
 Restore /etc/hosts from previous machine as needed Restore /etc/hosts from previous machine as needed
- 
-Disable virbro0 network connection if needed: http://www.cyberciti.biz/faq/linux-kvm-disable-virbr0-nat-interface/ 
-<code> 
-# virsh net-destroy default 
-# virsh net-undefine default 
-# service libvirtd restart 
-# ifconfig  
-</code> 
  
 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. 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.
Line 280: Line 197:
   * [[http://juckins.net/dokuwiki/lib/exe/fetch.php?media=sample.jpg|JPG image]]   * [[http://juckins.net/dokuwiki/lib/exe/fetch.php?media=sample.jpg|JPG image]]
   * [[http://juckins.net/dokuwiki/lib/exe/fetch.php?media=sample.png|PNG image]]   * [[http://juckins.net/dokuwiki/lib/exe/fetch.php?media=sample.png|PNG image]]
- 
  
 [[http://www.if-not-true-then-false.com/2014/install-oracle-java-8-on-fedora-centos-rhel/|Install Oracle Java]] (note, this is not the default CentOS, it will not auto-update)  [[http://www.if-not-true-then-false.com/2014/install-oracle-java-8-on-fedora-centos-rhel/|Install Oracle Java]] (note, this is not the default CentOS, it will not auto-update) 
Line 420: Line 336:
   * For other run-level info, see [[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Targets.html#sect-Managing_Services_with_systemd-Targets-Change_Default|RHEL7 Working with Systemd Targets]]   * For other run-level info, see [[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Targets.html#sect-Managing_Services_with_systemd-Targets-Change_Default|RHEL7 Working with Systemd Targets]]
  
- +After machine has been running for a few daysdon't forget to use "alpine" and check for local email from crons that indicate any errors or failures.
----- +
- +
-USB HEADSET: +
- +
-Plugin to right-side lower USB jack on HP Pavilion P7-1235type dmesg at root prompt to see if it was found by system +
- +
-  [37013.137134] usb 8-1: New USB device found, idVendor=046d, idProduct=0a44 +
-  [37013.137145] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 +
-  [37013.137151] usb 8-1: Product: Logitech USB Headset +
-  [37013.137160] usb 8-1: Manufacturer: Logitech +
-  [37013.399267] input: Logitech Logitech USB Headset as /devices/pci0000:00/0000:00:10.1/usb8/8-1/8-  +
-  1:1.3/input/input85 +
-  [37013.449648] hid-generic 0003:046D:0A44.004B: input,hidraw3: USB HID v1.00 Device [Logitech Logitech USB  +
-  Headset] on usb-0000:00:10.1-1/input3 +
- +
-Right-click the speaker icon in the top panel and choose Sound Preferences Or, navigate to System > Preferences > Hardware > Sound \\ +
-Sound effects tab:  Sound theme: No Sounds\\ +
-Hardware tab:  Highlight Headset H390, Profile: Analog Stereo Output + Analog Mono Input \\ +
-Input tab:  choose Headset H390 Analog Mono \\ +
-Output tab:  choose Headset H390 Analog Stereo, Connector is Headphones +
- +
-Settings are saved to $HOME/.config/pulse +
- +
-See Linux Mint [[https://forums.linuxmint.com/viewtopic.php?t=246194|Sound settings keep switching output against my will]] and possibly [[https://forums.linuxmint.com/viewtopic.php?t=224479|HDMI + Sound + Mint 18]]+
centos_8_migration_notes.1602801016.txt.gz · Last modified: 2020/10/15 18:30 by juckins