posts - 17,  comments - 6,  trackbacks - 0

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

posted @ 2006-03-27 21:08 风中的舞者 阅读(211) | 评论 (1)编辑 收藏

在routeros中,每一个ppoe用户拨号成功后,都会在服务器上产生一个接口。我们可以在防火墙中阻挡掉对原来数据的转发,
iptables -A FORWARD -i ether1 -j DROP
从而要求用户必须拨号上网

或者只对ppoe客户的地址段进行nat masqu....。只对其地址池。我想没有拨号的,私自设置地址应不可上网。

posted @ 2006-03-21 20:25 风中的舞者 阅读(238) | 评论 (0)编辑 收藏
将common-loggin.jar log4j.jar 放到 common\lib下
将log4j.properties 放在 shared\classes 下
posted @ 2006-02-15 22:25 风中的舞者 阅读(485) | 评论 (0)编辑 收藏
http://www.ipointportal.com
posted @ 2005-11-27 15:07 风中的舞者 阅读(133) | 评论 (0)编辑 收藏

http://www.uportal.org

posted @ 2005-11-24 11:25 风中的舞者 阅读(152) | 评论 (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 风中的舞者 阅读(805) | 评论 (0)编辑 收藏

Backup your Linux System | 备份你的 Linux 系统

Author | 作者 : Kreny

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

摘要: 本文结合个人粗浅的 Linux 经验, 阐述如何使用 shell 命令以及 OpenSSH 等工具备份 Linux 系统和数据。

一、我们需要备份什么?

我的 Linux 系统是基于 Redhat 的Redhat Linux 9.0,同时配置了诸如 MySQL、PHP、Apache 等基础服务,同时又配有 Awstats、MRTG、MT 等应用服务程序,因此,我们需要备份的除了系统本身的重要文件以外,还需要备份数据库、log文件和统计数据文件等。当然另外一项必不可少的就是编译各项服务时的 ./configure 参数,这里就不赘述了。

二、制定备份文件列表。

这个步骤就是归纳一下需要备份的目录列表。以下我就依照我所安装的各项服务作了一个简单的list。 一些文件的地址是以我的服务器为标准(以"/"开头),一些则以相对目录来描述(以"./"开头)。

系统:

  • /etc /usr/local/etc
    包含所有核心配置文件。这其中包括网络配置、系统名称、防火墙规则、用户、组,以及其他全局系统项。
  • /var
    包含系统守护进程(服务)所使用的信息,包括 DNS 配置、DHCP 租期、邮件缓冲文件、HTTP 服务器文件、db2 实例配置,等等。
  • /home
    包含所有用户的默认用户主目录。这包括他们的个人设置、已下载的文件和用户不希望失去的其他信息。
  • /root
    是根(root)用户的主目录。
  • /opt
    是安装许多非系统文件的地方。IBM 软件就安装在这里。OpenOffice、JDK 和其他软件在默认情况下也安装在这里。

    系统中不需要备份的目录:

  • /proc
    应该永远不要备份这个目录。它不是一个真实的文件系统,而是运行内核和环境的虚拟化视图。它包括诸如 /proc/kcore 这样的文件,这个文件是整个运行内存的虚拟视图。备份这些文件只是在浪费资源。
  • /dev
    包含硬件设备的文件表示。如果计划还原到一个空白的系统,那就可以备份 /dev。然而,如果计划还原到一个已安装的 Linux 系统,那么备份 /dev 是没有必要的。

    更多关于目录的解释,请查看 Filesystem Hierarchy StandardRed Hat Linux Overview of File System Hierarchy Standard (FHS)

    MySQL:

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

    Apache:

  • /usr/local/apache2/logs
    Apache 的 log 文件。这里建议使用 cronolog 来 rotate Apache 的巨大 log。可以参考我的 cronolog 杂记
  • /usr/local/apache2/conf
    Apache 的配置文件,例如: httpd.conf。还是建议在修改此文本的时候使用“#”号 comment 修改的内容,然后添加需要修改的内容。

    PHP:

  • /usr/local/lib/php.ini
    个人觉得这个就够了。如果你设定了 php 的 error log 文件,当然那个也是需要的。

    Movable Type:

  • ./MT-3.0D-full-en_ususr/ 和你的 weblog 目录
    一般来说 blog 不会太大,不介意的话就整个备份一下。当然最重要的是 ./MT-3.0D-full-en_ususr/db/ 文件夹,里面有所有的数据(如果你没有用 MySQL 作为 MT 的数据存储格式的话)。

    Awstats:
  • /etc/awstats/
    Awstats 的配置文件。诸如:awstats.blog.conf
  • /var/lib/awstats/
    Awstats 的分析留档文件。 诸如:awstats082004.blog.txt

    MRTG:

  • MRTG 的输出文件夹。内有图片和诸如 12.34.56.78_12.34.56.78.log 的log文件。

    三、使用 tar 和 crontab 等简单工具备份。

    以下是使用 tar 的脚本,去掉了多余的说明部分。 您也可以点击这里下载并修改以适合自己的系统。在脚本中我尽量用更多的方法来进行备份。在实际应用中可以将步骤更加简化。更多关于 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)命令不能接受通配符。文件必须明确地列出。上面的例子展示了一种单独地引用文件的方法。您还可以执行脚本来搜索系统,然后建立一个列表。下面就是这样一个脚本的例子:

    #!/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 中的所有现有文件列表复制到 TempList。然后它执行两个 find 命令来搜索文件系统中匹配某个模式的文件,并将它们附加到 TempList。第一次是搜索 /usr/share 目录树中以 .png 结尾的所有文件。第二次是搜索 /tmp 目录树中以 .iso 结尾的所有文件。在建立好列表之后,tar 然后在文件设备 /dev/st0 (第一个 SCSI 磁带设备)上创建 一个新的归档文件,该文件使用 gzip 格式来压缩,并保留所有文件权限。该归档文件将跨越多个卷。要归档的文件的名称将从 TempList 文件中提取。

    四、适用于 log 和数据库的增量备份(incremental backup)。

    对于庞大的 log 或者 数据库文件,每天进行完全备份似乎不是很能合理高效地实现备份工作。所以在较短的时间周期内,适用增量备份(incremental backup)会是一个不错的选择。

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

    tar 并不是最好的增量备份的工具,但是它也可以实现增量备份。参照 『The tar backup program』中的脚本可以实现这个操作。

    简单地介绍一下其原理:
    首先,制作一个完全备份的时间点文件,例如 "full-date"。其中写入某次完全备份的时间点,例如 echo $NOW > full-date
    然后在自定的时间循环期内(例如一周),每次和完全备份时间点(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 中几个开关的简介:

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

    fbackup is a better choice

    在 HP 的论坛上,有关于增量备份的讨论--“Incremental "tar" Backup in HP-Ux”。但是因为我不是 HP 的系统,tar 已经可以满足现有的备份需求。

    五、使用 ssh 实现安全网络远程备份。

    [很抱歉,此段笔者没有试验环境,现在之能添加几篇关于 ssh 远程传送的文章。等到经过试验后,我会添加具体内容。]

  • 33.8. Backing up and restoring over the network
  • 轻松进行自主的、安全的、分布式网络备份

    六、个人使用的 e-mail 简单备份。

    由于 Yahoo!、Google、Hotmail 相继推出了 1-2G 的邮箱,因此可是试着使用带有文件附件的 E-mail 来传输小于各个邮箱的单封信件上限大小的文件。 具体需要用到一些诸如 uudecode 的命令,所以需要先安装一个 Sharutils 。 我在编译中遇到一些简单的错误,这里是我修改过的 Sharutils

    在命令行下发送带附件的邮件时,还是建议使用诸如 MUTT 的 MUA,请查看我的 MUTT 的安装失败经历,也许对新装的用户有所帮助。

    安装完毕后,可以使用 Mutt 的命令行一行解决问题。首先先写一个邮件文本 mailcontent.txt。

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

    结合上面的 shell 脚本,如果你有企业级邮箱的话,不妨也试试这种方法。仅供参考。

    参考文档:

  • 『Windows 到 Linux 之旅:第 8 部分. 备份与恢复 之 Linux 备份与恢复速成指南』

  • 『在 Linux 上进行自动备份--轻松进行自主的、安全的、分布式网络备份』

  • 『在文字模式下用mail如何将文件以附件方式发送』

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

  • 『Filesystem Hierarchy Standard』

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

  • Securing and Optimizing Linux - A Hands on Guide (Red Hat Edition)》 一书的 第 7 章“备份和还原”是另一份不错的指南,其中包括一个脚本,用于执行基于 tar 的增量备份(incremental backup)。

    Useful Links:

  • http://www.linux-backup.net/
  • Sharutils
  • posted @ 2005-11-12 10:37 风中的舞者 阅读(355) | 评论 (0)编辑 收藏
    仅列出标题
    共2页: 上一页 1 2 
    <2024年10月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    常用链接

    留言簿(1)

    随笔档案

    文章档案

    java技术

    搜索

    •  

    最新评论

    阅读排行榜

    评论排行榜