From ff53d25a6e5120caeff1c57137aceadfca6bebe3 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <nikolaus.krismer@uibk.ac.at> Date: Mon, 4 Aug 2014 20:26:57 +0200 Subject: [PATCH] changes for centos7 (firewall settings; service start/stop) --- etc/vagrant/bootstrap.sh | 15 ++++++++++++++- etc/vagrant/conf/phpPgAdmin.conf | 9 +++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/etc/vagrant/bootstrap.sh b/etc/vagrant/bootstrap.sh index a7b5b5b3..d530d82e 100644 --- a/etc/vagrant/bootstrap.sh +++ b/etc/vagrant/bootstrap.sh @@ -394,11 +394,20 @@ if $INSTALL_POSTGRES; then yum -y localinstall $DOWNLOAD_DIR/epel-repo.rpm > install_epel_repo.log 2>&1 fi -echo "Stopping iptables and SELinux" +echo "Stopping Firewall and SELinux" service iptables stop > stop_iptables.log 2>&1 +service ip6tables stop >> stop_iptables.log 2>&1 +service firewalld stop >> stop_iptables.log 2>&1 +chkconfig iptables off >> stop_iptables.log 2>&1 +chkconfig iptables off >> stop_iptables.log 2>&1 +chkconfig iptables off >> stop_iptables.log 2>&1 +systemctl disable iptables >> stop_iptables.log 2>&1 +systemctl disable ip6tables >> stop_iptables.log 2>&1 +systemctl disable firewalld >> stop_iptables.log 2>&1 if [ $(getenforce) == "Enforcing" ]; then setenforce 0 > stop_selinux.log 2>&1 fi +sed -i 's/SELINUX=enabled/SELINUX=disabled/' /etc/selinux/config if $INSTALL_HTTPD; then echo "Installing httpd server" @@ -739,21 +748,25 @@ fi echo "Starting services" if $INSTALL_HTTPD; then service httpd start > start_httpd.log 2>&1 + systemctl enable httpd >> start_httpd.log 2>&1 chkconfig httpd on >> start_httpd.log 2>&1 sleep 2 fi if $INSTALL_POSTGRES; then service $POSTGRESQL_SERVICE_NAME start > start_pg.log 2>&1 + systemctl enable $POSTGRESQL_SERVICE_NAM >> start_pg.log 2>&1 chkconfig $POSTGRESQL_SERVICE_NAME on >> start_pg.log 2>&1 sleep 2 fi if $INSTALL_NEO4J; then service $NEO4J_SERVICE_NAME start > start_neo4j.log 2>&1 + systemctl enable $NEO4J_SERVICE_NAME >> start_neo4j.log 2>&1 chkconfig $NEO4J_SERVICE_NAME on >> start_neo4j.log 2>&1 sleep 2 fi if $INSTALL_TOMCAT; then service $TOMCAT_NAME start > start_tomcat.log 2>&1 + systemctl enable $TOMCAT_NAME >> start_tomcat.log 2>&1 chkconfig $TOMCAT_NAME on >> start_tomcat.log 2>&1 sleep 2 fi diff --git a/etc/vagrant/conf/phpPgAdmin.conf b/etc/vagrant/conf/phpPgAdmin.conf index 9b376601..dd8094c0 100644 --- a/etc/vagrant/conf/phpPgAdmin.conf +++ b/etc/vagrant/conf/phpPgAdmin.conf @@ -1,6 +1,11 @@ Alias /phpPgAdmin /usr/share/phpPgAdmin <Location /phpPgAdmin> - Order deny,allow - Allow from all + <IfVersion < 2.4> + Order deny,allow + Allow from all + </IfVersion> + <IfVersion >= 2.4> + Require all granted + </IfVersion> </Location> -- GitLab