|
楼主 |
发表于 2003-8-15 18:34:31
|
显示全部楼层
例子:
如:RC脚本,
root@www: /etc/rc.d: more runlevel.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<runsol>
<bootwait id="9">
<!-- things to do before we go into a runlevel -->
<run prog="devfsd"/>
<run prog="checkfs"/>
<run prog="swipe"/>
<run prog="mountfs"/>
</bootwait>
<halt id="0">
<run prog="halt"/>
</halt>
<reboot id="6">
<run prog="reboot"/>
</reboot>
<basic id="1">
<run prog="hostname"/>
<run prog="clock"/>
</basic>
<advanced id="2">
<!-- run prog="loadmodules"/ -->
<run prog="chdevperm"/>
<run prog="loopback"/>
<run prog="syslogd"/>
<!-- run prog="dhclient"/ -->
<run prog="cron"/>
<!-- run prog="quota"/ -->
<!-- run prog="gpm"/ -->
</advanced>
<network id="3">
<run prog="networkdevices"/>
<run prog="route"/>
<!-- run prog="mountd"/ -->
<!-- run prog="lpd"/ -->
</network>
<services id="4">
<!-- run prog="startme"/ -->
<run prog="mysqld"/>
<!-- run prog="postgresql"/ -->
<!-- run prog="firebird"/ -->
<run prog="sshd"/>
<!--run prog="sendmail"/-->
<run prog="proftpd"/>
<run prog="apache"/>
<!-- run prog="tomcat"/ -->
<!-- run prog="socksd"/ -->
<!-- run prog="ircd"/ -->
<!-- run prog="masq"/ -->
<run prog="sambad"/>
<!-- run prog="bind"/ -->
<!-- run prog="xinetd"/-->
<!-- run prog="newsd"/ -->
<!-- run prog="squid"/ -->
<!--run prog="dhcpd"/ -->
<!-- run prog="nfsd"/ -->
<!-- run prog="xdm"/ -->
<!-- run prog="netfilter.pl"/ -->
</services>
</runsol>
root@www: /etc/rc.d:
网卡配置:
root@www: /etc/rc.d: more conf/networkdevices.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- example:
<ipv4 dev="eth0" ip="10.1.1.10" bc="10.1.1.255" nm="255.255.255.0" />
dev ... device
ip ... ip-address
bc ... broadcast
nm ... netmask
-->
<network>
<device id="1">
<module name="3c59x" param="" />
<ipv4 dev="eth0" ip="211.92.a.b" bc="211.92.a.d" nm="255.255.255.0" />
</device>
<device id="2">
<module name="8139too" param="" />
<ipv4 dev="eth1" ip="192.168.0.1" bc="" nm="255.255.255.0" />
</device>
</network>
默认已经安装了常用的SERVER软件如apache,mysql,php,postresql,ircd,samba都在samba目录: |
|