If CentOS 5 or 6 still work fine for you and you’re happy with the security updates you’re getting, then there’s no pressing need to upgrade.
I had motivation (to use the Cairo graphics libraries) to upgrade some web servers from CentOS 5 to CentOS 7 this week, so here’s my notes.
- Dell IPMI will show the graphical installer as a light-gray square if you don’t boot into the text installer fast enough. Although I used the graphical installer with a keyboards and no mouse to setup one server, it was arduous compared to using a mouse, especially the network widget
- eth0 and eth1 interface names are different now. They were enp4s0 and enp8s0 on my Dell 1950’s.
- naturally, the /etc/sysconfig/network-scripts/ifcfg-* files are now called ifcfg-enp4s0 and ifcfg-enp8s0. They’re still in win.ini format, but network, netmask and mtu parameters seem to be “sticky”. You may need to use the following commands to actually change them per “ip a”:
nmcli connection down eth0
nmcli connection up eth0
/sbin/ip link set eth0 mtu "9000"
service network restart
- to start and stop daemons manually, ‘service daemon start/stop’ still works, as the command is translated into a systemd command. ‘service httpd graceful’ is no longer supported, so use ‘apachectl graceful’ instead.
- To see which daemons are enabled at startup:
systemctl list-unit-files | grep enabled
- iptables is now managed with the firewall-cmd command. Very desktop-like, no?
firewall-cmd --zone=public --add-port=80/tcp --permanent
- selinux is very aggressive, so do ‘setenforce 0’ until everything is working. If you install httpd and even loading index.html error logs with LEVEL=warn, then it’s an selinux issue
- most of the familiar Unix network commands have been replaced with the ‘ip’ command: ifconfig is ‘ip a’, route is ‘ip r’, etc. You can install package ‘yum install net-tools’ to get them back.
- for mod_perl, you need to use EPEL since the packagers think mod_perl for 2.4 is not tested enough
yum -y install epel-release
yum -y install httpd mod_perl
- Httpd 2.4 has different syntax than 2.2, so expect the unexpected. use LogLevel debug and ‘Require all granted’ liberally.
- minimal install just offers shells. You will need to install most other scripting languages. Generally you will want to do something like:
yum -y install perl perl-devel perl-CPAN python python-devel
- I’ve heard that cpanel doesn’t work yet, for you cpanel users.
- for some reason the Perl cpan configuration starts by offering you ‘local::lib’, which will install modules in /root. Choose ‘sudo’ instead if you want the modules installed system-wide. (Although I have to admit, ‘local::lib’ is very, very good at what it does.)
- if you need a mysql client program, then ‘yum -y install mysql’ will give you just the MariaDB mysql client.
Some of the advantages of upgrading from CentOS 5 to CentOS 7 are:
- Cairo graphics libraries work much better
- parted has auto-alignment
- openssl has SNI support
- better ext4 support
- better virtualization, cgroups and docker support.
Bonus: Howto Profile Cairo Graphics Programs
yum install cairo-tools CAIRO_TRACE_LINE_INFO=1 cairo-trace perl graph.cgi