Chinaunix首页 | 论坛 | 博客
  • 博客访问: 694578
  • 博文数量: 245
  • 博客积分: 10037
  • 博客等级: 上将
  • 技术积分: 2512
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-16 17:16
文章分类

全部博文(245)

文章存档

2008年(7)

2007年(238)

我的朋友

分类: LINUX

2007-04-13 01:00:19

.查看软件包包含的文档
 # rpm -qd rpmfilename | less


 .查看软件包安装信息
 #rpm -qi rpmfilename


 .安装时检测内存
 #boot: memtest86


 .安装后检测内存
 #cat /proc/meminfo


 .文本方式安装
 #boot: linux text


 .救援模式下更改根目录
 #chroot /mnt/sysimage


.更改默认运行级
 #vi /etc/inittab
 id:3:initdefault


 .添加引导选项
 #vi /etc/grub/grub.conf


 .yum升级系统
 #vi /etc/yum.conf
 Cachedir     包含高速缓存标题信息的目录         /var/cache/yum
 Debuglevel   控制调试输出的量                   2
 Logfile      yum登录进入的文件                  /var/log/yum.log
 Pkgpolicy    软件包排序(适用于使用多个软件库)   最新排序(安装找到的最新版本)
 Distroverpkg 用于确定发行版本的软件包           fedora-release
 Exactarch    强制yum严格对待软件包archs         1(启用)


.要备份的目录
 /etc        系统范围的配置文件
 /home       用户home目录空间
 /var        系统变量文件、日志、邮件、指印机队列
 /root       root根目录


.更改虚拟终端
 #chvt 3     等同Ctrl_Alt_F3


.检查加载的模块
  lsmod | less


.检查模块信息
  modinfo  modname


.加载模块
  modprobe
  insmod


.ethernet监控
 #etheral


.查看网络路由的问题处
/etc/X11/xorg.conf
Section "ServerLayout"
       Identifier     "single head configuration"     //
       Screen      0(表示显示屏0,多个显示屏的话递增)  "Screen0" 0 0                   //主屏幕, 多数将屏幕标识为screen 0.0
       InputDevice    "Keyboard0" "CoreKeyboard"      //键盘
EndSection


//显示器
Section "Monitor"
        # 1024x768 @ 85.00 Hz (GTF) hsync: 68.60 kHz; pclk: 94.39 MHz
        #Modeline "1024x768_85.00"  94.39  1024 1088 1200 1376  768 769 772 807  -HSync +Vsync
 ### Comment all HorizSync and VertSync values to use DDC:
        Identifier   "Monitor0"
 ### Comment all HorizSync and VertSync values to use DDC:
        HorizSync    60.0 - 90.0
        VertRefresh  80.0 - 110.0
EndSection

//显示卡
Section "Device"
        Identifier  "Videocard0"
        Driver      "i810"         //Intel 810主板(i810, i810-dc100, i810e和i815)
EndSection


//屏幕
Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24           24色
        SubSection "Display"
                Viewport   0 0
                Depth     24          24色可以使用下面3种分辨率
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
EndSection



.系统启动相关
#boot: linux rescue
#chroot /mnt/sysimage
#/sbin/grub-install  /dev/hda
#grub
#grub> root (hd0,
 Possible partitions are:
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 2,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 4,  Filesystem type unknown, partition type 0x82
   Partition num: 5,  Filesystem type is ext2fs, partition type 0x83

grub> root (hd0, 0)  //这里填上第一个etx2fs分区类型的号
grub> setup (hd0)
grub> reboot


.检查文件系统
#fsck  /boot


.检查坏块
#badblocks  -v /dev/hda1


.修复文件系统错误
#e2fsck -fyv  /dev/hda1


.创建分区/dev/hda3
#fdisk /dev/hda


.给/dev/hda3创建文件系统
#mkfs  -t etx2  /dev/hda3


.给分区加标签
#e2label  /dev/hda3  /mnt/backup


.给文件系统使用日志文件系统(etx3)
#tune2fs -j /dev/hda3

.之后在/etc/fstab文件中创建了一项
LABEL=/mnt/backup  /mnt/backup  ext3  default 1 2
这里用LABEL=/mnt/backup来代替 /dev/hda3, 因为/mnt/backup是/dev/hda3的标签

这样引导时就会加载/mnt/backup



[入侵检测]

.检测有无被修改的bin文件
#rpm -Va | grep 'bin\/'


.显示系统中可能被修改的的i属性
#lsattr  /bin/* /sbin/* /usr/bin/* /usr/sbin/* |grep "i--"
---i--------   /bin/login        正常系统上不会有 i--这样属性的文件,一定是被攻击了
阅读(453) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~