最近各伺服器在做 Yum 更新時皆出現錯誤,如下
yum -y update
Setting up Update Process
Setting up Repos
ftp://apt.nc.hcc.edu.tw/pub/fedora/linux/core/3/i386/os/repodata/repomd.xml: [Errno 4] IOError: [Errno ftp error] 500 OOPS: vsftpd: refusing to run with writable anonymous root
Trying other mirror.
Cannot open/read repomd.xml file for repository: base
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
後來用 FTP 軟體試著連上 apt.nc.hcc.edu.tw ,該伺服器無法以 anonymous 連上 ...??? 是把服務關掉了嗎?沒辦法,只好捨近求遠,改回預設的設定。
FC3 到這邊除了比較慢一點之外應該是沒問題了,接下來 FC5 的更新出問題:
yum -y update
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
core [1/4]
core 100% |=========================| 951 B 00:00
crash-hat [2/4]
http://crash.fce.vutbr.cz/crash-hat/5/repodata/repomd.xml: [Errno 14] HTTP Error 404: Date: Mon, 03 Mar 2008 02:02:02 GMT
Server: Apache/2.2.6 (Fedora)
Content-Length: 312
Connection: close
Content-Type: text/html; charset=iso-8859-1
Trying other mirror.
Cannot open/read repomd.xml file for repository: crash-hat
failure: repodata/repomd.xml from crash-hat: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from crash-hat: [Errno 256] No more mirrors to try.
連到 crash.fce.vutbr.cz 發現該伺服器只剩下 centos 的更新,所以應該是不能用了,在網路上找到了另一台 Server ,把 /etc/yum.repo.d/crash-hat.repo 中的設定改成
baseurl=http://crash-hat.mirrors.redwire.net/crash-hat/$releasever/
OK了!
2008年2月20日 星期三
PaperCut NG 的備份與回復
備份:
1.可從管理網頁中備份,備份後的檔案位於:
[appdir]\server\data\backups
2.排程備份
使用 Windows 內建的排程器執行
[appdir]\server\bin\win\ perform-online-backup
回復:
使用 cmd 並切換到命令資料夾 [appdir]\server\bin\win\
1.停止服務
stop-server.bat
2.回復
db-tools import-db -f "backup file path"
3.啟動服務
start-server.bat
註:8.0的資料庫無法回復到7.0版本
1.可從管理網頁中備份,備份後的檔案位於:
[appdir]\server\data\backups
2.排程備份
使用 Windows 內建的排程器執行
[appdir]\server\bin\win\ perform-online-backup
回復:
使用 cmd 並切換到命令資料夾 [appdir]\server\bin\win\
1.停止服務
stop-server.bat
2.回復
db-tools import-db -f "backup file path"
3.啟動服務
start-server.bat
註:8.0的資料庫無法回復到7.0版本
2007年12月27日 星期四
用 PHP 讀取 Windows AD 訊息
安裝 php-ldap 套件
連線
$ldap_server = "w2k3.admaster.ttcps.tpc.edu.tw" ;
$conn = ldap_connect($ldap_server) ;
連結目錄服務
$ldap_admin = "administrator@admaster.ttcps.tpc.edu.tw" ;
$ldap_password = "XXXXXX" ;
$bind = ldap_bind($conn, $ldap_admin, $ldap_password) ;
查詢使用者資料
$base_dn = "ou=教師,dc=admaster,dc=ttcps,dc=tpc,dc=edu,dc=tw";
$userid = "000011" ;
$filter = 'samaccountname=' . $userid ;
$result = ldap_search($conn,$base_dn,$filter) ;
$info = ldap_get-entries($conn,$result) ;
連線
$ldap_server = "w2k3.admaster.ttcps.tpc.edu.tw" ;
$conn = ldap_connect($ldap_server) ;
連結目錄服務
$ldap_admin = "administrator@admaster.ttcps.tpc.edu.tw" ;
$ldap_password = "XXXXXX" ;
$bind = ldap_bind($conn, $ldap_admin, $ldap_password) ;
查詢使用者資料
$base_dn = "ou=教師,dc=admaster,dc=ttcps,dc=tpc,dc=edu,dc=tw";
$userid = "000011" ;
$filter = 'samaccountname=' . $userid ;
$result = ldap_search($conn,$base_dn,$filter) ;
$info = ldap_get-entries($conn,$result) ;
2007年12月18日 星期二
在校網首頁嵌入 Flash
為嵌入 Flash ,以下網址找到一段 HTML 語法
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_4150
不過,奇怪的是用 Firefox 看就是會有一段空白行,IE 則不會有些問題,
實在找不出原因,後來用 PHP 來判斷瀏覽器,然後顯示不同的 CSS 樣式。
2007年11月27日 星期二
Vista 的 IE7 常當掉
最近的事情, IE7 常當掉, 上網查了一下,可能是跟 IE 的「附加元件」有關係,在眾多附加元件裡面,我覺得最有可能的兇手是 Skype ,把 Skype add-on (mastermind) 這個附加元件停用之後,重開 IE 就正常了。
2007年11月18日 星期日
2007年11月6日 星期二
用 telnet 來檢查網頁連線
在 Windows 終端機底下
telnet someweb.com.tw 80
輸入
GET / HTTP/1.1
按兩次 Enter
狀態碼 原因
100 Continue
200 OK
201 Created
300 Multiple Choices
301 Moved Permanently
302 Found
400 Bad Request
407 Proxy Authentication Required
408 Request Time-out
413 Request Entity Too Large
500 Internal Server Error
501 Not Implemented
telnet someweb.com.tw 80
輸入
GET / HTTP/1.1
按兩次 Enter
狀態碼 原因
100 Continue
200 OK
201 Created
300 Multiple Choices
301 Moved Permanently
302 Found
400 Bad Request
407 Proxy Authentication Required
408 Request Time-out
413 Request Entity Too Large
500 Internal Server Error
501 Not Implemented
訂閱:
文章 (Atom)