posts - 17,  comments - 6,  trackbacks - 0

          http://www.onlinedown.net/soft/40251.htm

          posted @ 2006-03-27 21:08 風中的舞者 閱讀(221) | 評論 (1)編輯 收藏

          在routeros中,每一個ppoe用戶撥號成功后,都會在服務器上產生一個接口。我們可以在防火墻中阻擋掉對原來數據的轉發(fā),
          iptables -A FORWARD -i ether1 -j DROP
          從而要求用戶必須撥號上網

          或者只對ppoe客戶的地址段進行nat masqu....。只對其地址池。我想沒有撥號的,私自設置地址應不可上網。

          posted @ 2006-03-21 20:25 風中的舞者 閱讀(245) | 評論 (0)編輯 收藏
          將common-loggin.jar log4j.jar 放到 common\lib下
          將log4j.properties 放在 shared\classes 下
          posted @ 2006-02-15 22:25 風中的舞者 閱讀(490) | 評論 (0)編輯 收藏
          http://www.ipointportal.com
          posted @ 2005-11-27 15:07 風中的舞者 閱讀(138) | 評論 (0)編輯 收藏

          http://www.uportal.org

          posted @ 2005-11-24 11:25 風中的舞者 閱讀(160) | 評論 (0)編輯 收藏
          http://www.sakaiproject.org/
          About Sakai

          The Sakai Project is a community source software development effort to design, build and deploy a new Collaboration and Learning Environment (CLE) for higher education. The Project began in January, 2004.

          Goals
          The Sakai Project's primary goal is to deliver the Sakai application framework and associated CMS tools and components that are designed to work together.  These components are for course management, and, as an augmentation of the original CMS model, they also support research collaboration.  The software is being designed to be competitive with the best CMSs available.

          The tools are being built by designers, software architects and developers at different institutions, using an experimental variation of an open source development model called the community source model (see below).  To provide a support system for institutions that want to be involved in the Sakai Project, either by adopting Sakai tools or by developing tools for inter-institutional portability, the Sakai Project  has also formed the Sakai Educational Partners Program (SEPP) and the Sakai Commercial Affiliates Program.

          Origins
          The Sakai Project has its origins at the University of Michigan and Indiana University, where both universities independently began open source efforts to replicate and enhance the functionality of their existing CMSs .  Soon after, MIT and Stanford joined in and, along with the Open Knowledge Initiaitive (OKI) and the uPortal consoritum, and a generous grant from the Mellon Foundation, they formed the Sakai Project. 

          Community Source Development Model
          The Sakai Project follows what is called the community source model, which is an extension to the already successful, economically feasible, open source movement forged by projects such as Apache, Linux, and Mozilla. Based on the goal of addressing the common and unique needs of multiple institutions. community source relies more on defined roles, responsibilities, and funded commitments by community members, than some open source development models.

          Current Progress
          To date, the Sakai Project has put out three major software releases (1.0, 1.5 and 2.0), developed an Educational Partner's Program which now has around  80 members around the world with 14+ active discussion groups  and five commercial affiliates, organized three highly successful SEPP conferences,  and successfully demonstrated a  model for community source software development among colleges and universities.  

          Future
          In the future, the Sakai Project expects to continue its effort to build out its interoperable framework and develop many new tools and extensions. In addition, the Partner's Program will continue to grow and the development model used for Sakai is expected to become more broadly applicable.

          posted @ 2005-11-24 11:24 風中的舞者 閱讀(810) | 評論 (0)編輯 收藏

          Backup your Linux System | 備份你的 Linux 系統(tǒng)

          Author | 作者 : Kreny

          Abstract: Backup your data in Linux system by using shell commands, OpenSSH, etc.

          摘要: 本文結合個人粗淺的 Linux 經驗, 闡述如何使用 shell 命令以及 OpenSSH 等工具備份 Linux 系統(tǒng)和數據。

          一、我們需要備份什么?

          我的 Linux 系統(tǒng)是基于 Redhat 的Redhat Linux 9.0,同時配置了諸如 MySQL、PHP、Apache 等基礎服務,同時又配有 Awstats、MRTG、MT 等應用服務程序,因此,我們需要備份的除了系統(tǒng)本身的重要文件以外,還需要備份數據庫、log文件和統(tǒng)計數據文件等。當然另外一項必不可少的就是編譯各項服務時的 ./configure 參數,這里就不贅述了。

          二、制定備份文件列表。

          這個步驟就是歸納一下需要備份的目錄列表。以下我就依照我所安裝的各項服務作了一個簡單的list。 一些文件的地址是以我的服務器為標準(以"/"開頭),一些則以相對目錄來描述(以"./"開頭)。

          系統(tǒng):

        1. /etc /usr/local/etc
          包含所有核心配置文件。這其中包括網絡配置、系統(tǒng)名稱、防火墻規(guī)則、用戶、組,以及其他全局系統(tǒng)項。
        2. /var
          包含系統(tǒng)守護進程(服務)所使用的信息,包括 DNS 配置、DHCP 租期、郵件緩沖文件、HTTP 服務器文件、db2 實例配置,等等。
        3. /home
          包含所有用戶的默認用戶主目錄。這包括他們的個人設置、已下載的文件和用戶不希望失去的其他信息。
        4. /root
          是根(root)用戶的主目錄。
        5. /opt
          是安裝許多非系統(tǒng)文件的地方。IBM 軟件就安裝在這里。OpenOffice、JDK 和其他軟件在默認情況下也安裝在這里。

          系統(tǒng)中不需要備份的目錄:

        6. /proc
          應該永遠不要備份這個目錄。它不是一個真實的文件系統(tǒng),而是運行內核和環(huán)境的虛擬化視圖。它包括諸如 /proc/kcore 這樣的文件,這個文件是整個運行內存的虛擬視圖。備份這些文件只是在浪費資源。
        7. /dev
          包含硬件設備的文件表示。如果計劃還原到一個空白的系統(tǒng),那就可以備份 /dev。然而,如果計劃還原到一個已安裝的 Linux 系統(tǒng),那么備份 /dev 是沒有必要的。

          更多關于目錄的解釋,請查看 Filesystem Hierarchy StandardRed Hat Linux Overview of File System Hierarchy Standard (FHS)

          MySQL:

        8. /usr/local/mysql
          同時要注意版本的保留,在恢復的時候使用相同的版本(或者相同系列的版本)會減少更多不必要的麻煩,例如 “/usr
          /local/mysql-standard-4.1.7-pc-linux-i686”。
        9. /etc/my.cnf
          MySQL 的配置文件。

          Apache:

        10. /usr/local/apache2/logs
          Apache 的 log 文件。這里建議使用 cronolog 來 rotate Apache 的巨大 log。可以參考我的 cronolog 雜記
        11. /usr/local/apache2/conf
          Apache 的配置文件,例如: httpd.conf。還是建議在修改此文本的時候使用“#”號 comment 修改的內容,然后添加需要修改的內容。

          PHP:

        12. /usr/local/lib/php.ini
          個人覺得這個就夠了。如果你設定了 php 的 error log 文件,當然那個也是需要的。

          Movable Type:

        13. ./MT-3.0D-full-en_ususr/ 和你的 weblog 目錄
          一般來說 blog 不會太大,不介意的話就整個備份一下。當然最重要的是 ./MT-3.0D-full-en_ususr/db/ 文件夾,里面有所有的數據(如果你沒有用 MySQL 作為 MT 的數據存儲格式的話)。

          Awstats:
        14. /etc/awstats/
          Awstats 的配置文件。諸如:awstats.blog.conf
        15. /var/lib/awstats/
          Awstats 的分析留檔文件。 諸如:awstats082004.blog.txt

          MRTG:

        16. MRTG 的輸出文件夾。內有圖片和諸如 12.34.56.78_12.34.56.78.log 的log文件。

          三、使用 tar 和 crontab 等簡單工具備份。

          以下是使用 tar 的腳本,去掉了多余的說明部分。 您也可以點擊這里下載并修改以適合自己的系統(tǒng)。在腳本中我盡量用更多的方法來進行備份。在實際應用中可以將步驟更加簡化。更多關于 tar 的參數請看 man tar

          #!/bin/sh

          # Date format: 20040626
          DATE=`date -d yesterday +%Y%m%d`

          # MySQL version & directory
          MYSQL_VERSION="4.x.x"
          MYSQL_DIR="/usr/local/mysql/data"

          # MT Blog directory
          MTBLOG_DIR="/path-to-mt/db/"

          # Backup directory & Backup Filelist
          BACKUP_DIR="/path-to-backup/backupfile"
          BACKUP_FILELIST="/path-to-backup/filelist"

          # Backup MySQL
          printf "Backup MySQL data directory, please wait...\n"
          tar -zpcvPf $BACKUP_DIR/mysql-standard-$MYSQL_VERSION-data-$DATE.tgz $MYSQL_DIR | grep "tar:"
          printf "Done! The new backup file is: $BACKUP_DIR/mysql-standard-$MYSQL_VERSION-data-$DATE.tgz\n\n"

          # Backup MT Blog
          printf "Backuping the MT3.0 Weblog data directory, please wait...\n"
          tar -zpcvPf $BACKUP_DIR/MT-db-$DATE.tgz $MTBLOG_DIR | grep "tar:"
          printf "Done! The new backup file is: $BACKUP_DIR/MT-db-$DATE.tgz\n"

          這里引用了『Linux 備份與恢復速成指南』中的一個小技巧,將文件列表寫入一個文件進行操作。查看我的Filelist

          以下是一個文件列表的例子:

          /etc
          /var
          /home
          /usr/local
          /opt (有時會是空目錄)
          以下解釋引自『Linux 備份與恢復速成指南』:

          請注意 tar -T(或 files-from)命令不能接受通配符。文件必須明確地列出。上面的例子展示了一種單獨地引用文件的方法。您還可以執(zhí)行腳本來搜索系統(tǒng),然后建立一個列表。下面就是這樣一個腳本的例子:

          #!/bin/sh
          cat MyFiles > TempList
          find /usr/share -iname *.png >> TempList
          find /tmp -iname *.iso >> TempList
          tar -cpzMf /path-to-backup/backupfile -T TempList
          上面的腳本首先將 MyFiles 中的所有現(xiàn)有文件列表復制到 TempList。然后它執(zhí)行兩個 find 命令來搜索文件系統(tǒng)中匹配某個模式的文件,并將它們附加到 TempList。第一次是搜索 /usr/share 目錄樹中以 .png 結尾的所有文件。第二次是搜索 /tmp 目錄樹中以 .iso 結尾的所有文件。在建立好列表之后,tar 然后在文件設備 /dev/st0 (第一個 SCSI 磁帶設備)上創(chuàng)建 一個新的歸檔文件,該文件使用 gzip 格式來壓縮,并保留所有文件權限。該歸檔文件將跨越多個卷。要歸檔的文件的名稱將從 TempList 文件中提取。

          四、適用于 log 和數據庫的增量備份(incremental backup)。

          對于龐大的 log 或者 數據庫文件,每天進行完全備份似乎不是很能合理高效地實現(xiàn)備份工作。所以在較短的時間周期內,適用增量備份(incremental backup)會是一個不錯的選擇。

          tar 并不是最好的增量備份工具

          tar 并不是最好的增量備份的工具,但是它也可以實現(xiàn)增量備份。參照 『The tar backup program』中的腳本可以實現(xiàn)這個操作。

          簡單地介紹一下其原理:
          首先,制作一個完全備份的時間點文件,例如 "full-date"。其中寫入某次完全備份的時間點,例如 echo $NOW > full-date
          然后在自定的時間循環(huán)期內(例如一周),每次和完全備份時間點(full-date)對比后進行增量備份。
          其中最關鍵的一個語句就是:

          tar --newer $full-date -zcpf $BACKUPDIR/$BACKUPFILE-$NOW.tgz $DIRECTOIES
          其結果就是,在一周中會產生 6 個獨立文件,其內容是前一天內新增的內容。以下是一個例子:
          [root@deep] /# ls -l /backups/

          total 22217
          -rw-r--r-- 1 root root 10731288 Feb 7 11:24 deep-01Feb.tar << 每月月初一次完全備份
          -rw-r--r-- 1 root root 6879 Feb 7 11:24 deep-Fri.tar << 每天的增量備份
          -rw-r--r-- 1 root root 2831 Feb 7 11:24 deep-Mon.tar
          -rw-r--r-- 1 root root 7924 Feb 7 11:25 deep-Sat.tar
          -rw-r--r-- 1 root root 11923013 Feb 7 11:24 deep-Sun.tar << 每周一次完全備份
          -rw-r--r-- 1 root root 5643 Feb 7 11:25 deep-Thu.tar
          -rw-r--r-- 1 root root 3152 Feb 7 11:25 deep-Tue.tar
          -rw-r--r-- 1 root root 4567 Feb 7 11:25 deep-Wed.tar
          drwxr-xr-x 2 root root 1024 Feb 7 11:20 last-full

          tar 中幾個開關的簡介:

        17. The c option specifies that an archive file is begin created.
        18. The p option preserves permissions; file protection information will be remembered.
        19. The N or newer option does an incremental backup and only stores files newer than DATE.
        20. The f option states that the very next argument will be the name of the archive file or device being written.
        21. The z option specifies that an gzip file will be created.
        22. The u option can APPEND more files to a tarball file.
          注意:-u 開關并不是增量備份,而是往原有的 tar 包里面添加新的文件。

          fbackup is a better choice

          在 HP 的論壇上,有關于增量備份的討論--。但是因為我不是 HP 的系統(tǒng),tar 已經可以滿足現(xiàn)有的備份需求。

          五、使用 ssh 實現(xiàn)安全網絡遠程備份。

          [很抱歉,此段筆者沒有試驗環(huán)境,現(xiàn)在之能添加幾篇關于 ssh 遠程傳送的文章。等到經過試驗后,我會添加具體內容。]

        23. 33.8. Backing up and restoring over the network
        24. 輕松進行自主的、安全的、分布式網絡備份

          六、個人使用的 e-mail 簡單備份。

          由于 Yahoo!、Google、Hotmail 相繼推出了 1-2G 的郵箱,因此可是試著使用帶有文件附件的 E-mail 來傳輸小于各個郵箱的單封信件上限大小的文件。 具體需要用到一些諸如 uudecode 的命令,所以需要先安裝一個 Sharutils 。 我在編譯中遇到一些簡單的錯誤,這里是我修改過的 Sharutils

          在命令行下發(fā)送帶附件的郵件時,還是建議使用諸如 MUTT 的 MUA,請查看我的 MUTT 的安裝失敗經歷,也許對新裝的用戶有所幫助。

          安裝完畢后,可以使用 Mutt 的命令行一行解決問題。首先先寫一個郵件文本 mailcontent.txt。

          # cat mailcontent.txt | mutt -s "mailtitle" -a attachfile1 mail@address

          結合上面的 shell 腳本,如果你有企業(yè)級郵箱的話,不妨也試試這種方法。僅供參考。

          參考文檔:

        25. 『Windows 到 Linux 之旅:第 8 部分. 備份與恢復 之 Linux 備份與恢復速成指南』

        26. 『在 Linux 上進行自動備份--輕松進行自主的、安全的、分布式網絡備份』

        27. 『在文字模式下用mail如何將文件以附件方式發(fā)送』

        28. W. Curtis Preston (2003)《Unix Backup & Recovery》

        29. 『Filesystem Hierarchy Standard』

        30. 『Red Hat Linux Overview of File System Hierarchy Standard (FHS)』

        31. Securing and Optimizing Linux - A Hands on Guide (Red Hat Edition)》 一書的 第 7 章“備份和還原”是另一份不錯的指南,其中包括一個腳本,用于執(zhí)行基于 tar 的增量備份(incremental backup)。

          Useful Links:

        32. http://www.linux-backup.net/
        33. Sharutils
        34. posted @ 2005-11-12 10:37 風中的舞者 閱讀(363) | 評論 (0)編輯 收藏
          僅列出標題
          共2頁: 上一頁 1 2 
          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          java技術

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 垣曲县| 蕉岭县| 泾源县| 磴口县| 岐山县| 龙陵县| 永定县| 镇巴县| 澄江县| 江都市| 永丰县| 公安县| 香港 | 宜川县| 习水县| 云龙县| 衡水市| 通山县| 邵阳市| 聊城市| 西平县| 维西| 海门市| 贵港市| 南部县| 溆浦县| 嵊泗县| 潞西市| 宾川县| 涿州市| 芮城县| 民乐县| 山东| 皋兰县| 昆山市| 溆浦县| 承德县| 桦甸市| 仁化县| 德阳市| 若尔盖县|