使用php計算某日是幾天後
<?php
//未來日期的時間戳記
$exp = @strtotime($argv[1]);
//今天的時間戳記
$today = @strtotime(@date("Ymd"));
//相差的時間戳記除以86400
$days = (($exp-$today)/86400);
//即可得到未來的時間是幾天後
echo $days;
?>
helloworld 發表在 痞客邦 留言(0) 人氣(142)
conf t
int gi0/1
switchport mode access
switchport port-security
switchport port-security violation protect
switchport port-security mac-address xxxx.xxxx.xxxx
helloworld 發表在 痞客邦 留言(0) 人氣(161)
如果出現這個錯誤訊息,試著把你的網址從原本的http://hostname:8834/ 換成 https://hostname:8834/ 看看
HTTP/1.1 400 Bad Request
Date: Mon, 23 Jun 2014 09:23:58 GMT
Server: NessusWWW
Connection: close
Expires: Mon, 23 Jun 2014 09:23:58 GMT
Content-Length: 208
Content-Type: text/html
X-Frame-Options: DENY
Cache-Control:
Expires: 0
Pragma :
400 Bad Request
Bad Request
Your client sent a request this server does not understand
Connection closed by foreign host.
helloworld 發表在 痞客邦 留言(0) 人氣(61)

1. 登入 vSphere Client
2. Configuration -> Virtual Machine Startup/Shutdown -> Properties
3. Allow virtual machines to start and stop automatically with the system 打勾
4. 將要自動開機的guest os從Manual Startup 往上移到 Automatic Startup
5. OK
helloworld 發表在 痞客邦 留言(0) 人氣(1,082)
[testuser@ms122] ~> sftp testuser@127.0.0.1
Password:
Received message too long 825373450
可以查看一下 .cshrc 下面是不是有類似 echo xxx 輸入螢幕的關鍵字
把這幾行移除即可
helloworld 發表在 痞客邦 留言(0) 人氣(33)
編輯 main.cf
找到這一段,在最後補上reject_unknown_sender_domain
smtpd_sender_restrictions =
XXXXX
,XXXXX
,XXXXX
,XXXXX
,reject_unknown_sender_domain
配合以下的參數可以回應450或是550,建議改成450,如果當下DNS查詢不到時,對方還會繼續retry
unknown_address_reject_code = 450
重新啟動postfix
收到郵件的時候會去查詢DNS,如果查不到紀錄會出現下列的maillog
Jun 3 14:31:20 <mail.info> ms122 postfix/smtpd[89899]: NOQUEUE: reject: RCPT from unknown[219.xx.xx.253]: 550 5.1.8 <sjdhfjshjfj@huufehguerg.tw>: Sender address rejected: Domain not found; from=<sjdhfjshjfj@huufehguerg.tw> to=<test@example.com> proto=ESMTP helo=<om91.example.com>
helloworld 發表在 痞客邦 留言(0) 人氣(810)
# slapcat
bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).
for example in CentOS 6
cd /usr/share/openldap-servers/
cp DB_CONFIG.example /var/lib/ldap/DB_CONFIG
chown ldap.ldap /var/lib/ldap/DB_CONFIG
/etc/init.d/slapd restart
helloworld 發表在 痞客邦 留言(0) 人氣(130)
echo 123 | pw useradd -n gogogo1 -c 'hhh hhh' -g mmm -d /home/mmm/gogogo1 -s /sbin/nologin -m -h 0
新增帳號gogogo1
名字是hhh hhh
群組 mmm
家目錄 /home/mmm/gogogo1
shell: /sbin/nologin
並設定密碼為 123
echo 123 | pw mod user peter -h 0
將peter密碼改為123
helloworld 發表在 痞客邦 留言(0) 人氣(137)
# apachectl restart
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 56 of /usr/local/etc/apache24/extra/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration
# vi httpd.conf
LoadModule ssl_module libexec/apache24/mod_ssl.so
helloworld 發表在 痞客邦 留言(0) 人氣(733)

命令模式下修改netapp nfs 分享權限
#執行 rdfile 查看目前分享的權限
2240-1> rdfile /etc/exports
/vol/sharedir -sec=sys,ro=10.8.9.0/24,rw=10.8.9.243:10.8.9.241,anon=0,nosuid
#如果還有另一台client:10.8.9.55 需要存取 sharedir 目錄的話,把上述的結果貼在記事本編輯後,再執行wrfile並把剛剛編輯過的文字貼上去
2240-1> wrfile /etc/exports
/vol/sharedir -sec=sys,ro=10.8.9.0/24,rw=10.8.9.243:10.8.9.241:10.8.9.55,anon=0,nosuid
最後按ctrl+c 離開
#最後重新讀取設定檔
2240-1> exportfs -a
【Synology】DS718+ 網路儲存伺服器+WD紅標 WD40EFRX (4TBX2)
helloworld 發表在 痞客邦 留言(0) 人氣(905)