找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7666|回复: 2

求助!熟悉Debian的请进,强烈邀请情灭进来给点建议!

[复制链接]
发表于 2006-9-13 17:56:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
Debian这个Linux和其它的有好多的不一样的地方,从加载启动项(一些术语我说的可能不对,我说的是,如果想让一个脚本文件一开机就自动运行)说吧,在redhat下面的话,加到rc.local就可以了,可是在Debian下没这个东东,我不知道是不是新建一个这样的文件;Debian下面在/etc下面有好几个从rc0-rc9的文件,不知道它们的作用什么。这是问题一
     还有就是我看了很多关于在Linux下面做双线的教程,可是很少有提到DNS这方面的,我想做到让Debian也可以像ros那样‘允许远程请求’,也就是工作站的DNS配置成ROS的IP就行了,我感觉Debian能完成这样的工作,在这里希望有高手给我指点下。
     再有就是如果在Linux下面做多网卡绑定一个IP,是不是一定要编译下内核。
     希望个位高手能给我指点一下;现在想起来真是后悔,要知道现在这么的糗,当时在学校我就少在宿舍睡会儿觉了,现在只能重拾以前的那些书,临时抱下佛脚了,幸好没跟着同学卖掉书;可是自身悟性不高,希望在这个摸索的过程中你们扶持我一把,在此十分感谢!
routeros
发表于 2006-9-20 07:39:16 | 显示全部楼层
玩游戏EVE几个月了以来,一直潜水,没想到还有朋友记得在下,在此表示感谢

1 关于debian,我说明一下,他的启动项管理和redhat是有点区别,但是区别也不是很大,我现在简单的给你说一下,希望对你有所帮助,首先,让我们来看一下readme,养成习惯,学会自己去找答案
  GNU nano 1.2.4               File: /etc/rcS.d/README                          
我简单的给你翻译一下

The scripts in this directory are executed once when booting the system,
此目录下的脚本在系统引导期间会被执行一次
even when booting directly into single user mode. The files are all symbolic
单用户模式的时候也同样被执行
links, the real files are located in /etc/init.d/ . For a more general
这些文件都是符号连接,其真实文件是在/etc/init.d下面,
discussion of this technique, see /etc/init.d/README.

The following sequence points are defined at this time:

* After the S40 scripts have executed, all local file systems are mounted
  and networking is available. All device drivers have been initialized.

S40以后,本地文件系统已经挂载完毕,网络已启用,并且所有的驱动器已经初始话完毕
* After the S60 scripts have executed, the system clock has been set, NFS
当S60已经运行完毕以后,系统时间就已经设置完毕
  filesystems have been mounted (unless the system depends on the automounter,
NFS文件系统已挂载完毕
  which is started later) and the filesystems have been cleaned.
但是系统靠automounter来自动挂载的除外,同时文件系统已经完成清理





                               [ Read 15 lines ]
^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Txt ^T To Spell  
如以下所视
movie:~# nano /etc/rc
rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rcS.d  
movie:~# nano /etc/rcS.d/
README                S26lvm                S40networking
S02mountvirtfs        S30checkfs.sh         S41hotplug-net
S05bootlogd           S30procps.sh          S43portmap
S05initrd-tools.sh    S35mountall.sh        S45mountnfs.sh
S05keymap.sh          S36discover           S48console-screen.sh
S10checkroot.sh       S36mountvirtfs        S50hwclock.sh
S18hwclockfirst.sh    S38pppd-dns           S55bootmisc.sh
S18ifupdown-clean     S39dns-clean          S55urandom
S20module-init-tools  S39ifupdown           S70nviboot
S20modutils           S40hostname.sh        S70xfree86-common
S25libdevmapper1.01   S40hotplug            
movie:~# nano /etc/rcS.d/
这里的rcS.d目录以下的内容就是系统启动项目,S表示system,下面的数字是执行顺序,数字越小表示优先级越高,而且如下图

movie:~# ll /etc/rcS.d/|more
总用量 4
-rw-r--r--  1 root root 701 2004-09-10 23:00 README
lrwxrwxrwx  1 root root  21 2006-05-20 02:30 S02mountvirtfs -> ../init.d/mountvi
rtfs
lrwxrwxrwx  1 root root  18 2006-05-20 02:30 S05bootlogd -> ../init.d/bootlogd
lrwxrwxrwx  1 root root  25 2006-05-20 02:31 S05initrd-tools.sh -> ../init.d/ini
trd-tools.sh
lrwxrwxrwx  1 root root  19 2006-05-20 02:30 S05keymap.sh -> ../init.d/keymap.sh
lrwxrwxrwx  1 root root  22 2006-05-20 02:30 S10checkroot.sh -> ../init.d/checkr
oot.sh
lrwxrwxrwx  1 root root  25 2006-05-20 02:30 S18hwclockfirst.sh -> ../init.d/hwc
lockfirst.sh
lrwxrwxrwx  1 root root  24 2006-05-20 02:30 S18ifupdown-clean -> ../init.d/ifup
down-clean
lrwxrwxrwx  1 root root  27 2006-05-20 02:33 S20module-init-tools -> ../init.d/m
odule-init-tools
lrwxrwxrwx  1 root root  18 2006-05-20 02:30 S20modutils -> ../init.d/modutils
lrwxrwxrwx  1 root root  26 2006-05-20 02:31 S25libdevmapper1.01 -> ../init.d/li

看上面的结合这句话理解
The files are all symbolic
单用户模式的时候也同样被执行
links, the real files are located in /etc/init.d/ . For a more general
这些文件都是符号连接,其真实文件是在/etc/init.d下面,
关于启动我就不多说了,自己去理解,别人嚼烂了的东西爱好学习的人肯定是不会吃的,再好的东西要自己去咀嚼,去消化

还有就是我看了很多关于在Linux下面做双线的教程,可是很少有提到DNS这方面的,我想做到让Debian也可以像Ros那样‘允许远程请求’,也就是工作站的DNS配置成Ros的IP就行了,我感觉Debian能完成这样的工作,在这里希望有高手给我指点下。

关于这个,我简单给你指一条学习路线,所谓的允许远程请求,也就是个DNS服务器,自己上网查资料看一下


再有就是如果在Linux下面做多网卡绑定一个IP,是不是一定要编译下内核。
这个给你说一下,我用的stable的
movie:~# uname -a
Linux movie 2.6.8-3-686 #1 Thu Feb 9 07:39:48 UTC 2006 i686 GNU/Linux
这个做bonding是不需要重新编译内核的,但是如果你想熟悉debian的话,建立你要学习到熟练剪裁内核,debian和gentoo的内核编译是最最easy的
下面给你看下debian下的bonding的简单配置文件

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5)
auto lo
iface lo inet loopback
auto bond0 eth0 eth1 eth2
iface bond0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
pre-up ifconfig bond0 hw ether 00:03:99:88:91:13
pre-up ifconfig eth0 up && ifconfig eth1 up
up ifenslave bond0 eth0 eth1
down ifenslave bond0 eth0 eth1
post-down ifconfig eth0 down && ifconfig eth1 down
#auto eth0
iface eth0 inet static
address 192.168.1.251
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
#auto eth1
iface eth1 inet static
address 192.168.1.252
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

#auto eth2
iface eth2 inet static
address 192.168.0.246
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

但是这里先说清楚,ifenslave  这个软件包,我平常pxe安装上的debian是不带,自己apt-get install吧,然后如果差什么自己就安装什么,好了废话不多说了,下潜
routeros
回复

使用道具 举报

 楼主| 发表于 2006-9-21 06:53:50 | 显示全部楼层
情灭,再次谢谢你,没想到回我帖的还真是你!
routeros
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-10-2 07:01 , Processed in 0.045531 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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