原理:
步骤:
1.安装vsftpd服务
# yum install vsftpd
# rpm -ql vsftpd
/etc/logrotate.d/vsftpd
/etc/pam.d/vsftpd
/etc/rc.d/init.d/vsftpd
/etc/vsftpd
/etc/vsftpd/ftpusers
/etc/vsftpd/user_list
/etc/vsftpd/vsftpd.conf
/etc/vsftpd/vsftpd_conf_migrate.sh
/usr/sbin/vsftpd
...
...
/var/ftp
/var/ftp/pub
# service vsftpd start
# chkconfig vsftpd on
# chkconfig --list | grep vsftpd
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom
# cp -r /mnt/cdrom/. /var/ftp/ (把光盘上所有文件拷贝到ftp的根目录)
# du -sh /var/ftp
3.8G /var/ftp
2.安装dhcp服务并配置
# yum install dhcp
# rpm -ql dhcp
/etc/dhcp
/etc/dhcp/dhcpd.conf
/etc/dhcp/dhcpd6.conf
/etc/openldap/schema/dhcp.schema
/etc/portreserve/dhcpd
/etc/rc.d/init.d/dhcpd
/etc/rc.d/init.d/dhcpd6
/etc/rc.d/init.d/dhcrelay
/etc/rc.d/init.d/dhcrelay6
/etc/sysconfig/dhcpd
/etc/sysconfig/dhcpd6
/etc/sysconfig/dhcrelay
/etc/sysconfig/dhcrelay6
/usr/bin/omshell
/usr/sbin/dhcpd
/usr/sbin/dhcrelay
/usr/share/doc/dhcp-4.1.1
/usr/share/doc/dhcp-4.1.1/3.0b1-lease-convert
/usr/share/doc/dhcp-4.1.1/IANA-arp-parameters
/usr/share/doc/dhcp-4.1.1/README.ldap
/usr/share/doc/dhcp-4.1.1/api+protocol
/usr/share/doc/dhcp-4.1.1/dhclient-tz-exithook.sh
/usr/share/doc/dhcp-4.1.1/dhcpd-conf-to-ldap
/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample
/usr/share/doc/dhcp-4.1.1/dhcpd6.conf.sample
/usr/share/doc/dhcp-4.1.1/draft-ietf-dhc-ldap-schema-01.txt
/usr/share/doc/dhcp-4.1.1/ms2isc
/usr/share/doc/dhcp-4.1.1/ms2isc/Registry.perlmodule
/usr/share/doc/dhcp-4.1.1/ms2isc/ms2isc.pl
/usr/share/doc/dhcp-4.1.1/ms2isc/readme.txt
/usr/share/doc/dhcp-4.1.1/sethostname.sh
/usr/share/doc/dhcp-4.1.1/solaris.init
/usr/share/man/man1/omshell.1.gz
/usr/share/man/man5/dhcpd.conf.5.gz
/usr/share/man/man5/dhcpd.leases.5.gz
/usr/share/man/man8/dhcpd.8.gz
/usr/share/man/man8/dhcrelay.8.gz
/var/lib/dhcpd
/var/lib/dhcpd/dhcpd.leases
/var/lib/dhcpd/dhcpd6.leases
# vim /etc/dhcp/dhcpd.conf
该配置文件内容为空,在低行模式下读取样例文件
:r /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample
然后修改后内容如下:
option domain-name "itecs.cn";
option domain-name-servers 222.222.222.222, 114.114.114.114;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.80.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.80.101 192.168.80.200;
option subnet-mask 255.255.255.0;
option routers 192.168.80.254;
}
# service dhcpd
Usage: /etc/init.d/dhcpd {start|stop|restart|force-reload|condrestart|try-restart|configtest|status}
# service dhcpd configtest
# service dhcpd start
# chkconfig dhcpd on
3.安装tftp-server
标签:引导,vsftpd,share,etc,usr,dhcpd,Linux,dhcp,PXE
来源: https://www.cnblogs.com/ybliu/p/11579796.html