bootstrap.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_auth_gssapi \
  11. mod_ssl \
  12. ntp \
  13. bind-utils \
  14. krb5-workstation
  15. systemctl stop firewalld
  16. systemctl disable firewalld
  17. systemctl enable ntpd
  18. cat <<EOF >> /etc/sysctl.conf
  19. net.ipv6.conf.all.disable_ipv6 = 1
  20. net.ipv6.conf.default.disable_ipv6 = 1
  21. net.ipv6.conf.lo.disable_ipv6 = 1
  22. EOF
  23. echo "10.80.88.88 kdc.test.gokrb5" >> /etc/hosts
  24. echo "10.80.88.89 client.test.gokrb5" >> /etc/hosts
  25. echo "10.80.88.90 host.test.gokrb5" >> /etc/hosts
  26. sh /vagrant/krb-setup.sh
  27. mv /vagrant/httpd-krb5.conf /etc/httpd/conf.d/
  28. cp /vagrant/host.testtab /etc/krb5.keytab
  29. chcon system_u:object_r:httpd_config_t:s0 /etc/httpd/conf.d/*
  30. chcon system_u:object_r:httpd_config_t:s0 /vagrant/http.testtab
  31. chmod 644 /vagrant/http.testtab
  32. mkdir /var/www/html/modkerb
  33. mkdir /var/www/html/modgssapi
  34. echo "<html>TEST.GOKRB5</html>" > /var/www/html/modkerb/index.html
  35. echo "<html>TEST.GOKRB5</html>" > /var/www/html/modgssapi/index.html
  36. systemctl restart httpd
  37. systemctl enable httpd
  38. reboot