This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $((`date --utc --date "$1" +%s`/86400)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SEQUENCE mgr_id_seq; | |
CREATE SEQUENCE; | |
CREATE TABLE managers( | |
mgr_id INTEGER PRIMARY KEY DEFAULT NEXTVAL('mgr_id_seq'), | |
mgr_name VARCHAR(50), | |
mgr_email VARCHAR(50) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -q -b 2048 -f ~/.ssh/id_rsa -N "" | |
# add -C "comment" to insert comment in *.pub file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /etc/apt/sources.list.d/backports.list | |
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -t squeeze-backports install corosync pacemaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface { | |
member { | |
memberaddr: 192.168.1.3 | |
} | |
member { | |
memberaddr: 192.168.1.4 | |
} | |
ringnumber: 0 | |
bindnetaddr: 192.168.1.3 | |
mcastport: 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# History | |
export HISTCONTROL=ignoredups:erasedups | |
export HISTSIZE=50000 | |
export HISTFILESIZE=50000 | |
export HISTTIMEFORMAT="%F %T " | |
# alias | |
alias l='ls -la' | |
alias df='df -h' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we can share the SSH keys that the service uses | |
node1# cd /etc/ssh/ | |
node1# mkdir BAK | |
node1# cp -p ssh_host_* BAK | |
node1# scp node2:/etc/ssh/ssh_host* . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crm configure primitive p_sym_test ocf:heartbeat:symlink \ | |
params target="/mnt/drbd/etc/test" link="/etc/test" backup_suffix=".active" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dmesg | grep drbd | |
[ 12.675157] drbd: initialized. Version: 8.3.7 (api:88/proto:86-91) | |
[ 12.675164] drbd: srcversion: EE47D8BF18AC166BE219757 | |
[ 12.675167] drbd: registered as block device major 147 | |
[ 12.675171] drbd: minor_table @ 0xefe98980 |
OlderNewer