Desain Topologi:
Langkah-langkah:
1. Pasang dan aktifkan layanan HTTP Apache.
yum install httpd2. Tambahkan layanan HTTP pada firewall
systemctl start httpd
systemctl enable httpd
systemctl status httpd
firewall-cmd --permanent --add-service=http3. Salin semua isi DVD RHEL7 ke direktori /var/www/html/rhel7-dvd/
firewall-cmd --reload
firewall-cmd --list-services
mkdir /media/cdrom4. Buat file kickstart rhel7-new.ks yang berisi pilihan proses instalasi RHEL 7 menggunakan system-config-kickstart atau Web Kickstart Configuration Tool.
mount /dev/sr0 /media/cdrom
mkdir /var/www/html/rhel7-dvd/
cp -rvf /media/cdrom/* /var/www/html/rhel7-dvd/
umount /dev/sr0
Contoh isi rhel7-new.ks:
lang en_US
keyboard us
timezone Asia/Jakarta
rootpw $1$A/vAVj1b$2clnzmAO.6WkfW2/v2.GW1 --iscrypted
#platform x86, AMD64, or Intel EM64T
reboot
url --url=http://10.10.10.254/rhel7-dvd
bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
zerombr
clearpart --all --initlabel
autopart
auth --passalgo=sha512 --useshadow
selinux --enforcing
firewall --enabled --ssh
skipx
firstboot --disable
%post
echo "Yeay, Instalasi Otomatis RHEL 7 Berhasil!" >> /etc/issue
%end
%packages
@base
%end
5. Salin file rhel7-new.ks ke /var/www/html/
6. Pasang paket dhcp
yum install dhcp7. Edit file konfigurasi layanan dhcp /etc/dhcp/dhcpd.conf
option domain-name "azoebs.com";8. Aktifkan layanan DHCP.
option domain-name-servers 180.131.144.144, 180.131.145.145;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 10.10.10.0 netmask 255.255.255.0 {
range dynamic-bootp 10.10.10.100 10.10.10.199;
option routers 10.10.10.254;
filename "pxelinux.0";
}
systemctl start dhcpd9. Tambahkan layanan DHCP pada firewall
systemctl enable dhcpd
systemctl status dhcpd
firewall-cmd --permanent --add-service=dhcp10. Pasang paket tftp-server
firewall-cmd --reload
firewall-cmd --list-services
yum install tftp-server11. Edit file konfigurasi layanan dhcp /etc/xinetd.d/tftp.
disable = no12. Aktifkan layanan xinetd.
systemctl start xinetd13. Tambahkan layanan TFTP pada firewall
systemctl enable xinetd
systemctl status xinetd
firewall-cmd --permanent --add-service=tftp13. Salin beberapa file dari /var/www/html/rhel7-dvd/isolinux/ ke /var/lib/tftpboot/
firewall-cmd --reload
firewall-cmd --list-services
cp /var/www/html/rhel7-dvd/isolinux/boot.msg /var/lib/tftpboot/14. Pasang paket syslinux dan salin file /usr/share/syslinux/pxelinux.0 ke /var/lib/tftpboot/
cp /var/www/html/rhel7-dvd/isolinux/initrd.img /var/lib/tftpboot/
cp /var/www/html/rhel7-dvd/isolinux/vesamenu.c32 /var/lib/tftpboot/
cp /var/www/html/rhel7-dvd/isolinux/vmlinuz /var/lib/tftpboot/
yum install syslinux15. Buat direktori /var/lib/tftpboot/pxelinux.cfg
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
mkdir /var/lib/tftpboot/pxelinux.cfg16. Buat file menu bootloader /var/lib/tftpboot/pxelinux.cfg/default
default vesamenu.c3217. Uji konfigurasi dengan menyalakan server baru yang akan dipasang RHEL 7 (boot ke LAN). Jika konfigurasi berhasil, server baru akan dipasang RHEL 7 secara otomatis. Setelah pemasangan RHEL 7 selesai, server baru akan reboot (boot ke harddisk).
prompt 0
timeout 100
display boot.msg
label linux
menu label ^Instal Otomatis RHEL 7
menu default
kernel vmlinuz
append initrd=initrd.img ip=dhcp inst.repo=http://10.10.10.254/rhel7-dvd ks=http://10.10.10.254/rhel-new.ks
No comments:
Post a Comment