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 revisionPrevious revision
Next revision
Previous revision
centos_7_migration_notes [2018/12/18 10:34] juckinscentos_7_migration_notes [2023/12/14 10:10] (current) juckins
Line 3: Line 3:
 RHEL5/6/7 Cheatsheet: {{:rhel_5_6_7_cheatsheet_201410.pdf|}} RHEL5/6/7 Cheatsheet: {{:rhel_5_6_7_cheatsheet_201410.pdf|}}
  
-19 November 2017 (32-bit): +[[https://tuxcare.com/extended-lifecycle-support/|Tuxcare's CentOS 7 Extended Support]]
-  * [[https://wiki.centos.org/SpecialInterestGroup/AltArch/i386|32-bit Wiki]] +
-  * [[http://mirror.centos.org/altarch/7/os/i386/|32-bit repository]] +
-  * Installed OS as per my usual routine below, including the bash script of packages +
-  * Follow instructions to [[http://www.advancedclustering.com/act_kb/installing-nvidia-drivers-rhel-centos-7/|disable nouveau driver]]  +
-  * [[https://devtalk.nvidia.com/default/topic/765530/cuda-setup-and-installation/unable-to-load-the-kernel-module-nvidia-ko-/|Then remove nouveau from the initrd image]]:+
  
-<code> 
-# echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/disable-nouveau.conf  
-# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img 
-# dracut /boot/initramfs-$(uname -r).img $(uname -r) 
-</code> 
  
-  * Reboot +14 Dec 2023 (for Dell XPS 8930 tower): 
-  * NVIDIA driver available from [[https://www.geforce.com/drivers/results/123708|their download page]] +  * Updated kernel from kernel-3.10.0-1160.102.1.el7.x86_64 to kernel-3.10.0-1160.105.1.el7.x86_64 
-  * You will have to run the script below after each kernel upgrade+  * Attempted to rebooted machine but after the BIOS splash screen, only got a blank screen with blinking cursor in upper-left corner  
 +  * Restarted machine using the power button but had same condition 
 +  * Restarted once again but at the BIOS splash screen selected F12 
 +  * For boot options, chose Boot from Hard Drive and list of kernels appeared 
 +  * Chose latest kernel and machine was OK 
 +  * After machine was running, did another restart and machine powered up with no issues
  
-<code> +23 Oct 2023 (for Dell XPS 8930 tower) 
-# sh NVIDIA-Linux-x86-304.137.run (choose yes to configure X file) +  * Updated kernel from kernel-3.10.0-1160.99.1.el7.x86_64 to kernel-3.10.0-1160.102.1.el7.x86_64 and then machine would not boot, just blank screen with blinking cursor in upper-left corner 
-# systemctl isolate graphical.target +  * Powered off machine, unplugged the USB peripheral cables 
-# systemctl set-default graphical.target +  * Unplugged power cable for 30 seconds 
-</code>+  * Rebooted and used F12 to go into BIOS Boot Options 
 +  * Tried to boot to Hard Drive but that immediately failed with error 'press any key to reboot' 
 +  * After that, the machine booted up OK and the normal selection of kernels appeared
  
-  * <del># yum group install "GNOME Desktop" "Graphical Administration Tools"</del> +Other fixes:
-  * GNOME does not work well with graphics card; X keeps restarting+
  
-<code> +  * Disable WiFi LAN connection with ''nmcli radio wifi off'' 
-yum -y groups install "KDE Plasma Workspaces"  +  * [[https://unix.stackexchange.com/questions/152691/how-to-disable-beep-sound-in-linux-centos-7-command-line|Disable bell]]
-</code>+
  
-  <del># echo "exec startkde" >> ~/.xinitrc</del> +11 Oct 2020: 
-  * <del># startx</del>+  Keep getting errors in python3 script connecting/updating to mariadb server  
 +      * ''OSError: [Errno 99] Cannot assign requested address'' 
 +      * ''pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 99] Cannot assign requested address)")'' 
 +  * Updated /etc/my.cnf.d/server.cnf with this setting under [mariadb-5.5]
  
-Other fixes:+  max_connections = 818 (Note that 818 seems to be the absolute limit) 
 +  back_log = 1024 (Note that OS limit is in /proc/sys/net/ipv4/tcp_max_syn_backlog) 
 +  thread_cache_size = 818 
 +  thread_handling = pool-of-threads 
 +   
 +Then do''systemctl restart mariadb.service''
  
-  * # yum -y install gstreamer+  * Other commands to check and modify on mariadb server: 
-  * # rpm -ivh gstreamer1-libav-1.0.6-1.fc19.i686.rpm +      ''show variables like "max_connections";'' 
-    * From [[https://www.rpmfind.net/linux/rpm2html/search.php?query=gstreamer1-libav&submit=Search+...|rpmfind.net]] +      * ''show global status like "Threads_connected";'' 
-  * # nmcli radio wifi off +      * ''show status like "Conn%";'' 
-  * [[https://unix.stackexchange.com/questions/152691/how-to-disable-beep-sound-in-linux-centos-7-command-line|Disable bell]] +      * ''show status like "Threads%";'' 
-  * KDE won't start as of 18 Dec 2017 - "kstartupconfig4 does not exist or failsthe error code is 2"+      * ''show global status;'' 
 +  * See https://mariadb.com/kb/en/configuring-mariadb-for-optimal-performance/ 
 +  * Also check python3 coding best practices for opening/closing database connections 
 +    * I have noted that opening and closing the database connection only once in the python script helps reduce database "cannot assign requested address" errors 
 +  * [[https://pypi.org/project/mysqlclient/|mysqlclient]] is supposedly [[https://stackoverflow.com/questions/43102442/whats-the-difference-between-mysqldb-mysqlclient-and-mysql-connector-python|faster than alternatives]] 
 +      * import MySQLdb 
 +      * See examples at https://www.tutorialspoint.com/python/python_database_access.htm 
 + 
 +  #!/usr/bin/python 
 +   
 +  import MySQLdb 
 +   
 +  # Open database connection 
 +  db = MySQLdb.connect("localhost","testuser","test123","TESTDB"
 +   
 +  # prepare a cursor object using cursor() method 
 +  cursor = db.cursor() 
 +   
 +  # execute SQL query using execute() method. 
 +  cursor.execute("SELECT VERSION()"
 +   
 +  # Fetch a single row using fetchone() method. 
 +  data = cursor.fetchone() 
 +  print "Database version : %s " % data 
 +   
 +  # disconnect from server 
 +  db.close() 
 + 
 + 
 +16 May 2020: 
 +  * System randomly reboots when KVM toggles back and forth from Dell XPS 8930 (running CentOS 7 as 'tidewater') and HP Pavilion P7-1240 
 +    * Workaround: Use remmina to RDP to local Windows machine 
 +  * Noticed monitoring emails not being sent from tidewater; postfix not running and won't start. mysql error
 +  * yum reinstall <mysql_package> that was failing 
 +  * postfix started 
 +  * Other trouble...had to completely uninstall PHP 
 +  * Reinstall PHP - that is v5.4 
 +  * Then upgrade to REMI php v7.4 
 +  * Look in the bash setup script to install the needed php files 
 +  * Restore /etc/php.ini from a local VM 
 +  * restart httpd service 
 +  * yum update had many instances of 'empty files'....it fixed itself 
 +  * ldconfig gave errors for more things 
 +    * yum reinstall oniguruma5 
 +    * yum reinstall oniguruma 
 +  * reboot system, came up cleanly 
 +  * may need to check if mysql connection limit needs to be increased
  
  
Line 94: Line 143:
 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
-  * <fc #ff0000>ensure all scripts make their own log file directory</fc> +  * ensure all scripts make their own log file directory
     * $log_dir = "/var/tmp/check_disk_space";     * $log_dir = "/var/tmp/check_disk_space";
     * mkdir ("$log_dir", 0755);     * mkdir ("$log_dir", 0755);
     * should crons write to /tmp and then have a daily script that checks cron logs for errors?     * should crons write to /tmp and then have a daily script that checks cron logs for errors?
   * users   * users
-  * <fc #ff0000>database users</fc>+  * <color #ed1c24>MySQL / MariaDB Database and users</color> 
 +    * [[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 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
-  <fc #ff0000>export MySQL databases with mysqldump</fc>+      * Note: I used phpMyAdmin to export users from a VM (get the SQL syntax) and then run that on the new machine 
 +  * export MySQL databases with mysqldump
     * [[https://www.digitalocean.com/community/tutorials/how-to-migrate-a-mysql-database-between-two-servers|Migrate MySQL database to new server]]     * [[https://www.digitalocean.com/community/tutorials/how-to-migrate-a-mysql-database-between-two-servers|Migrate MySQL database to new server]]
     * [[http://dev.mysql.com/doc/refman/5.7/en/copying-databases.html|Move MySQL databases to new server]]     * [[http://dev.mysql.com/doc/refman/5.7/en/copying-databases.html|Move MySQL databases to new server]]
   * list of installed perl modules   * list of installed perl modules
     * grep all .pl script and look for the "use " calls     * grep all .pl script and look for the "use " calls
 +  * list of installed python (pip) modules
   * Copy the following to accessible location for restore after upgrade   * Copy the following to accessible location for restore after upgrade
     * users' $HOME     * users' $HOME
-    * crons+    * crons should be in each user's $HOME/crontab
     * various processing log files from /var/tmp/     * various processing log files from /var/tmp/
     * /etc/ssh/*key* or possibly the entire directory contents (this may prevent man-in-the-middle attack messages but testing needed)     * /etc/ssh/*key* or possibly the entire directory contents (this may prevent man-in-the-middle attack messages but testing needed)
     * /etc/hosts     * /etc/hosts
-    * /etc/httpd.conf +    * /etc/httpd/conf/httpd.conf 
-    * /etc/smb.conf +    * Samba users, passwords, shares (for security cameras) 
-      * Samba users, passwords, shares +      * /etc/samba/smb.conf 
-  * nxclient-3.5.0-7.x86_64.rpm +        * smbpasswd -a <username> 
-  * nxnode-3.5.0-9.x86_64.rpm +          * <password> 
-  * nxserver-3.5.0-11.x86_64.rpm +      * /var/lib/samba/private/passdb.tbd 
-  * skype-4.3.0.37-fedora.i586.rpm+      * /var/lib/samba/private/secrets.tbd 
 +      * Make sure service is running and will start at boot. 
 +      * Check output with: testparm -v 
 +  * <del>nxclient-3.5.0-7.x86_64.rpm</del> 
 +  * <del>nxnode-3.5.0-9.x86_64.rpm</del> 
 +  * <del>nxserver-3.5.0-11.x86_64.rpm</del> 
 +  * <del>skype-4.3.0.37-fedora.i586.rpm</del>
   * verify services that should be installed/running in chkconfig   * verify services that should be installed/running in chkconfig
   * 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]]
  
 Note these installed perl RPMs: Note these installed perl RPMs:
 +
 +''# rpm -qa --qf "%{NAME}\n" | grep -i perl | sort''
 +
 <code> <code>
-ImageMagick-perl-6.7.2.7-2.el6.x86_64 +ImageMagick-perl 
-mod_perl-2.0.4-11.el6_5.x86_64 +perl 
-perl-5.10.1-141.el6_7.1.x86_64 +perl-autodie 
-perl-AppConfig-1.66-6.el6.noarch +perl-Array-Diff 
-perl-Archive-Extract-0.38-141.el6_7.1.x86_64 +perl-Array-Unique 
-perl-Archive-Tar-1.58-141.el6_7.1.x86_64 +perl-B-Lint 
-perl-Array-Utils-0.5-1.el6.noarch +perl-Business-ISBN 
-perl-Authen-SASL-2.13-3.el6.noarch +perl-Business-ISBN-Data 
-perl-BSD-Resource-1.29.03-3.el6.x86_64 +perl-Carp 
-perl-CGI-3.51-141.el6_7.1.x86_64 +perl-CGI 
-perl-Class-Singleton-1.4-6.el6.noarch +perl-Class-ISA 
-perl-common-sense-3.5-1.el6.noarch +perl-common-sense 
-perl-Compress-Raw-Bzip2-2.052-1.el6.rf.x86_64 +perl-Compress-Raw-Bzip2 
-perl-Compress-Raw-Zlib-2.021-141.el6_7.1.x86_64 +perl-Compress-Raw-Zlib 
-perl-Compress-Zlib-2.021-141.el6_7.1.x86_64 +perl-constant 
-perl-Convert-ASN1-0.22-1.el6.noarch +perl-CPAN 
-perl-Convert-BinHex-1.119-10.1.el6.noarch +perl-Data-Dumper 
-perl-core-5.10.1-141.el6_7.1.x86_64 +perl-DBD-MySQL 
-perl-CPAN-1.9402-141.el6_7.1.x86_64 +perl-DBI 
-perl-CPANPLUS-0.88-141.el6_7.1.x86_64 +perl-devel 
-perl-Crypt-SSLeay-0.57-17.el6.x86_64 +perl-Digest 
-perl-DateTime-0.5300-2.el6.x86_64 +perl-Digest-MD5 
-perl-DBD-MySQL-4.013-3.el6.x86_64 +perl-Digest-SHA 
-perl-DBD-SQLite-1.27-3.el6.x86_64 +perl-Encode 
-perl-DBI-1.609-4.el6.x86_64 +perl-Encode-Locale 
-perl-DBIx-Simple-1.32-3.el6.noarch +perl-Env 
-perl-devel-5.10.1-141.el6_7.1.x86_64 +perl-Exporter 
-perl-Digest-HMAC-1.01-22.el6.noarch +perl-ExtUtils-Install 
-perl-Digest-SHA1-2.12-2.el6.x86_64 +perl-ExtUtils-MakeMaker 
-perl-Digest-SHA-5.47-141.el6_7.1.x86_64 +perl-ExtUtils-Manifest 
-perl-Email-Abstract-3.002-1.el6.noarch +perl-ExtUtils-ParseXS 
-perl-Email-Address-1.905-1.el6.noarch +perl-FCGI 
-perl-Email-Date-Format-1.002-5.el6.noarch +perl-File-BaseDir 
-perl-Email-MessageID-1.401-4.el6.noarch +perl-File-CheckTree 
-perl-Email-MIME-1.903-2.el6.rf.noarch +perl-File-DesktopEntry 
-perl-Email-MIME-Attachment-Stripper-1.316-2.el6.noarch +perl-File-Listing 
-perl-Email-MIME-ContentType-1.015-2.el6.noarch +perl-File-MimeInfo 
-perl-Email-MIME-Encodings-1.313-2.el6.noarch +perl-File-Path 
-perl-Email-Reply-1.202-4.el6.noarch +perl-File-ReadBackwards 
-perl-Email-Send-2.198-1.el6.rf.noarch +perl-File-Slurp 
-perl-Email-Simple-2.100-2.el6.rf.noarch +perl-File-Temp 
-perl-Error-0.17015-4.el6.noarch +perl-Filter 
-perl-ExtUtils-CBuilder-0.27-141.el6_7.1.x86_64 +perl-Font-AFM 
-perl-ExtUtils-Embed-1.28-141.el6_7.1.x86_64 +perl-GD 
-perl-ExtUtils-MakeMaker-6.55-141.el6_7.1.x86_64 +perl-Getopt-Long 
-perl-ExtUtils-ParseXS-2.2003.0-141.el6_7.1.x86_64 +perl-HTML-Element-Extended 
-perl-File-Fetch-0.26-141.el6_7.1.x86_64 +perl-HTML-Format 
-perl-Git-1.7.1-4.el6_7.1.noarch +perl-HTML-Parser 
-perl-GSSAPI-0.26-6.el6.x86_64 +perl-HTML-TableExtract 
-perl-HTML-Parser-3.64-2.el6.x86_64 +perl-HTML-Tagset 
-perl-HTML-TableExtract-2.10-7.el6.noarch +perl-HTML-Tree 
-perl-HTML-Tagset-3.20-4.el6.noarch +perl-HTTP-Cookies 
-perl-HTTP-Server-Simple-0.43-1.el6.rf.noarch +perl-HTTP-Daemon 
-perl-IO-All-0.39-4.el6.noarch +perl-HTTP-Date 
-perl-IO-Compress-Base-2.021-141.el6_7.1.x86_64 +perl-HTTP-Message 
-perl-IO-Compress-Bzip2-2.021-141.el6_7.1.x86_64 +perl-HTTP-Negotiate 
-perl-IO-Compress-Zlib-2.021-141.el6_7.1.x86_64 +perl-HTTP-Tiny 
-perl-IO-Socket-INET6-2.56-4.el6.noarch +perl-IO-All 
-perl-IO-Socket-SSL-1.31-2.el6.noarch +perl-IO-Compress 
-perl-IO-String-1.08-9.el6.noarch +perl-IO-HTML 
-perl-IO-stringy-2.110-10.1.el6.noarch +perl-IO-Socket-IP 
-perl-IO-Tty-1.08-4.el6.x86_64 +perl-IO-Socket-SSL 
-perl-IO-Zlib-1.09-141.el6_7.1.x86_64 +perl-IPC-System-Simple 
-perl-IPC-Cmd-0.56-141.el6_7.1.x86_64 +perl-JSON 
-perl-IPC-Run-0.84-3.el6.noarch +perl-JSON-XS 
-perl-IPC-System-Simple-1.21-5.el6.noarch +perl-libs 
-perl-JSON-2.15-5.el6.noarch +perl-libwww-perl 
-perl-JSON-XS-2.27-2.el6.x86_64 +perl-List-Compare 
-perl-LDAP-0.40-1.el6.noarch +perl-List-MoreUtils 
-perl-libs-5.10.1-141.el6_7.1.x86_64 +perl-Locale-Codes 
-perl-libwww-perl-5.833-2.el6.noarch +perl-Locale-Maketext 
-perl-libxml-perl-0.08-10.el6.noarch +perl-local-lib 
-perl-List-MoreUtils-0.22-10.el6.x86_64 +perl-LWP-MediaTypes 
-perl-Locale-Maketext-Simple-0.18-141.el6_7.1.x86_64 +perl-LWP-Protocol-https 
-perl-Log-Message-0.02-141.el6_7.1.x86_64 +perl-macros 
-perl-Log-Message-Simple-0.04-141.el6_7.1.x86_64 +perl-Module-Pluggable 
-perl-MailTools-2.04-4.el6.noarch +perl-Mozilla-CA 
-perl-MIME-Lite-3.027-2.el6.noarch +perl-Net-Daemon 
-perl-MIME-tools-5.427-4.el6.noarch +perl-Net-HTTP 
-perl-MIME-Types-1.28-2.el6.noarch +perl-Net-LibIDN 
-perl-Module-Build-0.3500-141.el6_7.1.x86_64 +perl-Net-SSLeay 
-perl-Module-CoreList-2.18-141.el6_7.1.x86_64 +perl-Newt 
-perl-Module-Load-0.16-141.el6_7.1.x86_64 +perl-parent 
-perl-Module-Load-Conditional-0.30-141.el6_7.1.x86_64 +perl-Parse-Yapp 
-perl-Module-Loaded-0.02-141.el6_7.1.x86_64 +perl-PathTools 
-perl-Module-Pluggable-3.90-141.el6_7.1.x86_64 +perl-PlRPC 
-perl-Net-DNS-0.65-5.el6.x86_64 +perl-Pod-Checker 
-perl-Net-LibIDN-0.12-3.el6.x86_64 +perl-Pod-Escapes 
-perl-Net-SSLeay-1.35-9.el6.x86_64 +perl-Pod-LaTeX 
-perl-Newt-1.08-26.el6.x86_64 +perl-podlators 
-perl-NTLM-1.09-1.el6.noarch +perl-Pod-Parser 
-perl-Object-Accessor-0.34-141.el6_7.1.x86_64 +perl-Pod-Perldoc 
-perl-Package-Constants-0.02-141.el6_7.1.x86_64 +perl-Pod-Plainer 
-perl-Params-Check-0.26-141.el6_7.1.x86_64 +perl-Pod-Simple 
-perl-Params-Validate-0.92-3.el6.x86_64 +perl-Pod-Usage 
-perl-parent-0.221-141.el6_7.1.x86_64 +perl-Scalar-List-Utils 
-perl-Parse-CPAN-Meta-1.40-141.el6_7.1.x86_64 +perl-Socket 
-perl-Pod-Escapes-1.04-141.el6_7.1.x86_64 +perl-Storable 
-perl-Pod-POM-0.25-2.el6.noarch +perl-String-CRC32 
-perl-Pod-Simple-3.13-141.el6_7.1.x86_64 +perl-Sys-Syslog 
-perl-Return-Value-1.666001-1.el6.noarch +perl-Test-Harness 
-perl-SGMLSpm-1.03ii-21.el6.noarch +perl-Test-Simple 
-perl-SOAP-Lite-0.710.10-3.el6.noarch +perl-Text-ParseWords 
-perl-Socket6-0.23-4.el6.x86_64 +perl-Text-Soundex 
-perl-Spiffy-0.30-12.el6.noarch +perl-Text-Unidecode 
-perl-String-CRC32-1.4-9.el6.x86_64 +perl-Thread-Queue 
-perl-Sub-Uplevel-0.2002-4.el6.noarch +perl-threads 
-perl-Template-Toolkit-2.22-5.el6.x86_64 +perl-threads-shared 
-perl-Term-UI-0.20-141.el6_7.1.x86_64 +perl-TimeDate 
-perl-Test-Harness-3.17-141.el6_7.1.x86_64 +perl-Time-HiRes 
-perl-Test-Simple-0.92-141.el6_7.1.x86_64 +perl-Time-Local 
-perl-Test-Warn-0.21-2.el6.noarch +perl-Types-Serialiser 
-perl-Text-Iconv-1.7-6.el6.x86_64 +perl-URI 
-perl-TimeDate-1.16-13.el6.noarch +perl-WWW-RobotRules 
-perl-Time-HiRes-1.9721-141.el6_7.1.x86_64 +perl-XML-LibXML 
-perl-Time-Piece-1.15-141.el6_7.1.x86_64 +perl-XML-NamespaceSupport 
-perl-Tree-DAG_Node-1.06-6.1.el6.noarch +perl-XML-SAX 
-perl-URI-1.40-2.el6.noarch +perl-XML-SAX-Base
-perl-version-0.77-141.el6_7.1.x86_64 +
-perl-WWW-Mechanize-1.72-1.el6.rf.noarch +
-perl-WWW-Mechanize-GZip-0.12-13.el6.noarch +
-perl-XML-Dumper-0.81-8.el6.noarch +
-perl-XML-Filter-BufferText-1.01-8.el6.noarch +
-perl-XML-Grove-0.46alpha-40.el6.noarch +
-perl-XML-LibXML-1.70-5.el6.x86_64 +
-perl-XML-NamespaceSupport-1.10-3.el6.noarch +
-perl-XML-Parser-2.36-7.el6.x86_64 +
-perl-XML-SAX-0.96-7.el6.noarch +
-perl-XML-SAX-Writer-0.50-8.el6.noarch +
-perl-XML-Twig-3.34-1.el6.noarch+
 </code> </code>
  
Line 265: Line 316:
     * 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
-  GMail as a Relay Server+    Ensure service is running: 
 +      * ''# systemctl enable fail2ban'' 
 +      * ''# systemctl restart fail2ban'' 
 +  * [[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 (if selinux is enabled): 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>
-  * Skype+
   * Virtual Box   * Virtual Box
   * Working crontabs for each user   * Working crontabs for each user
 +  * [[python_notes|Install Python 3]]
 +
 +Optional:
 +  * [[https://gorilla.dp100.com/downloads/|Password Gorilla]] (use standalone executable)
  
 Contents of /etc/yum.repos.d (CentOS 7): Contents of /etc/yum.repos.d (CentOS 7):
Line 337: Line 395:
  
   * Preferable to use local .iso file to conserve bandwidth for multiple installs    * Preferable to use local .iso file to conserve bandwidth for multiple installs 
-  * Used http://mirror.centos.org/centos/7.1.1503/os/x86_64/ for package repository+  * 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   * On initial config screen, ensure the network connection is activated
   * You can also disable SELinux   * You can also disable SELinux
   * <del>Manually set mount points for /boot, /, swap</del>   * <del>Manually set mount points for /boot, /, swap</del>
-  * * <del><fc #ff0000>Make sure /boot is 750MB or 1GB large</fc></del>+  * * <del>Make sure /boot is 1024MB large</del>
   * Let system create mount points automatically   * Let system create mount points automatically
     * After they are suggested, change from LVM to Standard Mount     * After they are suggested, change from LVM to Standard Mount
Line 378: Line 436:
  
 [[install_configure_cpan|CPAN packages]] to install: [[install_configure_cpan|CPAN packages]] to install:
-  * <fc #ff0000>NOTE</fc>: Do not update .bashrc for library locations or else they will go into the wrong path+  * <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]]     * [[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 387: Line 446:
     * 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 394: Line 453:
     * Yet another option is to use modules that are in a repository     * 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]]+<del>[[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]]</del>
  
 [[http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/|Ensure Apache is installed and running]] [[http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/|Ensure Apache is installed and running]]
Line 400: Line 459:
   * [[http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver|Tips for users and permissions #1]]   * [[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]]   * [[http://howtolamp.com/lamp/httpd/2.4/customizing/|Tips for users and permissions #2]]
 +
 +<del>[[centos_php7.2_upgrade|Upgrade PHP to version 7.2]]</del>
 +
 +[[https://computingforgeeks.com/how-to-install-php-7-4-on-centos-7/|Upgrade PHP to version 7.4]]
  
 Migrate /etc/php.ini from old server and relax settings due to test env: Migrate /etc/php.ini from old server and relax settings due to test env:
Line 427: Line 490:
  
 Database work: Database work:
 +  * Update /etc/my.cnf.d/server.cnf with this setting under [mariadb-5.5]
 +    * ''max_connections = 800''
 +    * ''systemctl restart mariadb.service''
   * Backup /etc/my.cnf   * Backup /etc/my.cnf
     * Add this line under [mysqld]     * Add this line under [mysqld]
Line 438: Line 504:
     * Ensure database on target server exists; create if necessary     * Ensure database on target server exists; create if necessary
       * Tables migrated should be MyISAM       * Tables migrated should be MyISAM
-      * Default database engine is InnoDB as of MySQL 5.5+      * Default database engine is <color #ed1c24>InnoDB</color> as of MySQL 5.5
       * [[https://dev.mysql.com/doc/refman/5.6/en/innodb-default-se.html|Perform some tests and queries]]       * [[https://dev.mysql.com/doc/refman/5.6/en/innodb-default-se.html|Perform some tests and queries]]
         * The exact number of rows of InnoDB tables cannot be shown         * The exact number of rows of InnoDB tables cannot be shown
-        * Need to monitor /var/lib/mysql for growing logs +        * Need to monitor /var</fc>/lib/mysql for growing logs 
-        * <fc #ff0000>CHECK</fc>: [[http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261|Manage and Cleanup InnoDB Infrastructure]]+        * <color #ed1c24>CHECK</color>: [[http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261|Manage and Cleanup InnoDB Infrastructure]]
         * [[http://dba.stackexchange.com/questions/8982/what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql|Similar Post 1]]          * [[http://dba.stackexchange.com/questions/8982/what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql|Similar Post 1]] 
         * [[http://pc-freak.net/blog/fix-mysql-ibdata-file-size-ibdata1-file-growing-large-preventing-ibdata1-eating-disk-space/|Similar Post 2]]         * [[http://pc-freak.net/blog/fix-mysql-ibdata-file-size-ibdata1-file-growing-large-preventing-ibdata1-eating-disk-space/|Similar Post 2]]
Line 449: Line 515:
       * systemctl start mariadb.service       * systemctl start mariadb.service
       * systemctl enable mariadb.service       * systemctl enable mariadb.service
-    * mysql DATABASE -h localhost -u USER -p'PASS' < /tmp/DATABASE.sql+    * mysql -u USER -p'PASSWORD' (to login to mysql at command line) 
 +      * CREATE DATABASE database_name; 
 +      * Now logout of command line 
 +    * mysql DATABASE_NAME -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   * Note CentOS7 comes with PHP 5.4 and latest version of phpMyAdmin that will work is 4.4.x
Line 457: Line 526:
     * 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
 +  * In /etc use the ddclient* files 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 471: Line 551:
  
 Restore /etc/hosts from previous machine as needed Restore /etc/hosts from previous machine as needed
- 
-[[gmail_as_a_relay_on_linux|Set up Gmail Relay and test]] 
  
 Disable virbro0 network connection if needed: http://www.cyberciti.biz/faq/linux-kvm-disable-virbr0-nat-interface/ Disable virbro0 network connection if needed: http://www.cyberciti.biz/faq/linux-kvm-disable-virbr0-nat-interface/
Line 553: Line 631:
 Test ASMAD for processing end-to-end Test ASMAD for processing end-to-end
  
-Install Skype rpm (skype-4.3.0.37-fedora.i586.rpm) following these steps:+<del>Install Skype rpm (skype-4.3.0.37-fedora.i586.rpm) following these steps: 
 +</del>
  
 <code> <code>
Line 575: Line 654:
   * 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 
-  * <fc #ff0000>As of CentOS 7.2 cannot get custom splash image to appear at boot (with UEFI)</fc>+  * 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>
   * cd /etc/default   * cd /etc/default
-  * make a backup copy of grub+  * cp grub grub.YYYYMMDD
   * 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+    * 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]]
Line 612: Line 693:
  
 Set up local printer(s) Set up local printer(s)
 +  * Note that Brother has notes for the HL2170W at https://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=hl2170w_all&os=127
 +    * RPM #1: brhl2170wlpr-2.0.2-1.i386.rpm
 +    * RPM #2: cupswrapperHL2170W-2.0.2-1.i386.rpm
 +    * Use 'lpstat' and 'lpq' to ensure it's a known destination printer
   * [[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Printer_Configuration.html#sec-Starting_Print_Settings_Config|RHEL7 Print Settings]]   * [[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Printer_Configuration.html#sec-Starting_Print_Settings_Config|RHEL7 Print Settings]]
   * yum install cups   * yum install cups
centos_7_migration_notes.1545147242.txt.gz · Last modified: 2018/12/18 10:34 by juckins