iTop安装实施-安装手册-环境需求-iTop and SELinux
iTop和SE Linux
某些Linux发行版(Fedora,RedHat,CentOS…)默认情况下启用SELinux。这需要先放置其他安全配置,然后才能开始使用iTop
。
基本SE Linux配置// allow Read/Write on itop root and childs folders
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/itop(/.*)?" // apply the policy restorecon -Rv /var/www/html/itop/ // view the applied policy ls -lZ /var/www/html/itop/
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/itop(/.*)?" // apply the policy restorecon -Rv /var/www/html/itop/ // view the applied policy ls -lZ /var/www/html/itop/
此基本配置可与iTop一起使用。您需要具有SE Linux的丰富知识才能应用限制性更强的权利。
如果安装程序抱怨iTop的conf文件夹存在但无法写入,并且目录上的访问权利看起来正确,则尝试关闭SE Linux上下文:
设置力 0
这将完全关闭安全上下文检查。绝对不适合生产系统,但可能有助于隔离问题的来源。提供有关安全上下文的更多信息[ /documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/chap-Security-Enhanced_Linux-SELinux_Contexts.html]这里 要么[ /wiki/Security_context]那里.
如果麻烦您将iTop连接到远程MySQL服务器,请使用以下命令检查SELinux设置:
您应该看到类似以下内容:
如果您看到httpd_can_network_connect_db –>行关闭,则表明Web服务器无法与MySQL服务器建立任何网络连接。
要对变更进行此安全设置,请键入以下命令(以root用户身份):
远程的连接到iTop
如果只能从计算机本身而不是从远程系统连接到Web服务器,则请检查防火墙(iptables)配置。
命令的输出应该类似于:
如果http不在列表中,则将禁止对Web服务器的访问。要解除阻止,请启动(以root用户身份)以下命令: