|
用LIDS增强系统安全(2) 3.建立安全的Linux系统 看完了LIDS特性,让我们来看看怎么样一步步地用LIDS建立安全的系统。
3.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,那你就应该下载Linux内核2.2.17的原代码。可以从Kernel FTP Site或其他镜象获得内核原码。
然后,将内核原码和LIDS tar解压.例如,从 www.lids.org得到lids-0.9.9-2.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
-----------------------------------------------------------
3.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.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
|