TFTP伺服器
請執行底下指令以安裝 tftp 套件:# apt-get install tftpd-hpa
# wget ftp://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz
如出現 ping 8.8.8.8 [正常] 而 ping www.google.com [失敗]
錯誤訊息例 : know host www.google.com 則輸入:
# echo "nameserver 120.117.2.1" >> /etc/resolv.conf
然後將 netboot.tar.gz 解開在 /srv/tftp 目錄,指令如下:
# tar xfva netboot.tar.gz -C /srv/tft
# /etc/init.d/tftpd-hpa restart
[ ok ] Restarting HPA's tftpd: in.tftpd.
DHCP伺服器
先要安裝 isc-dhcp-server 套件# apt-get install isc-dhcp-server
在/etc/dhcp/dhcpd.conf 加入以下
option domain−name " example . org " ;
option domain−name−servers 8.8.8.8;
default−lease−time 600;
max−lease−time 7200;
allow booting ;
subnet 192.168.10.0 netmask 255.255.255.0{
range 192.168.10.100 192.168.10.200;
option subnet−mask 255.255.255.0;
option broadcast−address 192.168.10.255;
option routers 192.168.10.1;
option domain−name−servers 8.8.8.8;
next−server 192.168.10.254;
filename "pxelinux.0";
}
# /etc/init.d/isc-dhcp-server restart
# update-rc.d isc-dhcp-server defaults
發生問題 :
在/etc/default/isc-dhcp-server增加下列
INTERFACES="eth0"
apache 伺服器
# apt-get install apache2 \Enter# mkdir -p /var/www/debian
# fidsk -lu
會發現2G的deb_mirror.img掛載在/dev/sdb1
# blkid /dev/sdb1 \Enter
找出UUID
在 /etc/fstab 底下新增
UUID=b43e1707-19c5-42cb-9424-f4bf7118d39a /var/www/debian ext4 defaults 0 2
或者
UUID=sdb1 /var/www/debian ext4 defaults 0 2
# /etc/init.d/apache2 restart \Enter
[ ok ] Restarting web server: apache2 ... waiting .
# mount /dev/sdb1 /var/www/debian
沒有留言:
張貼留言