Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


centos_6.5_on_apu_-_post_install

This is an old revision of the document!


Change hostname

Edit /etc/sysconfig/network

HOSTNAME=myserver.domain.com

Redirect root mail

Edit /etc/aliases:

root:  you@mailaddress

Update aliases database:

newaliases

Configure relayhost, edit /etc/postfix/main.cf

relayhost = your.smtp.host

Reload postfix:

service postfix reload

SMART monitoring tools

Tools for monitoring SMART capable disks.

yum install smartmontools
chkconfig smartd on
service smartd start

Show SMART info:

smartctl --all /dev/sda

Temperature sensor

Install kernel module (the install will take a while, generating the initramfs file):

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
yum install kmod-k10temp

Install lm_sensors:

yum install lm_sensors
sensors-detect

Show temperature:

# sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +54.0°C  (high = +70.0°C, crit = +100.0°C)

bashrc example

if [ -n "$PS1" ]; then
  echo
  sensors |grep temp1 |awk '{print $1 $2}'
fi;

SSD tuning

elevator=noop

Check current elevator setting:

cat /sys/block/sda/queue/scheduler

Set elevator: Add to /etc/rc.local, you can also add it to the kernel line in /etc/grub.conf, but that setting is for all disks.

echo noop >/sys/block/sda/queue/scheduler
Reduce swappiness

Check current setting:

cat /proc/sys/vm/swappiness

Change setting, using /etc/sysctl.conf

vm.swappiness=1
vm.vfs_cache_pressure=50

Then activate:

sysctl -p
Edit /etc/fstab

Add noatime,discard to filesystems.

Edit /etc/lvm/lvm.conf
issue_discards = 1

reduce writes: tmpfs for logging and /tmp

You will lose files in tmpfs after reboot! Use remote syslog for important logs.

/etc/fstab
tmpfs   /var/log   tmpfs   defaults,size=256m  0 0
tmpfs   /tmp       tmpfs   defaults,size=64m  0 0
or set large commit interval
/dev/mapper/vg_apu1-lv_root /                   ext4    defaults,noatime,discard,errors=remount-ro,commit=200        1 1  
centos_6.5_on_apu_-_post_install.1400315338.txt.gz · Last modified: 2014/05/17 08:28 by admin