当前位置:操作系统 > Unix/Linux >>

lids系列之安装

1 下载LIDS补丁和相关正式的Linux内核

  可以从LIDS Home,LIDS Ftp Home或最近的LIDS Mirror获得LIDS补丁和系统管理工具。

  补丁名称是lids-x.xx-y.y.y.tar.gz, x.xx代表lids的版本, y.y.y代表Linux内核版本.例如, lids-0.9.9-2.2.17.tar.gz代表lids 版本是0.9.9 以及相关的内核版本是2.2.17.。

  必须下载相关的内核版本。例如,你下载了lids-0.9.9-2.2.17.tar.gz,那你就应该下载inux内核2.2.17的原代码。可以从Kernel FTP Site或其他镜象获得内核原码。

  然后,将内核原码和LIDS tar解压.例如,从 www.lids.org得到lids-0.9.9-.2.17.tar.gz,从ftp.us.kernel.org得到linux-2.2.17.tar.bz2后:

  -----------------------------------------------------------

  1. uncompress the Linux kernel source code tree.

  # cd linux_install_path/

  # bzip2 -cd linux-2.2.17.tar.bz2 | tar -xvf -

  2. uncompress the lids source code and install the lidsadm tool.

  # cd lids_install_path

  # tar -zxvf lids-0.9.8-2.2.17.tar.gz

  -----------------------------------------------------------

  2 在正式的linux内核上打LIDS补丁

  Linux内核原码打LIDS补丁

  -----------------------------------------------------------

  # cd linux_install_path/linux

  # patch -p1

  /* link the default source path to lids patched version

  # rm -rf /usr/src/linux

  # ln -s linux_install_patch/linux /usr/src/linux

  3 配置Linux内核

  -----------------------------------------------------------

  configure the Linux kernel

  # cd linux

  # make menuconfig or make xconfig

  -----------------------------------------------------------

  现在,配置Linux内核,按照以下步骤实施:

  [*] Prompt for development and/or incomplete code/drivers

  [*] Sysctl support

  After that, you will find that a new item appear in the bottom of the configura

  tion menu name "Linux Intrusion Detection System". Entering this menu, turn the

  [*] Linux Intrusion Detection System support (EXPERIMENTAL) (NEW).

  配置LIDS内核以后.退出配置界面,编译内核。

  # make dep

  # make clean

  # make bzImage

  # make modules

  # make modules_install

  3.4 在Linux系统上安装LIDS和系统管理工具

  复制 bzImage 到 /boot/ ,编辑 /etc/lilo.conf

  -----------------------------------------------------------

  # cp arch/i386/boot/bzImage /boot/bzImage-lids-0.9.9-2.2.17

  /* build admin tools */

  # cd lids-0.9.8-2.2.17/lidsadm-0.9.8/

  # make

  # make install

  # less /etc/lilo.conf

  boot=/dev/hda

  map=/boot/map

  install=/boot/boot.b

  prompt

  timeout=50

  default=linux

  image=/boot/vmlinuz-2.2.16-3

  label=linux

  read-only

  root=/dev/hda2

  image=/boot/bzImage-lids-0.9.9-2.2.17

  label=dev

  read-only

  root=/dev/hda2

  -----------------------------------------------------------

  运行/sbin/lilo 来安装新内核

  # /sbin/lilo

  5 配置LIDS系统

  在重新启动以前,必须配置lids系统,使其符合你的安全需要.你可以定义受保护的文件,受保护的进程等等。

  缺省情况下,lidsadm将把缺省配置文件安装到 /etc/lids/。你必须根据自己的需要重新配。首先,可以更新缺省lids.conf的inode/dev值。

  # /sbin/lidsadm -U

  6 重新启动系统

  配置完Linux系统后,重新启动.当lilo出现时,选择装载the lids enable kernel。然后,你就将进入美妙的LIDS世界。

  7 封装内核

  系统启动后,不要忘记用lidsadm封装内核,在最后/etc/rc.local加入以下命令

  # /sbin/lidsadm -I

  8 在线管理

  封装完内核后,你的系统就处于LIDS的保护下。可以做一些测试来验证,如果想改变某些配置,例如修改权限,可以通过输入密码方式在线改变lids的安全等级。

  # /sbin/lidsadm -S -- -LIDS

  改变lids配置属性后,例如lids.conf,lids.cap,你可以通过以下命令在内核中重新装载配置文件

  # /sbin/lidsadm -S -- +RELOAD_CONF
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,