Fixed openresyrepo and selinux for EL8
This commit is contained in:
@@ -38,17 +38,17 @@ elif [ "$(grep -oP '(?<=^PLATFORM_ID=).+' /etc/os-release | tr -d '"')" = "platf
|
|||||||
###el8 prep
|
###el8 prep
|
||||||
PKGM=dnf
|
PKGM=dnf
|
||||||
####addding mongoDB and openresty Repos
|
####addding mongoDB and openresty Repos
|
||||||
$PKGM -y install --no-install-recommends wget gnupg ca-certificates openssl uuid checkpolicy
|
$PKGM install -y wget gnupg ca-certificates openssl uuid checkpolicy
|
||||||
wget https://openresty.org/package/centos/openresty.repo
|
wget https://openresty.org/package/centos/openresty.repo -O /etc/yum.repos.d/openresty.repo
|
||||||
rpm --import https://openresty.org/package/pubkey.gpg
|
rpm --import https://openresty.org/package/pubkey.gpg
|
||||||
sed -i 's/MOGOVER/'$MongoVer'/g' config/EL8/mongodb.repo
|
sed -i 's/MOGOVER/'$MongoVer'/g' config/EL8/mongodb.repo
|
||||||
mv config/EL8/mongodb.repo /etc/yum.repos.d/mongodb-org-$MongoVer.repo
|
mv config/EL8/mongodb.repo /etc/yum.repos.d/mongodb-org-$MongoVer.repo
|
||||||
$PKGM check-update --refresh
|
$PKGM check-update --refresh
|
||||||
useradd -r -U -s /usr/sbin/nologin -d /var/www www-data
|
useradd -r -U -s /usr/sbin/nologin -d /var/www www-data
|
||||||
###adding selinux module
|
###adding selinux module
|
||||||
checkmodule -M -m -o /tmp/mongodb.mod config/EL8/mongodb.te
|
checkmodule -M -m -o /tmp/mongodb_cgroup_memory.mod config/EL8/mongodb.te
|
||||||
semodule_package -o /tmp/mongodb.pp -m /tmp/mongodb.mod
|
semodule_package -o /tmp/mongodb_cgroup_memory.pp -m /tmp/mongodb_cgroup_memory.mod
|
||||||
semodule -i /tmp/mongodb.pp
|
semodule -i /tmp/mongodb_cgroup_memory.pp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##Installing packages
|
##Installing packages
|
||||||
|
|||||||
Reference in New Issue
Block a user