Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


centos_7_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_7_migration_notes [2019/04/14 22:04]
juckins
centos_7_migration_notes [2019/06/08 10:07] (current)
juckins
Line 56: Line 56:
 Restarting Services: http://​www.putorius.net/​2014/​07/​restarting-services-in-red-hat-7-or.html Restarting Services: http://​www.putorius.net/​2014/​07/​restarting-services-in-red-hat-7-or.html
  
-For migrating a system, take note of this info first:+For migrating a system ​from a different OS, take note of this info first:
   * Make a test user on CentOS6 and one on CentOS7   * Make a test user on CentOS6 and one on CentOS7
     * Compare hidden files to see if anything changed between OSs     * Compare hidden files to see if anything changed between OSs
Line 65: Line 65:
   * users   * users
   * <color #​ed1c24>​MySQL / MariaDB Database and users</​color>​   * <color #​ed1c24>​MySQL / MariaDB Database and users</​color>​
-    * [[https://​www.tecmint.com/​transfer-mysql-databases-from-old-to-new-server/​|Migrate with rsync link #1]] +    * [[https://​www.tecmint.com/​transfer-mysql-databases-from-old-to-new-server/​|Migrate with rsync]] 
-    * [[https://​www.linode.com/​docs/​databases/​mysql/​create-physical-backups-of-your-mariadb-or-mysql-databases/​|Migrate with rsync link #2]]+    * [[https://​www.linode.com/​docs/​databases/​mysql/​create-physical-backups-of-your-mariadb-or-mysql-databases/​|Migrate with tar]]
     * [[http://​www.uptimemadeeasy.com/​linux/​mysql-migrate-users-server-server/​|Migrate MySQL users to new machine]]     * [[http://​www.uptimemadeeasy.com/​linux/​mysql-migrate-users-server-server/​|Migrate MySQL users to new machine]]
       * Don't forget to add semicolons with this:  # sed -i ‘/[^;] *$/​s/​$/;/​’ ./grantfile       * Don't forget to add semicolons with this:  # sed -i ‘/[^;] *$/​s/​$/;/​’ ./grantfile
Line 81: Line 81:
     * /etc/hosts     * /etc/hosts
     * /​etc/​httpd/​conf/​httpd.conf     * /​etc/​httpd/​conf/​httpd.conf
-    * /​etc/​samba/​smb.conf +    ​* Samba users, passwords, shares (for security cameras) 
-      * Samba users, passwords, shares+      ​* /​etc/​samba/​smb.conf 
 +      * /​var/​lib/​samba/​private/​passdb.tbd 
 +      * /​var/​lib/​samba/​private/​secrets.tbd 
 +      * Make sure service is running and will start at boot. 
 +      * Check output with: testparm -v
   * nxclient-3.5.0-7.x86_64.rpm   * nxclient-3.5.0-7.x86_64.rpm
   * nxnode-3.5.0-9.x86_64.rpm   * nxnode-3.5.0-9.x86_64.rpm
Line 99: Line 103:
 perl perl
 perl-autodie perl-autodie
 +perl-Array-Diff
 +perl-Array-Unique
 perl-B-Lint perl-B-Lint
 perl-Business-ISBN perl-Business-ISBN
Line 219: Line 225:
     * 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
-    * Ensure service is running: ''#​ systemctl enable fail2ban'' ​and ''#​ systemctl restart fail2ban''​+    * Ensure service is running: 
 +      * ''#​ systemctl enable fail2ban''​ 
 +      * ''#​ systemctl restart fail2ban''​
   * [[gmail_as_a_relay_on_linux|Set up Gmail Relay and test]]   * [[gmail_as_a_relay_on_linux|Set up Gmail Relay and test]]
   * Disable SELinux   * Disable SELinux
-  * VSFTP +  * VSFTP (for security cameras)
     * [[http://​www.liquidweb.com/​kb/​how-to-install-and-configure-vsftpd-on-centos-7/​|Config instructions]]     * [[http://​www.liquidweb.com/​kb/​how-to-install-and-configure-vsftpd-on-centos-7/​|Config instructions]]
     * [[https://​www.benscobie.com/​fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/​|500 writeable root error]]     * [[https://​www.benscobie.com/​fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/​|500 writeable root error]]
     * As root: setsebool -P allow_ftpd_full_access on      * As root: setsebool -P allow_ftpd_full_access on 
     * As root: systemctl restart vsftpd     * As root: systemctl restart vsftpd
 +    * As root: systemctl enable vsftpd
   * Samba   * Samba
-    * [[http://​www.unixmen.com/​install-configure-samba-server-centos-7/​|UnixMen.com - Samba on CentOS 7]] +    * [[samba_file_sharing|Samba ​File Sharing]]
-    * [[https://​www.howtoforge.com/​samba-server-installation-and-configuration-on-centos-7|HowToForge - Samba on CentOS 7]]+
   * <​del>​Skype</​del>​   * <​del>​Skype</​del>​
   * Virtual Box   * Virtual Box
   * Working crontabs for each user   * Working crontabs for each user
 +  * [[python_notes|Install Python 3]]
  
 Contents of /​etc/​yum.repos.d (CentOS 7): Contents of /​etc/​yum.repos.d (CentOS 7):
Line 336: Line 345:
     * [[http://​stackoverflow.com/​questions/​33636231/​installed-cpan-modules-in-problematic-location|Wrong location of perl libraries]]     * [[http://​stackoverflow.com/​questions/​33636231/​installed-cpan-modules-in-problematic-location|Wrong location of perl libraries]]
   * Array::​Utils   * 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)     * Start up cpan as root (initial time)
     * Run through the manual configuration process, accept the defaults     * Run through the manual configuration process, accept the defaults
Line 342: Line 352:
     * cpan Array::​Utils     * cpan Array::​Utils
   * Time::​Elapsed (cpan)   * Time::​Elapsed (cpan)
-    * //Note, this module ​may not be needed ​anymore. Was used in syncing to CDN.//+    * //Note, this module ​is not needed. Was used in syncing to CDN.//
     * As root, had to:     * As root, had to:
     * cd /​root/​.cpan/​build/​Time-Elapsed-0.31-N9mZvj/​lib/​Time     * cd /​root/​.cpan/​build/​Time-Elapsed-0.31-N9mZvj/​lib/​Time
Line 414: Line 424:
     * With PHP 5.6, the latest version of phpMyAdmin (4.6.4) is fully supported     * With PHP 5.6, the latest version of phpMyAdmin (4.6.4) is fully supported
   * Copy config from previous machine   * Copy config from previous machine
 +
 +Setup ddclient:
 +  * https://​sourceforge.net/​p/​ddclient/​wiki/​Home/​
 +  * yum -y install ddclient
 +  * Use /​etc/​ddclient/​* for configs from previous machine
 +
 +Setup duckdns:
 +  * crontab is <​code>​~/​duckdns/​duck.sh >/​dev/​null 2>&​1</​code>​
 +
 +Setup ydns:
 +  * crontab is <​code>​~/​ydns/​updater.sh -V -u <​snip>​ -p <​snip>​ -H juckins.ydns.eu >>​~/​ydns/​updater.log 2>&​1</​code>​
  
 Firewall notes: Firewall notes:
Line 531: Line 552:
   * Additional tips: http://​ubuntuforums.org/​archive/​index.php/​t-941530.html   * Additional tips: http://​ubuntuforums.org/​archive/​index.php/​t-941530.html
   * systemctl restart sshd.service   * 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+Update GRUB and splash screen 
 +  * My saved splash images with varying resolutions are in /​root/​downloads/​splash
   * <color #​ed1c24>​As of CentOS 7.2 cannot get custom splash image to appear at boot (with UEFI)</​color>​   * <color #​ed1c24>​As of CentOS 7.2 cannot get custom splash image to appear at boot (with UEFI)</​color>​
   * cd /​etc/​default   * cd /​etc/​default
Line 538: Line 561:
   * vi grub    * vi grub 
     * remove "rhgb quiet" from the GRUB_CMDLINE_LINUX call     * remove "rhgb quiet" from the GRUB_CMDLINE_LINUX call
-    * add "​vga=0x317"​ to the GRUB_CMDLINE_LINUX call for better screen resolution (or 0x34b for 1920x1200x8,​ or vga=ask to see all available resolutions)+    * add "​vga=0x317"​ to the GRUB_CMDLINE_LINUX call for better screen resolution (try 0x34b for 1920x1200x8 ​or 0x34c for 1920x1200x16, or vga=ask to see all available resolutions)
     * comment out this line: GRUB_TERMINAL_OUTPUT="​console"​     * comment out this line: GRUB_TERMINAL_OUTPUT="​console"​
     * add this line: GRUB_BACKGROUND="/​boot/​grub2/​splash.png"​     * add this line: GRUB_BACKGROUND="/​boot/​grub2/​splash.png"​
       * Ensure it is rw-r-r permissions       * Ensure it is rw-r-r permissions
       * [[http://​192.168.1.14/​dokuwiki/​lib/​exe/​fetch.php?​media=splash.png|Upload this image]] to the directory noted above       * [[http://​192.168.1.14/​dokuwiki/​lib/​exe/​fetch.php?​media=splash.png|Upload this image]] to the directory noted above
-  * For VM/​BIOS-based installs, as root: grub2-mkconfig -o /​boot/​grub2/​grub.cfg+  * For VM/​BIOS-based installs, as root: grub2-mkconfig -o /​boot/​grub2/​grub.cfg ​(Dell XPS 8930)
   * For UEFI-based installs, as root: grub2-mkconfig -o /​boot/​efi/​EFI/​centos/​grub.cfg   * For UEFI-based installs, as root: grub2-mkconfig -o /​boot/​efi/​EFI/​centos/​grub.cfg
   * More info at [[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​7/​html/​System_Administrators_Guide/​sec-Customizing_the_GRUB_2_Configuration_File.html|Customizing the Grub2 Config File]] and [[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​7/​html/​Desktop_Migration_and_Administration_Guide/​GRUB.html|RHEL7 GRUB Guide]]   * More info at [[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​7/​html/​System_Administrators_Guide/​sec-Customizing_the_GRUB_2_Configuration_File.html|Customizing the Grub2 Config File]] and [[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​7/​html/​Desktop_Migration_and_Administration_Guide/​GRUB.html|RHEL7 GRUB Guide]]
centos_7_migration_notes.1555293894.txt.gz · Last modified: 2019/04/14 22:04 by juckins