SELinux and LAMP.

Support for security such as Firewalls and securing linux
Post Reply
Posts: 735
Joined: 2014/11/24 11:04:37

SELinux and LAMP.

Post by hack3rcon » 2020/06/16 17:46:14

I want to install Apache, MySQL and PHP on CentOS 8, but I don't like to disable SELinux. I know that SELinux maybe cause some problems and I want to configure it to protect my system. Which SELinux configuration and commands I must run?
I'm thankful if anyone share the experiences.

Thank you.

Posts: 1250
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: SELinux and LAMP.

Post by lightman47 » 2020/06/16 19:44:27

You're following the wrong directions if they tell you to disable anything!!
I'm not up to date with CentOS 8, but Mariadb (mysql fork) may already be installed - not sure.

sudo dnf install httpd php may help.

httpd = Apache
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

Posts: 735
Joined: 2014/11/24 11:04:37

Re: SELinux and LAMP.

Post by hack3rcon » 2020/06/21 13:27:57

Thank you, but I need properly SELinux commands about LAMP and WordPress.
I don't like to disable it.

User avatar
Forum Moderator
Posts: 30337
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: SELinux and LAMP.

Post by TrevorH » 2020/06/21 17:05:48

So don't disable it.

No-one can tell you how to fix problems that you haven't experienced yet. Install what you need, run it. If you get problems then use our wikipage article (the first in the list below) to analyze the problems and fix them.

Useful resources for SELinux: | | ... ced_Linux/ | | ... licy-guide | ... tions.html
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 8 - Security Support”