FHEM is a home automation/smart home server side software. Details can be found at http://www.fhem.de.
Configuration of FHEM is not part of this tutorial as this is highly dependant on the intended purpose. Please check the FHEM website for that.
rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm # for Centos!
yum install -y perl-Time-HiRes perl-Device-SerialPort
cd
wget http://fhem.de/fhem-5.5.tar.gz
tar -xf fhem-5.5.tar.gz
cd fhem-5.5
# update BINDIR=/usr/share/fhem
sed -i 's#^\(BINDIR\s*=\s*\).*$#\1/usr/share/fhem#' Makefile
make install
cd
mkdir /var/log/fhem/
cp fhem.cfg /etc
cat <<EOF > /etc/systemd/system/fhem.service
[Unit]
Description=FHEM Service
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/share/fhem/fhem.pl /etc/fhem.cfg
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable fhem.service
# Open firewall port
cp /usr/lib/firewalld/services/http.xml /etc/firewalld/services/fhem.xml
vi /etc/firewalld/services/fhem.xml # change to port 8083
cp -n /usr/lib/firewalld/zones/public.xml /etc/firewalld/zones # check if this file exists!!
vi /etc/firewalld/zones/public.xml
## To allow HIS scripts: (check the page Home Information System)
#Copy scripts files to the home folder
yum install -y wol php php-mbstring mutt #allows wake-up-on-lan and e-mail
cat <<EOF > /root/.muttrc
set from="Home Information System <his@example.com>"
set use_from=yes
EOF
# swap certificates for automated ssh logins if required