CentOS 7 Migration Notes

RHEL5/6/7 Cheatsheet: rhel_5_6_7_cheatsheet_201410.pdf

Tuxcare's CentOS 7 Extended Support

14 Dec 2023 (for Dell XPS 8930 tower):

23 Oct 2023 (for Dell XPS 8930 tower)

Other fixes:

11 Oct 2020:

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

#!/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:

13 December 2016:

5 June 2016:

18 May 2016:

5 April 2016:

16 February 2016:

Restarting Services: http://www.putorius.net/2014/07/restarting-services-in-red-hat-7-or.html

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

Note these installed perl RPMs:

# rpm -qa –qf "%{NAME}\n" | grep -i perl | sort

ImageMagick-perl
perl
perl-autodie
perl-Array-Diff
perl-Array-Unique
perl-B-Lint
perl-Business-ISBN
perl-Business-ISBN-Data
perl-Carp
perl-CGI
perl-Class-ISA
perl-common-sense
perl-Compress-Raw-Bzip2
perl-Compress-Raw-Zlib
perl-constant
perl-CPAN
perl-Data-Dumper
perl-DBD-MySQL
perl-DBI
perl-devel
perl-Digest
perl-Digest-MD5
perl-Digest-SHA
perl-Encode
perl-Encode-Locale
perl-Env
perl-Exporter
perl-ExtUtils-Install
perl-ExtUtils-MakeMaker
perl-ExtUtils-Manifest
perl-ExtUtils-ParseXS
perl-FCGI
perl-File-BaseDir
perl-File-CheckTree
perl-File-DesktopEntry
perl-File-Listing
perl-File-MimeInfo
perl-File-Path
perl-File-ReadBackwards
perl-File-Slurp
perl-File-Temp
perl-Filter
perl-Font-AFM
perl-GD
perl-Getopt-Long
perl-HTML-Element-Extended
perl-HTML-Format
perl-HTML-Parser
perl-HTML-TableExtract
perl-HTML-Tagset
perl-HTML-Tree
perl-HTTP-Cookies
perl-HTTP-Daemon
perl-HTTP-Date
perl-HTTP-Message
perl-HTTP-Negotiate
perl-HTTP-Tiny
perl-IO-All
perl-IO-Compress
perl-IO-HTML
perl-IO-Socket-IP
perl-IO-Socket-SSL
perl-IPC-System-Simple
perl-JSON
perl-JSON-XS
perl-libs
perl-libwww-perl
perl-List-Compare
perl-List-MoreUtils
perl-Locale-Codes
perl-Locale-Maketext
perl-local-lib
perl-LWP-MediaTypes
perl-LWP-Protocol-https
perl-macros
perl-Module-Pluggable
perl-Mozilla-CA
perl-Net-Daemon
perl-Net-HTTP
perl-Net-LibIDN
perl-Net-SSLeay
perl-Newt
perl-parent
perl-Parse-Yapp
perl-PathTools
perl-PlRPC
perl-Pod-Checker
perl-Pod-Escapes
perl-Pod-LaTeX
perl-podlators
perl-Pod-Parser
perl-Pod-Perldoc
perl-Pod-Plainer
perl-Pod-Simple
perl-Pod-Usage
perl-Scalar-List-Utils
perl-Socket
perl-Storable
perl-String-CRC32
perl-Sys-Syslog
perl-Test-Harness
perl-Test-Simple
perl-Text-ParseWords
perl-Text-Soundex
perl-Text-Unidecode
perl-Thread-Queue
perl-threads
perl-threads-shared
perl-TimeDate
perl-Time-HiRes
perl-Time-Local
perl-Types-Serialiser
perl-URI
perl-WWW-RobotRules
perl-XML-LibXML
perl-XML-NamespaceSupport
perl-XML-SAX
perl-XML-SAX-Base

Must-Have functionality:

Optional:

Contents of /etc/yum.repos.d (CentOS 7):


For a continuation of GNOME2 in CentOS7, use "MATE"

Other info on MATE:

Customize MATE Desktop displays

Change setting on screensaver

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

Fresh VirtualBox Installation Notes 8 Nov 2015 (previous install 30 Sept 2014)

Use nmtui-hostname to change the system hostname

# nmcli general hostname
# nmcli general hostname new_server_name
# systemctl restart systemd-hostnamed

yum -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

Reboot

Add 2nd hard drive to /etc/fstab following these notes

Prepare to run the local yum installer script

CPAN packages to install:

Ensure Adobe Flash plugin is installed

Ensure Apache is installed and running

Upgrade PHP to version 7.2

Upgrade PHP to version 7.4

Migrate /etc/php.ini from old server and relax settings due to test env:

;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
# systemctl restart httpd.service

Install and Secure MySQL (mariadb)

Database work:

Setup ddclient:

Setup duckdns:

Setup ydns:

Firewall notes:

rsync /var/www/html/

Restore and test crons

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

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/

# virsh net-destroy default
# virsh net-undefine default
# service libvirtd restart
# ifconfig 

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 Google Chrome

Install Google Chrome (Alt)

Fix Google Chrome fonts:

http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/

# yum install google*fonts

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

Adobe Reader - use evince instead

Install NX/NoMachine v3

NX/NoMachine Troubleshooting:

NX for work VPN

VPN connections

Percona toolkit: percona-toolkit-2.2.11-1.noarch.rpm

Restore Thunderbird profile

Restore Firefox profile

Restore VirtualBox and all machines

Test ASMAD for processing end-to-end

Install Skype rpm (skype-4.3.0.37-fedora.i586.rpm) following these steps:

yum install alsa-plugins-pulseaudio.i686 qt.i686 1:qt-x11.i686 libXScrnSaver.i686 libXv.i686
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum localinstall http://download.skype.com/linux/skype-4.3.0.37-fedora.i586.rpm

Skype Tips

SSH issues

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
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

Managing runlevel settings

# systemctl isolate graphical.target
# systemctl set-default graphical.target
# systemctl isolate multi-user.target
# systemctl set-default multi-user.target

USB HEADSET:

Plugin to right-side lower USB jack on HP Pavilion P7-1235, type 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 Sound settings keep switching output against my will and possibly HDMI + Sound + Mint 18


OLD Notes and Issues

If on VirtualBox, go to main menu and choose "Insert Guest Additions CD Image…" and run the following commands:

mount -o ro /dev/disk/by-label/VBOXADDITIONS* /mnt
cd /mnt
./VBoxLinuxAdditions.run --nox11
shutdown -r now

Missing Desktop icons: https://www.centos.org/forums/viewtopic.php?f=48&t=47271

  1. Make sure caja is the default file manager in System –> Control Center –> Preferred Applications –>System tab.
  2. Add caja to automatically start in System–> Control Center –> Startup Applications.
  3. Reboot.

Tried /usr/bin/display with a .jpg or .png file, but this error results:

[juckins@centos7-test-64: /tmp/splash]$ display default.png 
display: color is not known to server `FOREGROUND': 
No such file or directory @ error/xwindow.c/XGetPixelPacket/3064.

ImageMagick may be a different version.

UPDATE: Does work after installing Skype and its dependencies below (nux-desktop?)

Comment out the GRUB_TERMINAL_OUTPUT line in /etc/default/grub using a # at the start of the line, and grub should use a graphics mode again

First see if the default kernel is the latest one for boot. If not, add the following line to /etc/default/grub

GRUB_DEFAULT=0

Also remove the "rhgb quiet" flags. Get the splash.png from http://juckins.net/dokuwiki/lib/exe/fetch.php?media=splash.png and put into /boot/grub2/

GRUB_BACKGROUND="/boot/grub2/splash.png"

Then run:

grub2-mkconfig -o /boot/grub2/grub.cfg

Notes on grub splash screen: