<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enforcing on shocksolution.com</title><link>https://shocksolution.com/tags/enforcing/</link><description>Recent content in Enforcing on shocksolution.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 14 Jun 2018 03:27:28 +0000</lastBuildDate><atom:link href="https://shocksolution.com/tags/enforcing/index.xml" rel="self" type="application/rss+xml"/><item><title>New Relic APM on Fedora/CentOS/RedHat with SELinux Enforcing: Solved</title><link>https://shocksolution.com/posts/new-relic-apm-on-fedora-centos-redhat-with-selinux-enforcing-solved/</link><pubDate>Thu, 14 Jun 2018 03:27:28 +0000</pubDate><guid>https://shocksolution.com/posts/new-relic-apm-on-fedora-centos-redhat-with-selinux-enforcing-solved/</guid><description>&lt;p&gt;I found the solution for getting the New Relic APM Agent to run on a CentOS 7 system with SELinux Enforcing. The only SELinux modification you have to make is to change the context of the log file directory &lt;strong&gt;/var/log/newrelic&lt;/strong&gt;. You can temporarily make these changes with the chcon command: [code lang=&amp;ldquo;bash&amp;rdquo;] chcon -R -t httpd_log_t /var/log/newrelic/ [/code] Kill any running instances of newrelic-daemon. If you&amp;rsquo;re using New Relic&amp;rsquo;s recommended default setup, make sure that the file /etc/newrelic/newrelic.cfg does &lt;strong&gt;not&lt;/strong&gt; exist. Verify that all required values in /etc/php.d/newrelic.ini are correct (especially the license key and the application name). Finally, restart httpd: [code lang=&amp;ldquo;bash&amp;rdquo;] systemctl restart httpd [/code] If that works, you should see output in both /var/log/newrelic/newrelic-daemon.log and /var/log/newrelic/php_agent.log. Now, make this file context change persistent, and verify the result: [code lang=&amp;ldquo;bash&amp;rdquo;] semanage fcontext &amp;ndash;add &amp;ndash;type httpd_log_t &amp;ldquo;/var/log/newrelic(/.*)?&amp;rdquo; restorecon -RF /var/log/newrelic/ ls -laZ /var/log/newrelic/ [/code] When you restart Apache, it spawns the newrelic-daemon processes, which communicate with APM via the socket file /tmp/.newrelic.sock. You really don&amp;rsquo;t want to run the newrelic-daemon processes via systemd if you can avoid it. The resulting process tree should look like this:&lt;/p&gt;</description></item></channel></rss>