Pimping Centos 7 Part 2: Devtoolset-7 C/C++

Centos 7 comes with gcc 4.8.5 which is quite dated. Software Collections have a build for Devtoolset-6 with gcc 6.3.1. Devtoolset-7 with gcc 7.1.1 is in the making. So why don’t we snatch it right from the build server? Be sure to check if newer builds are available by sneaking down the URL http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc and adjusting the URLs accordingly

yum install http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.1.1/2.1.el7/x86_64/devtoolset-7-gcc-7.1.1-2.1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.1.1/2.1.el7/x86_64/devtoolset-7-gcc-c++-7.1.1-2.1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.1.1/2.1.el7/x86_64/devtoolset-7-libstdc++-devel-7.1.1-2.1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-binutils/2.28/7.el7/x86_64/devtoolset-7-binutils-2.28-7.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7/7.0/5.el7/x86_64/devtoolset-7-runtime-7.0-5.el7.x86_64.rpm

As always with Software Collections, you have to enable it explicitly to use it:  scl enable devtoolset-7 "gcc -v". I’ve created a one-line shell script named build.sh

scl enable devtoolset-7 ./update.sh

which simply calls another script named update.sh with Devtoolset-7 enabled to do all the work (don’t forget to chmod +x both). Next time we put this to use.

Update 2017-10-11: The C++ toolset arrived at the Software Collections Server. No need anymore to grab it directly.

Update 2017-10-29: New version 7.2 is on the build server:

yum update http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.2.1/1.el7/x86_64/devtoolset-7-gcc-7.2.1-1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.2.1/1.el7/x86_64/devtoolset-7-gcc-c++-7.2.1-1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-gcc/7.2.1/1.el7/x86_64/devtoolset-7-libstdc++-devel-7.2.1-1.el7.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7-binutils/2.28/9.el6/x86_64/devtoolset-7-binutils-2.28-9.el6.x86_64.rpm http://cbs.centos.org/kojifiles/packages/devtoolset-7/7.0/8.el7/x86_64/devtoolset-7-runtime-7.0-8.el7.x86_64.rpm[/pre]

Pimping Centos 7 Part 1: Kernel

Centos comes with kernel 3.10.0-514. This is not a problem securitywise, as RedHat patches security and some bug fixes into its distribution.

If you have nothing to lose but want to live on the bledding edge and want support for current hardware like dvb-tuners, then Elrepo is for you: Either long-term-support/lt or absolutly current kernels (mainline/ml) yum’ed directly to your server (and for years on mine with no issues). At the moment kernel 4.13.3 is current, within a day or two after release of kernel 4.14.0 a simple yum --enablerepo=elrepo-kernel update should install it.

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml

 

 

Centos, Owncloud and PHP 5.6/7.1

Centos 7 comes with PHP 5.4, securitywise this is not a problem, fixes get backported by RedHat, but Owncloud X (and likewise Nextcloud) need at least PHP 5.6. And naturally other web apps may also gain from newer PHP versions.

There is a more or less official way to have newer PHP versions on Centos and RHEL, Software Collections. There is PHP 5.6 and PHP 7.0. A slightly less official way for a current version is the Remi repository with PHP 7.1.

The Software Collection-way of installation is parallel installation, this means the newer PHP ist installed side by side to the system’s version (look in /opt, /etc/opt and /var/opt paths) and is only used if called explicitly. This is very clean but not very practical. You easily find howtos on globally changing the system’s PHP Version to the new one, especially for the Apache httpd Server, the main consumer of PHP. Remi also a has “replacing” way of installation.

But what if other web apps like Kolab won’t work with anything else than PHP 5.4?

Continue reading “Centos, Owncloud and PHP 5.6/7.1”

Linux and Plextor SSD

I own a small Linux Server with a 64GB Plextor M3/M5/M6 Series SSD, first a PLEXTOR PX-64M5M and now a PLEXTOR PX-64M6M. Both drives had firmware version 1.03 and under stress (for example btrfs balance start /dev/sdb) I got loads of error messages like

kernel: ata3.00: device reported invalid CHS sector 0
kernel: ata3.00: exception Emask 0x0 SAct 0x7ffe00 SErr 0x50000 action 0x6 frozen
kernel: ata3: SError: { PHYRdyChg CommWake }
kernel: ata3.00: failed command: WRITE FPDMA QUEUED
kernel: ata3.00: cmd 61/00:48:48:c4:1b/02:00:07:00:00/40 tag 9 ncq dma 262144 out#012 res 40/00:00:00:01:80/00:00:00:00:00/00 Emask 0x4 (timeout)
kernel: ata3.00: status: { DRDY }

Continue reading “Linux and Plextor SSD”