拿centos 6.x來當nfs server
當nfs client 掛載起來的時候,檔案owner全部變成4294967294
網路上很多解法
/etc/default/nfs-common
NEED_IDMAPD=yes
及修改 /etc/idmapd.conf
但目前還沒試成功
偷雞解法就讓client強迫用nfsv3來掛載nfs了
mount -t nfs  -o nfsvers=3 nfsserver:/export /mnt/remote
開機時自動掛載
vi /etc/fstab
nfsserver:/exports     /mnt/remote   nfs   nfsvers=3
nfs4是個神奇的東西,有空再研究

helloworld 發表在 痞客邦 留言(0) 人氣()

esx usb device
 
編輯guest 設定,點選add ...
依序新增 usb controller 及 usb device 即可

helloworld 發表在 痞客邦 留言(0) 人氣()

使用php計算某日是幾天後
<?php
//未來日期的時間戳記
$exp = @strtotime($argv[1]);
//今天的時間戳記
$today = @strtotime(@date("Ymd"));
//相差的時間戳記除以86400
$days = (($exp-$today)/86400);
//即可得到未來的時間是幾天後
echo $days;
?>

helloworld 發表在 痞客邦 留言(0) 人氣()

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) 人氣()

如果出現這個錯誤訊息,試著把你的網址從原本的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) 人氣()

vmware Automatic Startup
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) 人氣()

[testuser@ms122] ~> sftp testuser@127.0.0.1
Password:
Received message too long 825373450
可以查看一下 .cshrc 下面是不是有類似 echo xxx 輸入螢幕的關鍵字
把這幾行移除即可

helloworld 發表在 痞客邦 留言(0) 人氣()

編輯 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) 人氣()

# 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) 人氣()

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) 人氣()

莫札特巧克力
這莫札特巧克力應該是每個人去奧地利、捷克必買的伴手禮了
歐洲的物價真是貴的嚇人,所以我從歐洲回來只帶了這個東西和水果茶茶包回來犒賞一下辛苦的同事
有機會的話強烈建議先在捷克買好,過了一個國境後物價差好多啊

helloworld 發表在 痞客邦 留言(0) 人氣()

 # 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) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。