在已配置 IPMP 组的系统上,承担主管理员角色或成为超级用户。
主管理员角色拥有主管理员配置文件。有关如何创建该角色并将其指定给用户,请参见《系统管理指南:基本管理》中的第 2 章 “使用 Solaris Management Console(任务)”。
创建一个将静态路由设置为建议目标的 shell 脚本。
例如,可以创建一个名为 ipmp.targets 的包含以下内容的 shell 脚本:
TARGETS="192.168.85.117 192.168.85.127 192.168.85.137" case "$1" in 'start') /usr/bin/echo "Adding static routes for use as IPMP targets" for target in $TARGETS; do /usr/sbin/route add -host $target $target done ;; 'stop') /usr/bin/echo "Removing static routes for use as IPMP targets" for target in $TARGETS; do /usr/sbin/route delete -host $target $target done ;; esac |
将 shell 脚本复制到启动脚本目录中。
# cp ipmp.targets /etc/init.d |
更改新启动脚本的权限。
# chmod 744 /etc/init.d/ipmp.targets |
更改新启动脚本的拥有权。
# chown root:sys /etc/init.d/ipmp.targets |
在 /etc/init.d 目录中为启动脚本创建链接。
# ln /etc/init.d/ipmp.targets /etc/rc2.d/S70ipmp.targets |
文件名 S70ipmp.targets 中的 S70 前缀会将新脚本相对其他启动脚本正确进行排序。