LinuxSir.cn,穿越时空的Linuxsir!

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

请问怎么关闭一些不用的系统服务?

[复制链接]
发表于 2005-5-9 21:14:29 | 显示全部楼层 |阅读模式
我原来在Debian下用的是rcconf,现在到Gentoo下该用什么?
发表于 2005-5-9 21:33:05 | 显示全部楼层

rc-update

gentoo的思想是运行的东西越少越精简越好--你装了某个系统服务--不显式声明起动它也是不会在开机自动运行的,免的没用的服务太多。
rc-update
usage: rc-update -a|add script runlevel2 [runlevel2...]
       rc-update -d|del script [runlevel1...]
       rc-update -s|show [runlevel1...]

note:  After rc-update executes, the script dependency cache is automatically
       updated.

examples:
       rc-update add net.eth0 default
       Adds the net.eth0 script (in /etc/init.d) to the "default" runlevel.

       rc-update del sysklogd
       Deletes the sysklogd script from all runlevels.  The original script
       is not deleted, just any symlinks to the script in /etc/runlevels/*.

       rc-update del net.eth2 default wumpus
       Delete the net.eth2 script from the default and wumpus runlevels.
       All other runlevels are unaffected.  Again, the net.eth2 script
       residing in /etc/init.d is not deleted, just any symlinks in
       /etc/runlevels/default and /etc/runlevels/wumpus.

       rc-update show
       Show all the available scripts and list at which runlevels they
       will execute.
回复 支持 反对

使用道具 举报

发表于 2005-5-9 21:35:24 | 显示全部楼层
# rc-update show
            bootmisc | boot                          
             checkfs | boot                          
           checkroot | boot                          
               clock | boot                          
         consolefont | boot                          
         crypto-loop |                              
          domainname |                              
                 gpm |                              
              hdparm |                              
            hostname | boot                          
           ip6tables |                              
            iptables |                              
             keymaps | boot                          
               local |      default nonetwork        
          localmount | boot                          
             modules | boot                          
            net.eth0 |      default                  
            net.eth1 |      default                  
            net.eth2 |      default                  
              net.lo | boot                          
            netmount |      default                  
                nscd |                              
             numlock |                              
           rmnologin | boot                          
              rsyncd |                              
              serial | boot                          
                sshd |                              
           syslog-ng |      default                  
             urandom | boot                          
          vixie-cron |      default                  
                 xdm |           
记住gentoo是没有rc0-rc6的思想的。我是很喜欢这一点的。
回复 支持 反对

使用道具 举报

发表于 2005-5-9 21:42:04 | 显示全部楼层
你再看看/etc/runlevels下
drwxr-xr-x   2 root root  416 Mar 11 01:51 boot
drwxr-xr-x   2 root root  256 Apr 13 13:38 default
drwxr-xr-x   2 root root   96 Mar 11 01:51 nonetwork
drwxr-xr-x   2 root root   72 Mar 11 01:51 single
和/etc/inittab
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
应该很明显了:)
这点和freebsd也差不多--单用户-多用户。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-9 22:55:21 | 显示全部楼层
多谢fei同志的教导
主要是用了Azureus后内存严重不足,自从用Linux以来第一次看到swap被使用到的情况……所以总想关闭一些服务来释放内存……
问一下:
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
这个一堆的agetty是干什么用的?
回复 支持 反对

使用道具 举报

发表于 2005-5-9 23:40:11 | 显示全部楼层
还是不要用Azureus,严重推荐btlaunchmanycurses.py
回复 支持 反对

使用道具 举报

发表于 2005-5-9 23:41:39 | 显示全部楼层
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
6704 gray      15   0 47812  10m 1720 S  1.0  2.1  10:50.78 btlaunchmanycur
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-9 23:50:51 | 显示全部楼层
Post by graydream
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
6704 gray      15   0 47812  10m 1720 S  1.0  2.1  10:50.78 btlaunchmanycur


ADSL网络环境下使用,速度如何?设置选项是否够丰富,以便能够为网络做最大优化?有没有图形界面?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-10 00:01:38 | 显示全部楼层
再问一下,我的root用户登录默认都是进gnome,但我根本没装gnome,只是用gdm做登录管理器而已,每次进去都还要选择一下KDE,请问这是虾米回事?
回复 支持 反对

使用道具 举报

发表于 2005-5-10 09:20:33 | 显示全部楼层
控制台终端--我只开两个--后面的都去掉--然后init q就行了。
后台进程越少越好。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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