Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2013-02-12 21:25:45
Size: 9083
Editor: MaYong
Comment:
Revision 5 as of 2014-02-15 15:18:00
Size: 8487
Editor: LukeCall
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
如果希望自动安装更新可以容易地做到,它仅需安装 {{{unattended-upgrades}}} 软件包。 如果希望自动安装更新可以容易地做到,它仅需安装 {{{unattended-upgrades}}} ( [[https://wiki.debian.org/UnattendedUpgrades|wiki.debian.org/UnattendedUpgrades]]) 软件包。
Line 23: Line 23:
== Backup Management ==
For backup management point your browser to https://www/slbackup-php. Please note that you need to access this site via SSL, since you have to enter the root password there. If you try to access this site without using SSL it will fail.
== 备份管理 ==
作为备份管理,指向你的浏览器到 https://www/slbackup-php。请注意你需要通过 SSL 访问这个位置,直到你在那里输入 root 密码。如果你尝试不使用 SSL 来访问这个位置它将失败。
Line 26: Line 26:
By default tjener will back up {{{/skole/tjener/home0}}}, {{{/etc/}}}, {{{/root/.svk}}} and LDAP to /skole/backup which is under the LVM. If you only want to have spare copies of things (in case you delete them) this setup should be fine for you. 默认的 tjener 将备份 {{{/skole/tjener/home0}}}, {{{/etc/}}}, {{{/root/.svk}}} 和 LDAP 到 LVM 下面的 /skole/backup。如果你仅想对一些事情有备用复制(以防你删除它们),这个设置应该适合你。
Line 28: Line 28:
/!\ Be aware that this backup scheme doesn't protect you from failing hard drives. /!\ 要意识到这个备份计划你不能从损坏的硬盘得到保障。
Line 30: Line 30:
If you want to back up your data to an external server, a tape device or another hard drive you'll have to modify the existing configuration a bit. 如果你想备份你的数据到一台外部服务器,一台磁带设备或者其他硬盘,你需要对现有配置做一点修改。
Line 32: Line 32:
If you want to restore a complete folder, your best option is to use the command-line: 如果你想恢复全部文件夹,你最好选择使用命令行:
Line 40: Line 40:
This will leave the content from {{{/skole/tjener/home0/user}}} for {{{<date>}}} in the folder {{{/skole/tjener/home0/user_<date>}}} 这将从 {{{/skole/tjener/home0/user}}} {{{<date>}}} 分离 {{{/skole/tjener/home0/user_<date>}}} 文件夹
Line 42: Line 42:
If you want to restore a single file, then you should be able to select the file (and the version) from the web interface, and download only that file. 如果你想还原单个文件,那你可以从 web 界面选择那个文件(和版本)并仅下载那个文件。
Line 44: Line 44:
If you want to get rid of older backups, choose "Maintenance" in the menu on the backup page and select the oldest snapshot to keep: 如果你想释放较早的备份,在备份页面的菜单中选择 "Maintenance" 并选择最早快照来保留:
Line 46: Line 46:
{{attachment:slbackup-php_maintenance.png|slbackup-php Maintenance|width=1024}} {{attachment:slbackup-php_maintenance.png|slbackup-php 管理|width=1024}}
Line 48: Line 48:
== Server Monitoring == == 服务器监控 ==
Line 52: Line 52:
The Munin trend reporting system is available from [[https://www/munin/]]. It provides system status measurement graphs on a daily, weekly, monthly and yearly basis, and provides the system administrator with help when looking for bottlenecks and the source of system problems. Munin 是从 [[https://www/munin/]] 获得的趋势报告系统。它提供基于每一天,每周,每月和每年的系统地位测量曲线图,供系统管理者审视瓶颈和系统难题的成因时以帮助。
Line 54: Line 54:
The list of machines being monitored using Munin is generated automatically, based on the list of hosts reporting to sitesummary. All hosts with the package munin-node installed are registered for Munin monitoring. It will normally take one day from a machine being installed until Munin monitoring starts, because of the order the cron jobs are executed. To speed up the process, run {{{sitesummary-update-munin}}} as root on the sitesummary server (normally the main-server). This will update the {{{/etc/munin/munin.conf}}} file. Munin 自动生成用以监控机器的清单,基于主机的清单报告给 sitesummary。所有主机安装 munin-node 软件包为 Munin 监控注册。它将常规在 Munin 监控启动的某一天从一台机器安装,是由于 cron 工作执行次序的原因。在 sitesummary 服务器(通常是主服务器)作为 root 运行 {{{sitesummary-update-munin}}} 来加速这个过程。这将更新 {{{/etc/munin/munin.conf}}} 文件。
Line 56: Line 56:
The set of measurements being collected is automatically generated on each machine using the {{{munin-node-configure}}} program, which probes the plugins available from {{{/usr/share/munin/plugins/}}} and symlinks the relevant ones to {{{/etc/munin/plugins/}}}. 这个检测设置使用 {{{munin-node-configure}}} 程序在每台机器上自动生成收集,探测插件可从 {{{/usr/share/munin/plugins/}}} 及其相关符号链接 {{{/etc/munin/plugins/}}} 获得。
Line 58: Line 58:
Information about Munin is available from http://munin.projects.linpro.no/ . 有关 Munin 的信息可从 http://munin.projects.linpro.no/ 获得。
Line 62: Line 62:
Nagios system and service monitoring is available from [[https://www/nagios3/]]. The set of machines and services being monitored is automatically generated using information collected by the sitesummary system. The machines with the profile Main-server and Thin-client-server receive full monitoring, while workstations and thin clients receive simple monitoring. To enable full monitoring on a workstation, install the {{{nagios-nrpe-server}}} package on the workstation. Nagios 系统和服务监控可以从 [[https://www/nagios3/]] 获得。机器的设置和服务的监控使用由 sitesummary 系统收集的信息自动生成。有主服务器和瘦客户机服务器内容的机器受到完全监控,而工作站和瘦客户机受到单一的监控。在一台工作站上做到完全监控,在工作站上安装 {{{nagios-nrpe-server}}} 软件包。
Line 64: Line 64:
The username is {{{nagiosadmin}}} and the default password is {{{skolelinux}}}.
For security reasons, avoid using the same password as root. To change the password you can run the following command as root:
这个用户名是 {{{nagiosadmin}}} 并且默认密码是 {{{skolelinux}}}。
出于安全原因,避免使用与 root 同样的密码。改变密码你可以作为 root 运行下面的命令:
Line 71: Line 71:
By default Nagios does not send email. This can be changed by replacing {{{notify-by-nothing}}} with {{{host-notify-by-email}}} and {{{notify-by-email}}} in the file {{{/etc/nagios3/sitesummary-template-contacts.cfg}}}. 缺省的 Nagios 不发送电子邮件。这可以在文件 {{{/etc/nagios3/sitesummary-template-contacts.cfg}}} 中以 {{{host-notify-by-email}}} 和 {{{notify-by-email}}} 取代 {{{notify-by-nothing}}} 来改变。
Line 73: Line 73:
The Nagios configuration file used is {{{/etc/nagios3/sitesummary.cfg}}}. The sitesummary cron job generates {{{/var/lib/sitesummary/nagios-generated.cfg}}} with the list of hosts and services to monitor. Nagios 配置文件使用的是 {{{/etc/nagios3/sitesummary.cfg}}} sitesummary cron 工作生成主机和服务清单 {{{/var/lib/sitesummary/nagios-generated.cfg}}} 给监控器。
Line 75: Line 75:
Extra Nagios checks can be put in the file {{{/var/lib/sitesummary/nagios-generated.cfg.post}}} to get them included in the generated file. 附加的 Nagios 检查可以置于 {{{/var/lib/sitesummary/nagios-generated.cfg.post}}} 文件中,让它们包含在生成文件中。
Line 77: Line 77:
Information about Nagios is available from http://www.nagios.org/ or in the {{{nagios3-doc}}} package. 有关 Nagios 的信息可从 http://www.nagios.org/ 或者在 {{{nagios3-doc}}} 软件包中获得。
Line 79: Line 79:
==== Common Nagios warnings and how to handle them ==== ==== 通常的 Nagios 提示和如何掌握它们 ====
Line 81: Line 81:
Here are instructions on how to handle the most common Nagios warnings. 这里是传授如何掌握最通常的 Nagios 提醒。
Line 85: Line 85:
The partition (/usr/ in the example) is too full. There are in general two ways to handle this: (1) remove some files or (2) increase the size of the partition. If the partition is /var/, purging the APT cache by calling {{{apt-get clean}}} might remove some files. If there is more room available in the LVM volume group, running the program {{{debian-edu-fsautoresize}}} to extend the partitions might help. To run this program automatically every hour, the host in question can be added to the {{{fsautoresize-hosts}}} netgroup. 该分区(示例中的 /usr/)已满。一般有两种方法对待这个:(1)移除一些文件或者(2)增加该分区容量。如果该分区是 /var/,通过 {{{apt-get clean}}} 清除 APT 仓库可以移除一部分文件。如果在 LVM 卷组中有更多空间可用,运行程序 {{{debian-edu-fsautoresize}}} 可以帮助扩展分区。可以考虑把这台主机添加到 {{{fsautoresize-hosts}}} 网络组来每小时自动运行该程序。
Line 89: Line 89:
New package are available for upgrades. The critical ones are normally security fixes. To upgrade, run 'apt-get upgrade && apt-get dist-upgrade' as root in a konsole or log in via ssh to do the same. On thin client servers, remember to also update the LTSP chroot using {{{ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade}}}. 新软件包可用于升级。这是一个关键性的常规安全修正。作为 root 在 konsole 或者通过 ssh 登录来运行 'apt-get upgrade && apt-get dist-upgrade' 来升级。在瘦客户机服务器中,记得也要用 {{{ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade}}} 升级 LTSP chroot。
Line 91: Line 91:
If you do not want to manually upgrade packages and trust Debian to do a good job with new versions, you can install the {{{unattended-upgrades}}} package and configure it to automatically upgrade all new packages every night. This will not upgrade the LTSP chroots. 如果你不想手工升级软件包并相信 Debian 对新版本做到好的工作,你可以安装 {{{unattended-upgrades}}} ([[https://wiki.debian.org/UnattendedUpgrades|wiki.debian.org/UnattendedUpgrades]]) 软件包并配置它于每晚自动升级所有新软件包。这将不升级 LTSP chroot。
Line 93: Line 93:
To upgrade the LTSP chroot, one can use {{{ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade}}}.  On 64-bit servers, one will have to add {{{-a i386}}} as an argument to ltsp-chroot.  It is a good idea to update the chroot when updating the host system. 升级 LTSP chroot,一个可以使用 {{{ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade}}} 。在64位服务器,应以 {{{-a i386}}} 作为一个依据添加到 ltsp-chroot 。在更新主机系统时它是更新 chroot 的好主意。
Line 97: Line 97:
The running kernel is older than the newest installed kernel, and a reboot is required to activate the newest installed kernel. This is normally fairly urgent, as new kernels normally show up in Debian Edu to fix security issues. 当安装最新内核时运行着较旧内核,需要一次重新启动使安装的最新内核工作。这是常规的相当迫切在 Debian Edu 修正安全发布作为新内核常规显示出来。
Line 101: Line 101:
The printer queues in CUPS have a lot of jobs pending. This is most likely because of a unavailable printer. Disabled print queues are enabled every hour on hosts that are member of the {{{cups-queue-autoreenable-hosts}}} netgroup, so for such hosts no manual action should be required. The print queues are emptied every night on hosts that are member of the {{{cups-queue-autoflush-hosts}}} netgroup. If a host have a lot of jobs in their queue, consider adding this host to one or both of these netgroups. 打印机列队在 CUPS 中有大量待完成任务。这最可能是由于一台不可用的打印机。使作为 {{{cups-queue-autoreenable-hosts}}} 网络组成员的主机能够在每小时恢复失败打印列队工作,那样无需手工操作此主机。在 {{{cups-queue-autoflush-hosts}}} 网络组成员的主机在每晚清空打印列队。如果一台主机在它们的列队中有大量任务,考虑添加这台主机到这些网络组之一或此二者。
Line 105: Line 105:
Sitesummary is used to collect information from each computer and submit it to the central server. The information collected is available in {{{/var/lib/sitesummary/entries/}}}. Scripts in {{{/usr/lib/sitesummary/}}} are available to generate reports. Sitesummary 用于从每台计算机收集信息并提交到中央服务器。收集到的信息可在 {{{/var/lib/sitesummary/entries/}}} 中得到。在 {{{/usr/lib/sitesummary/}}} 中的脚本可用于生成报告。
Line 107: Line 107:
A simple report from sitesummary without any details is available from [[https://www/sitesummary/]]. 一个来自 sitesummary 无任何细目的简单报告从 [[https://www/sitesummary/]] 获得。
Line 109: Line 109:
Some documentation on sitesummary is available from http://wiki.debian.org/DebianEdu/HowTo/SiteSummary http://wiki.debian.org/DebianEdu/HowTo/SiteSummary 可得到一些 sitesummary 文档
Line 111: Line 111:
== More information about Debian Edu customisations == == 有关定制 Debian Edu 的更多信息 ==
Line 113: Line 113:
More information about Debian Edu customisations useful for system administrators can be found in the [[DebianEdu/Documentation/Wheezy/HowTo/Administration|Administration Howto chapter]]. 更多的对于系统管理员有用的定制 Debian Edu 的相关信息可以在 [[DebianEdu/Documentation/Wheezy/HowTo/Administration|如何管理章节]] 中找到。

维护

更新软件

这部分讲解如何使用 aptitude upgrade

使用 aptitude 非常简单。你需要以 root 在命令行执行两个命令来更新系统: aptitude update (更新可用的软件包清单)和 aptitude upgrade (升级可以升级的软件包)。

安装 cron-aptapt-listchanges 也是一个好方法,配置它们发送邮件到一个你读取的地址。

cron-apt 将一天一次通过电子邮件通知你任何可升级的软件包。它不安装这些升级,但下载它们(通常在夜间),那样当你执行 aptitude upgrade 时你不用等待下载。

如果希望自动安装更新可以容易地做到,它仅需安装 unattended-upgrades ( wiki.debian.org/UnattendedUpgrades) 软件包。

apt-listchanges 可以通过电子邮件发送新变更记录给你,或者选择在运行 aptitudeapt-get 时在终端里显示它们。

保留你自己关于安全更新情况的信息

当安全更新可获得安装软件包时运行 cron-apt 是作为上文描述的一个好方法。另一个保留有关安全更新信息的方法是来订阅 Debian 安全通告邮件列表,同样有益于通知你有关的安全更新。下面(比较 cron-apt)同样包含关于软件包更新信息但是不安装。

备份管理

作为备份管理,指向你的浏览器到 https://www/slbackup-php。请注意你需要通过 SSL 访问这个位置,直到你在那里输入 root 密码。如果你尝试不使用 SSL 来访问这个位置它将失败。

默认的 tjener 将备份 /skole/tjener/home0, /etc/, /root/.svk 和 LDAP 到 LVM 下面的 /skole/backup。如果你仅想对一些事情有备用复制(以防你删除它们),这个设置应该适合你。

/!\ 要意识到这个备份计划你不能从损坏的硬盘得到保障。

如果你想备份你的数据到一台外部服务器,一台磁带设备或者其他硬盘,你需要对现有配置做一点修改。

如果你想恢复全部文件夹,你最好选择使用命令行:

$ sudo rdiff-backup -r <date>  \
   /skole/backup/tjener/skole/tjener/home0/user \
   /skole/tjener/home0/user_<date>

这将从 /skole/tjener/home0/user<date> 分离 /skole/tjener/home0/user_<date> 文件夹

如果你想还原单个文件,那你可以从 web 界面选择那个文件(和版本)并仅下载那个文件。

如果你想释放较早的备份,在备份页面的菜单中选择 "Maintenance" 并选择最早快照来保留:

[ATTACH]

服务器监控

Munin

Munin 是从 https://www/munin/ 获得的趋势报告系统。它提供基于每一天,每周,每月和每年的系统地位测量曲线图,供系统管理者审视瓶颈和系统难题的成因时以帮助。

Munin 自动生成用以监控机器的清单,基于主机的清单报告给 sitesummary。所有主机安装 munin-node 软件包为 Munin 监控注册。它将常规在 Munin 监控启动的某一天从一台机器安装,是由于 cron 工作执行次序的原因。在 sitesummary 服务器(通常是主服务器)作为 root 运行 sitesummary-update-munin 来加速这个过程。这将更新 /etc/munin/munin.conf 文件。

这个检测设置使用 munin-node-configure 程序在每台机器上自动生成收集,探测插件可从 /usr/share/munin/plugins/ 及其相关符号链接 /etc/munin/plugins/ 获得。

有关 Munin 的信息可从 http://munin.projects.linpro.no/ 获得。

Nagios

Nagios 系统和服务监控可以从 https://www/nagios3/ 获得。机器的设置和服务的监控使用由 sitesummary 系统收集的信息自动生成。有主服务器和瘦客户机服务器内容的机器受到完全监控,而工作站和瘦客户机受到单一的监控。在一台工作站上做到完全监控,在工作站上安装 nagios-nrpe-server 软件包。

这个用户名是 nagiosadmin 并且默认密码是 skolelinux出于安全原因,避免使用与 root 同样的密码。改变密码你可以作为 root 运行下面的命令:

htpasswd /etc/nagios3/htpasswd.users nagiosadmin

缺省的 Nagios 不发送电子邮件。这可以在文件 /etc/nagios3/sitesummary-template-contacts.cfg 中以 host-notify-by-emailnotify-by-email 取代 notify-by-nothing 来改变。

Nagios 配置文件使用的是 /etc/nagios3/sitesummary.cfg。 sitesummary cron 工作生成主机和服务清单 /var/lib/sitesummary/nagios-generated.cfg 给监控器。

附加的 Nagios 检查可以置于 /var/lib/sitesummary/nagios-generated.cfg.post 文件中,让它们包含在生成文件中。

有关 Nagios 的信息可从 http://www.nagios.org/ 或者在 nagios3-doc 软件包中获得。

通常的 Nagios 提示和如何掌握它们

这里是传授如何掌握最通常的 Nagios 提醒。

DISK CRITICAL - free space: /usr 309 MB (5% inode=47%):

该分区(示例中的 /usr/)已满。一般有两种方法对待这个:(1)移除一些文件或者(2)增加该分区容量。如果该分区是 /var/,通过 apt-get clean 清除 APT 仓库可以移除一部分文件。如果在 LVM 卷组中有更多空间可用,运行程序 debian-edu-fsautoresize 可以帮助扩展分区。可以考虑把这台主机添加到 fsautoresize-hosts 网络组来每小时自动运行该程序。

APT CRITICAL: 13 packages available for upgrade (13 critical updates).

新软件包可用于升级。这是一个关键性的常规安全修正。作为 root 在 konsole 或者通过 ssh 登录来运行 'apt-get upgrade && apt-get dist-upgrade' 来升级。在瘦客户机服务器中,记得也要用 ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade 升级 LTSP chroot。

如果你不想手工升级软件包并相信 Debian 对新版本做到好的工作,你可以安装 unattended-upgrades (wiki.debian.org/UnattendedUpgrades) 软件包并配置它于每晚自动升级所有新软件包。这将不升级 LTSP chroot。

升级 LTSP chroot,一个可以使用 ltsp-chroot apt-get update && ltsp-chroot apt-get upgrade 。在64位服务器,应以 -a i386 作为一个依据添加到 ltsp-chroot 。在更新主机系统时它是更新 chroot 的好主意。

WARNING - Reboot required : running kernel = 2.6.32-37.81.0, installed kernel = 2.6.32-38.83.0

当安装最新内核时运行着较旧内核,需要一次重新启动使安装的最新内核工作。这是常规的相当迫切在 Debian Edu 修正安全发布作为新内核常规显示出来。

WARNING: CUPS queue size - 61

打印机列队在 CUPS 中有大量待完成任务。这最可能是由于一台不可用的打印机。使作为 cups-queue-autoreenable-hosts 网络组成员的主机能够在每小时恢复失败打印列队工作,那样无需手工操作此主机。在 cups-queue-autoflush-hosts 网络组成员的主机在每晚清空打印列队。如果一台主机在它们的列队中有大量任务,考虑添加这台主机到这些网络组之一或此二者。

Sitesummary

Sitesummary 用于从每台计算机收集信息并提交到中央服务器。收集到的信息可在 /var/lib/sitesummary/entries/ 中得到。在 /usr/lib/sitesummary/ 中的脚本可用于生成报告。

一个来自 sitesummary 无任何细目的简单报告从 https://www/sitesummary/ 获得。

http://wiki.debian.org/DebianEdu/HowTo/SiteSummary 可得到一些 sitesummary 文档

有关定制 Debian Edu 的更多信息

更多的对于系统管理员有用的定制 Debian Edu 的相关信息可以在 如何管理章节 中找到。

CategoryPermalink