cron

Use crontab -e to edit scheduled tasks, e.g.: 0 2 * * * rsync -av –delete –log-file=”/mnt/backup/logs/ic-ic.rsync.log” /opt/ /mnt/backup/ic-ic/

Read More

.bashrc

PS1=”[\u@\h \W] \[$(tput setaf 2)\]MMAC \[$(tput sgr0)\]\\$ ” alias ll=’ls -alp’ alias l=’ls -alph’ alias mc=”. /usr/local/opt/midnight-commander/libexec/mc/mc-wrapper.sh”

Read More

cron // backup automatically

in wp-config.php set : define(‘ALTERNATE_WP_CRON’, true); define(‘DISABLE_WP_CRON’, false); define(‘WP_CRON_LOCK_TIMEOUT’, 900); to allow updraftPlus to run automatically.

Read More

start script

#!/bin/bash # # Run-level Startup script for the IBM DB2 instance # # chkconfig: 345 91 19 # description: Startup/Shutdown IBM DB2 instance DB2_HOME=”/opt/home/db2inst1/sqllib” DB2_OWNR=”db2inst1″ # if the executables do not exist — display error if [ ! -f $DB2_HOME/adm/db2start -o ! -d $DB2_HOME ]  then  echo “IBM DB2 startup: cannot start”  exit 1  fi […]

Read More

ethernet configuration, hostname

yum install net-tools for ifconfig hostname hostnamectl -h –help              Show this help –version           Show package version –transient         Only set transient hostname –static            Only set static hostname –pretty            Only set pretty hostname -P –privileged        Acquire privileges before execution –no-ask-password   Do not prompt for password -H –host=[USER@]HOST  Operate on remote host Commands: status                 Show current hostname settings […]

Read More

ssh key authentication

create ssh keys ls -ld ~/.ssh mkdir -m 700 ~/.ssh cd ~/.ssh ssh-keygen -b 2048 -t rsa -f id_rsa -P “” // CentOS requires 2 “ chmod go-rwx ~/.ssh/id_rsa scp id_rsa.pub username@remotemachine:~ ssh username@remotemachine “cat /Users/username/id_rsa.pub >> ~/.ssh/authorized_keys” ssh username@remotemachine “rm /Users/username/id_rsa.pub” https://help.apple.com/advancedserveradmin/mac/4.0/#/apd002AE571-2E56-409A-A1F9-A71736EE9040 ssh-agent eval `ssh-agent -s` ssh-add /root/.ssh/bhr.id_rsa Enter passphrase for /root/.ssh/bhr.id_rsa: Identity added: […]

Read More

ddclient

sudo vi /usr/local/etc/ddclient/ddclient.conf daemon=300 # check every 300 seconds syslog=yes # log update msgs to syslog mail=root # mail all msgs to root mail-failure=root # mail failed update msgs to root ssl=no # use ssl-support. Works with ssl library // ssl=yes default pid=/usr/local/var/run/ddclient/pid use=web server=dyndns.inwx.de protocol=dyndns2 login=bhensler password= bernhard.hensler.net,www.bme-ravensburg.de sudo /usr/local/sbin/ddclient -force sudo rm /usr/local/var/run/ddclient/ddclient.cache […]

Read More