Skip to content
Snippets Groups Projects
Commit 536e614c authored by markus.wagner's avatar markus.wagner
Browse files

Fix 763 centos6

parent 9d70d99c
Branches
1 merge request!29Fix 763 centos6
......@@ -49,7 +49,7 @@ if [[ "${INSTALL_TYPE}" == *"singlenode"* ]]; then
--route "$(hostname -s)" \
--priority 20
restartService ${HTTPD}
# the add balancer script already restarts
# restartService ${HTTPD}
fi
......@@ -776,6 +776,87 @@ function addOxBuildKey {
fi
}
function fixCentOS6 {
rm -rf /etc/yum.repos.d/CentOS*.repo
rm -rf /etc/yum.repos.d/epel*.repo
cat << 'EOF' > /etc/yum.repos.d/CentOS.repo
[base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
#released updates
[updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
# additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
# additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF
cat << 'EOF' > /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
metadata_expire=never
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/$basearch/debug
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
metadata_expire=never
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/SRPMS
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
metadata_expire=never
EOF
sed -i "s/$(grep 127.0.0.1 /etc/hosts)/$(grep 127.0.0.1 /etc/hosts) $(hostname)/" /etc/hosts
service iptables stop
}
function preInstallActions {
if [[ -z ${EXECUTED_preInstallActions} ]]; then
......@@ -793,6 +874,10 @@ function preInstallActions {
ADDITIONAL_PACKAGES="${ADDITIONAL_PACKAGES}"
fi
if [[ "${DIST}" == "CENTOS6" ]]; then
fixCentOS6
fi
if [[ "${INSTALL_TYPE}" == *"docker"* ]]; then
if [[ true == "${ANY_CENTOS}" ]]; then
echo "Adding epel repository for additional packages ..."
......
......@@ -106,11 +106,14 @@ if [[ true == "${ANY_DEB}" ]] || [[ true == "${ANY_SLES}" ]]; then
fi
elif [[ true == "${ANY_RHEL}" ]] || [[ true == "${ANY_CENTOS}" ]]; then
yum install -y mod_ssl openssl
echo 'LoadModule ssl_module modules/mod_ssl.so' >> /etc/httpd/conf/httpd.conf
mv "${HTTPD_CONF_PATH}/welcome.conf" "${HTTPD_CONF_PATH}/welcome.DISABLED"
echo "Removing default virtual host from config ..."
#mv "${HTTPD_CONF_PATH}/ssl.conf" "${HTTPD_CONF_PATH}/ssl.DISABLED"
sed -i.bak '/<VirtualHost .*>/,/<\/VirtaulHost>/d' ${HTTPD_CONF_PATH}/ssl.conf
mv "${HTTPD_CONF_PATH}/ssl.conf" "${HTTPD_CONF_PATH}/ssl.DISABLED"
#sed -i.bak '/<VirtualHost .*>/,/<\/VirtaulHost>/d' ${HTTPD_CONF_PATH}/ssl.conf
if [[ "${INSTALL_TYPE}" != *"docker"* ]]; then
# These steps are not required if this setup is docker
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment