PIXNET Logo登入

Hello World

跳到主文

:D

部落格全站分類:生活綜合

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 4月 19 週二 201117:46
  • How to update FreeBSD ports tree

1st time => portsnap fetch extract
2nd and later => portsnap fetch update
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 4月 15 週五 201113:51
  • 利用awk計算檔案大小

如果我要計算目錄下面 某個副檔名或是某關鍵字檔名的大小加總的話
可以使用awk 來實現
例如
ls -l /var/log/maillog* | awk '{ SUM += $5 } END { print SUM/1024/1024 }'
計算出來的單位是MB
undefined
Sed and Awk: Pocket Reference

作者: Robbins, Arnold
原文出版社:Oreilly & Associates Inc
出版日期:2002/06/01
語言:英文
定價:348元
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 4月 13 週三 201118:28
  • 買歐萊禮送歐萊禮筆記本

歐萊禮
現在買歐萊禮全書系購書,不限金額,買就送「歐萊禮專屬筆記本」!買一送一,數量有限,送完為止!
http://www.books.com.tw/exep/assp.php/es/exep/prod/books/editorial/publisher_chart.php?pubid=oreilly
(繼續閱讀...)
文章標籤

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

  • 個人分類:工商服務
▲top
  • 4月 13 週三 201112:13
  • ACL實現LDAP account disable/enable

如果不想刪除帳號或是要讓ldap 某個account暫時停用的話
似乎沒有直接的屬性可以使用,想到最單純的方法可能是用ACL來實現了
首先編輯slapd.conf 多加一行include /usr/local/etc/openldap/acl_disabled.conf
vi /usr/local/etc/openldap/slapd.conf
include         /usr/local/etc/openldap/acl_disabled.conf
access to *
      by * read
access to attrs=userPassword
      by self write
      by * auth
未來如果有要暫時disable一個帳號的話只需要維護acl_disabled.conf
vi /usr/local/etc/openldap/acl_disabled.conf
access to dn="uid=peter,ou=sales,dc=helloworld,dc=com,dc=xx"
  by * none
access to dn="uid=mary,ou=tech,dc=helloworld,dc=com,dc=xx"
  by * none
比較麻煩的是..每次編輯完記得重新啟動ldap server才會生效,反正帳號不會常異動啦XDDD
另外就是不適用有replication的環境啊orz
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 4月 08 週五 201116:21
  • 清空郵件駐列

postsuper -d ALL
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 4月 07 週四 201119:01
  • 讓ldap提供ssl連線

cd /etc/openldap/ssl
openssl genrsa -out ldap.test.com.key 1024
openssl req -new -key ldap.test.com.key -out ldap.test.com.csr
openssl x509 -req -days 7200 -in ldap.test.com.csr -signkey ldap.test.com.key -out ldap.test.com.crt
vi /etc/openldap/slapd.conf
TLSCipherSuite HIGH::MEDIUM:LOW
TLSCertificateFile /etc/openldap/ssl/ldap.test.com.crt
TLSCertificateKeyFile /etc/openldap/ssl/ldap.test.com.key
/etc/init.d/ldap restart
cat /etc/services | grep ldap
ldap            389/tcp
ldap            389/udp
ldaps           636/tcp                         # LDAP over SSL
ldaps           636/udp                         # LDAP over SSL
檢查一下有沒有LISTEN兩個port
netstat -na | grep LISTEN
tcp        0      0 0.0.0.0:389                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:636                 0.0.0.0:*                   LISTEN
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 3月 30 週三 201118:07
  • 新書上架: facebook臉書效應:從0到7億的串連

facebook臉書效應:從0到7億的串連

facebook臉書效應:從0到7億的串連
有看過電影社群網站的應該會有興趣想要買一本來看看:p
(繼續閱讀...)
文章標籤

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

  • 個人分類:
▲top
  • 3月 29 週二 201116:42
  • FreeBSD 升級 openssh

升級前
telnet 0 22
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.4p1 FreeBSD-20100308
步驟:抓source回來解開
./configure && make && make install
(繼續閱讀...)
文章標籤

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

  • 個人分類:系統管理
▲top
  • 2月 01 週二 201116:53
  • 3com switch 4500使用giga port

網路線插上25/26 port沒有反應,
原來是光纖模組和RJ-45的孔是共用的,同時只能有一個連線
所以預設是光纖模組可以運作,RJ-45的孔是shutdown
修改設定如下
(繼續閱讀...)
文章標籤

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

  • 個人分類:
▲top
  • 12月 16 週四 201013:08
  • 利用lsyncd+rsync改善同步效率

以往同步檔案的時候通常client無法得知source有哪些檔案備異動過
所以透過rsync跟source端要資料時,需要將一整個目錄重新比對過,然後將有異動的部分複製到目的端
透過lsyncd+rsync則是在source端有異動資料的時候,主動透過rsync將異動的部分丟到目的端
測試平台 CentOS 5.5
來源端 10.0.0.1
安裝rsync+lsyncd
yum -y install lsyncd
啟動lsyncd
lsyncd /home/mirror/ 10.0.0.2::mirror/
/home/mirror 為要監控的來源目錄,10.0.0.2::mirror 則是遠端要更新的路徑
目的端 10.0.0.2
編輯 /etc/rsyncd.conf
[mirror]
   path = /home/mirror
   hosts allow = 10.0.0.1
   read only = no
   commect = mirror from 10.0.0.1
安裝xinetd並讓rsync可以透過xinetd可以被呼叫
yum -y install xinetd
vi /etc/inetd.d/rsync
disable = yes 改成 disable = no
service xinetd restart
這樣就可以運作了,試著將source的目錄做一些異動看看唄
可以觀察到SRC端的process,會針對有異動的目錄進行同步到DEST端,不會把一個目錄全部比對一次
/usr/bin/rsync --delete -ltd /home/mirror//test1/ 10.0.0.2::mirror//test1/
以及DEST端的process
rsync --daemon
(繼續閱讀...)
文章標籤

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

  • 個人分類:
▲top
«1...64656671»

momo shop

近期文章

  • 略過windows 11 安裝檢查
  • Debina Linux 同步時間
  • 阻擋偽造老闆名字發的詐騙信
  • 解決連線網路印表機錯誤 0x00000709
  • 解決HP筆記型電腦無法從win10升級至win11問題
  • windows 11 找不到列印至PDF 印表機
  • 無線網路的網卡mac address 會變耶
  • 解決 umount 出現 target is busy.
  • 解決rsync 同步錯誤訊息
  • 透過cmd命令模式調整windows 時區

誰來我家

我的地盤

helloworld
暱稱:
helloworld
分類:
生活綜合
好友:
累積中
地區:

最新迴響

  • [25/07/31] steven 於文章「解決點兩下 excel 檔案無法直接開啟...」留言:
    太讚了,這真的解決許久的困擾,比看什麼微軟方案還有用又簡單...
  • [25/06/05] helloworld 於文章「無線網路的網卡mac address 會...」留言:
    MacOS 也有類似的設定 選項分別為關閉、固定、輪替...
  • [24/10/25] wing 於文章「HP DL380 gen10 安裝 wi...」留言:
    我的svr是HP 380G10,安裝2016時找不到硬碟,到...
  • [24/07/23] helloworld 於文章「馬來西亞遊記...」留言:
    補充: 1. 馬來西亞雖然位於赤道上,但沒有想像中的熱 ...
  • [23/08/24] JeJe4咖照 於文章「建立新的 zfs filesystem...」留言:
    謝謝Hello World分享精彩的資訊 & 體驗心得,很詳...
  • [23/07/07] 路人 於文章「windows / mac 遠端連線到 ...」留言:
    好用,謝謝...
  • [22/05/22] 小黃瓜 於文章「台式涼拌小黃瓜DIY...」留言:
    好吃的小黃瓜 https://shopee.tw/prod...
  • [22/04/28] helloworld 於文章「修正iphone 更新 iOS 15.4...」留言:
    另外就是傳簡訊實名制到1922的時候 變得非常難用 幸好...
  • [21/08/03] cuteClover 於文章「momo 購物網聯絡客服網址...」留言:
    超難找,感謝你的筆記...
  • [20/06/22] LINUX VPS VPN  於文章「使用pfsense 架設 site to...」留言:
    需要付費的再找我,主要是系統架站。直播拍賣應用提供完整服務...

文章分類

  • 遊記 (24)
  • 系統管理 (440)
  • 吃吃吃 (29)
  • 工商服務 (95)
  • 資料庫 (45)
  • 未分類文章 (1)

參觀人氣

  • 本日人氣:
  • 累積人氣:

pixGoogleAdsense1

pixGoogleAdsense2

留言板