LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 851|回复: 2

Gentoo SELinux安装(x86)

[复制链接]
发表于 2004-11-7 11:14:55 | 显示全部楼层 |阅读模式
基本同gentoo的普通安装方法,
需要注意的几点:

1.下载selinux stage
比如stage1-x86-selinux-2004.2.tar.bz2安装基本系统
chroot时要
# mount -t proc none /mnt/gentoo/proc
# mount -t selinuxfs none /mnt/gentoo/selinux
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# emerge sync.........

2.安装配置内核时(对了,selinux仅支持ext2/3 ,xfs)
selinux-sources (the base 2.4 kernel source with SELinux patch),
hardened-sources (kernel source patched with SELinux and other security features),
hardened-dev-sources (kernel v2.6 source patched with other security features)
推荐用hardened-dev-sources,

# emerge hardened-dev-sources

make menuconfig时注意
  1. Under "Code maturity level options"
  2. [*] Prompt for development and/or incomplete code/drivers

  3. Under "General setup"
  4. [*] Auditing support

  5. Under "File systems"
  6. <*> Second extended fs support (If using ext2)
  7. [*]   Ext2 extended attributes
  8. [ ]     Ext2 POSIX Access Control Lists
  9. [*]     Ext2 Security Labels
  10. <*> Ext3 journalling file system support (If using ext3)
  11. [*]   Ext3 extended attributes
  12. [ ]     Ext3 POSIX Access Control Lists
  13. [*]     Ext3 security labels   
  14. <*> XFS filesystem support (If using XFS)
  15. [ ]   Realtime support (EXPERIMENTAL)
  16. [ ]   Quota support
  17. [ ]   ACL support
  18. [*]   Security Labels

  19. [*] /proc file system support
  20. [ ] /dev file system support (EXPERIMENTAL)
  21. [*] /dev/pts file system for Unix98 PTYs (This option does not appear in 2.6, it is always on)
  22. [*]   /dev/pts Extended Attributes
  23. [*]     /dev/pts Security Labels   
  24. [*] Virtual memory file system support (former shm fs)

  25. Under "Security options"
  26. [*] Enable different security models
  27. [*] Socket and Networking Security Hooks
  28. <*> Capabilities Support
  29. [*] NSA SELinux Support
  30. [ ]   NSA SELinux boot parameter
  31. [ ]   NSA SELinux runtime disable
  32. [*]   NSA SELinux Development Support
  33. [ ]   NSA SELinux MLS policy (EXPERIMENTAL)

复制代码


3.写/etc/fstab
默认的
none        /proc     proc        defaults          0 0
none        /dev/shm  tmpfs       defaults          0 0
none        /dev/pts  devpts      gid=5,mode=620    0 0
none        /selinux  selinuxfs   defaults          0 0
不要去掉了

4.安装完成后,准备重启时要relabel the filesystems:

# cd /etc/security/selinux/src/policy/
Adjust policy version if needed.
# make load
# make chroot_relabel

重启
# exit
# umount /mnt/gentoo/proc /mnt/gentoo/selinux /mnt/gentoo
# reboot

再次relabel:
# cd /etc/security/selinux/src/policy
# make relabel

接下来增加一个普通用户,emerge xorg gnome什么的
发表于 2004-11-7 12:03:05 | 显示全部楼层
什么是SELinux?
发表于 2004-11-7 12:07:34 | 显示全部楼层
安全增强linux
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表