set node1,node2 hosts
---------------------------------------------------------------------
node1:
[root@node1 ~]# uname -n
node1
[root@node1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.73.128 node1.test.com node1
192.168.73.129 node2.test.com node2
echochio 發表在 痞客邦 留言(2) 人氣(554)
看一下有哪些資源
crm resource status
刪除 ms_drbd_mysql 資源
crm resource stop ms_drbd_mysql ; crm configure delete ms_drbd_mysql
echochio 發表在 痞客邦 留言(0) 人氣(342)
[root@DRBD01 ~]# cat /etc/drbd.d/r0.res
resource r0 {
protocol C;
startup {
wfc-timeout 30;
degr-wfc-timeout 15;
}
disk {
fencing resource-only;
}
#handlers {
# outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
#}
on DRBD01 {
device /dev/drbd0;
disk /dev/sda2;
address 192.168.15.137:7777;
meta-disk internal;
}
on DRBD02 {
device /dev/drbd0;
disk /dev/sda2;
address 192.168.15.138:7777;
meta-disk internal;
}
}
echochio 發表在 痞客邦 留言(0) 人氣(26)
先安裝 corosync
http://echochio.pixnet.net/blog/post/39159709
apache 安裝設定部分
==================================================
crm node standby DRBD01
crm node online DRBD01
crm node standby DRBD02
crm node online DRBD02
==================================================
yum install httpd apache
vi /etc/httpd/conf/httpd.conf
---------------------------------------
find "Location"
===>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
---------------------------------------
echochio 發表在 痞客邦 留言(0) 人氣(64)
[root@DRBD01 ~]#cd
[root@DRBD01 ~]# cd .ssh
[root@DRBD01 .ssh]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.15.137 drbd01 node1 node1.drbd.org
192.168.15.138 drbd02 node2 node2.drbd.org
[root@DRBD01 .ssh]#
[root@DRBD01 .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
43:4b:9a:bb:27:30:81:4d:78:9d:a6:ea:dc:51:c4:79 root@DRBD01
The key's randomart image is:
+--[ RSA 2048]----+
| . o o |
| . o B E |
| = + .o |
| . + .= . |
| . oo S |
| . + . . |
| o . +. |
| o . ... |
| .o |
+-----------------+
[root@DRBD01 .ssh]# ls
id_rsa id_rsa.pub known_hosts
[root@DRBD01 .ssh]# scp id_rsa.pub drbd02@:/root/.ssh/id_rsa.pub.drbd01
ssh: Could not resolve hostname : Name or service not known
lost connection
[root@DRBD01 .ssh]# scp ./id_rsa.pub drbd02:/root/.ssh/id_rsa.pub.drbd01
root@drbd02's password:
id_rsa.pub 100% 393 0.4KB/s 00:00
[root@DRBD01 .ssh]# cat id_rsa.pub.drbd02 >> authorized_keys
[root@DRBD01 .ssh]# chmod 600 authorized_keys
echochio 發表在 痞客邦 留言(0) 人氣(114)
find . -name "*.c" > /tmp/list
n=`cat /tmp/list |wc -l|tr -d "\n"`
cat /tmp/list | while read x; do echo "`expr $RANDOM % $n`:$x"; done | sort -n| sed 's/[0-9]*://'
第一行 : 找現行目錄為 *.c 的檔案
echochio 發表在 痞客邦 留言(0) 人氣(17)
先 SET HOSET &SSH 交換金鑰
http://echochio.pixnet.net/blog/post/39227128
chkconfig iptables off
service iptables stop
echochio 發表在 痞客邦 留言(0) 人氣(43)
#include <stdio.h> #include <time.h> int main(void) {
time_t t = time(NULL);
t+=28800;
struct tm tm = *gmtime(&t);
printf("%04d%02d%02d%02d%02d%02d", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
return 0;
}
|
echochio 發表在 痞客邦 留言(0) 人氣(21)
日期的offset =OFFSET(data!$A$2,COUNTA(data!$A:$A)-1-data!$J$1,1,data!$J$1,1)
DATE 是參照前一個$A的欄位去統計的其長度為 $J$1 設定的大小(由資料的最後一筆計算)
echochio 發表在 痞客邦 留言(0) 人氣(2,907)
近來有程式背景安裝微軟修補程式,之前與北京微軟合作時有用過,備份起來怕忘記了。
一、Microsoft Windows Installer
若某個軟體是用 Windows Installer 封裝的,那您就應該能在資料夾中看到 *.msi 檔案。這是最典型的特徵,這些檔案通常可以使用 /qb 和 /qn 參數進行自動安裝。
/qb 會在視窗中顯示一個基本的安裝行程。
/qn 參數則不會顯示任何視窗,直接在背景自動安裝。
echochio 發表在 痞客邦 留言(0) 人氣(504)