bootstrap.sh 991 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. rm /etc/localtime
  3. ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
  4. setenforce 0
  5. sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
  6. yum update -y
  7. yum install -y \
  8. httpd \
  9. mod_auth_kerb \
  10. mod_ssl \
  11. ntp \
  12. krb5-workstation
  13. systemctl stop firewalld
  14. systemctl disable firewalld
  15. systemctl enable ntpd
  16. cat <<EOF >> /etc/sysctl.conf
  17. net.ipv6.conf.all.disable_ipv6 = 1
  18. net.ipv6.conf.default.disable_ipv6 = 1
  19. net.ipv6.conf.lo.disable_ipv6 = 1
  20. EOF
  21. echo "10.80.88.88 kdc.test.gokrb5" >> /etc/hosts
  22. echo "10.80.88.89 client.test.gokrb5" >> /etc/hosts
  23. echo "10.80.88.90 host.test.gokrb5" >> /etc/hosts
  24. sh /vagrant/krb-setup.sh
  25. mv /vagrant/httpd-krb5.conf /etc/httpd/conf.d/
  26. chcon system_u:object_r:httpd_config_t:s0 /etc/httpd/conf.d/*
  27. chcon system_u:object_r:httpd_config_t:s0 /vagrant/http.testtab
  28. chmod 644 /vagrant/http.testtab
  29. echo "<html>TEST.GOKRB5</html>" > /var/www/html/index.html
  30. systemctl restart httpd
  31. systemctl enable httpd
  32. reboot