Adjustments

Locale issues

Using terminal, specifically on Mac OSX, it often leads to messages like:

# ssh my.server.cxm
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
# perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

to fix, add the following two lines:

LANG="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"

to either /etc/sysconfig/i18n (CentOS 6) or /etc/locale.conf (CentOS 7)

Commands

Show OS version

cat /etc/*-release

Install (missing) packages

E.g. zip package which is missing in default distribution (however unzip is included). See first package name, then used exact name to install.

# yum list zip
# yum install zip.i386

yum issues

automated updates

In order to keep the system up-to-date with security patches and bug fixes it's advisable to enable automated updates.

check

# service yum-cron status

if missing:

# yum install yum-cron
# service yum-cron start
# chkconfig yum-cron on

Configure: Enable the apply_updates parameter, we may also tweak some other value like random_sleep, which I effectively disable with value 1, because anacron already features a random delay.

CentOS 7:

# vi /etc/yum/yum-cron.conf
...
apply_updates = yes
...
random_sleep = 1 
...

CentOS 6:

# vi /etc/sysconfig/yum-cron
...
DOWNLOAD_ONLY=no
...
RANDOMWAIT="1"
...

Eventually adjust some parameters in /etc/anacrontab (since CentOS 6 anacron is the default for managing daily/weekly/monthly cron jobs and prevent several of them from running at the same time).

aliases conflict

Transaction Check Error:

(first update ends with error)

mv /etc/aliases /etc/aliases.bak
yum clean all
yum update
rpm -Fvh --replacefiles /var/cache/yum/base/packages/setup-2.5.58-7.el5.noarch.rpm
yum update
mv /etc/aliases.bak /etc/aliases 

Install EPEL repository

yum repolist
yum install epel-release
yum repolist

CentOS (last edited 2017-03-07 12:02:45 by JaumeSola)