SE Linux config issues on disconnected server

Mongo 6.0.5 on RHEL 9.1

I’m trying to configure SE linux on a server that can’t go out to the internet. I’m following the directions for configuring SE Linux but I’m having several issues.

Percona installation says follow MongoDB’s “Configure SE Linux” steps. These steps point to a git repo to run some make installs. The problem is these steps are restricted to RHEL 7 & 8.

Does Percona have steps to configure v6 on RHEL 9? The compatibility matrix says v6 and RHEL 9 are good to go.

I still tried it a got some errors and I couldn’t start mongod service. Because the server is disconnected I downloaded the git repo and brought it up to the server. Here are my commands.

[root@]#unzip mongodb-selinux-master.zip

[root@]#cd mongodb-selinux-master/

[root@]#make
(cd selinux; make -f /usr/share/selinux/devel/Makefile)
make[1]: Entering directory '/home/xx/PerconaMongo/mongodb-selinux-master/selinux'
Compiling targeted mongodb module
Creating targeted mongodb.pp policy package
rm tmp/mongodb.mod.fc tmp/mongodb.mod
make[1]: Leaving directory '/home/xx/PerconaMongo/mongodb-selinux-master/selinux'
mkdir -p build/targeted
mv selinux/mongodb.pp build/targeted/

[root@]# make install
cp build/targeted/mongodb.pp /usr/share/selinux/targeted/mongodb.pp
/usr/sbin/semodule --priority 200 --store targeted --install /usr/share/selinux/targeted/mongodb.pp
libsemanage.semanage_direct_install_info: Overriding mongodb module at lower priority 100 with module at priority 200.
/sbin/fixfiles -R mongodb-enterprise-server restore || true
mongodb-enterprise-server not found

/sbin/fixfiles -R mongodb-org-server restore || true
mongodb-org-server not found

/sbin/restorecon -R /var/lib/mongo || true
/sbin/restorecon -R /run/mongodb || true
/sbin/restorecon: lstat(/run/mongodb) failed: No such file or directory

[root@]# systemctl status mongod
Failed to get properties: Access denied

Thanks for any input!

Sorry, looks like I missed this.

Starting in MongoDB 5.0, a new SELinux policy is available for MongoDB installations that:

* Use an `.rpm` installer.
* Use default configuration settings.
* Run on RHEL7 or RHEL8.

If your installation does not meet these requirements, refer to the [SELinux Instructions](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/#std-label-install-enterprise-tarball-rhel-configure-selinux) for `.tgz` packages.

Giving it a shot now