×

扫描二维码登录本站

QQ登录

只需一步,快速开始

标签: 暂无标签
本帖最后由 adminlily 于 2020-12-11 15:31 编辑

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/

此基本配置可与iTop一起使用。您需要具有SE Linux的丰富知识才能应用限制性更强的权利。

写入文件
如果安装程序抱怨iTop的conf文件夹存在但无法写入,并且目录上的访问权利看起来正确,则尝试关闭SE Linux上下文:

设置力 0

这将完全关闭安全上下文检查。绝对不适合生产系统,但可能有助于隔离问题的来源。提供有关安全上下文的更多信息[ ttps://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/chap-Security-Enhanced_Linux-SELinux_Contexts.html]这里[/url] 要么[ ttp://fedoraproject.org/wiki/Security_context]那里[/url].

连接到远程MySQL服务器
如果麻烦您将iTop连接到远程MySQL服务器,请使用以下命令检查SELinux设置:

getsebool -a | grep 'httpd'

您应该看到类似以下内容:

allow_httpd_anon_write –> offallow_httpd_bugzilla_script_anon_write –> offallow_httpd_cvs_script_anon_write –> offallow_httpd_mod_auth_pam –> offallow_httpd_nagios_script_anon_write –> offallow_httpd_prewikka_script_anon_write –> offallow_httpd_squid_script_anon_write –> offallow_httpd_sys_script_anon_write –> offhttpd_builtin_scripting –> onhttpd_can_network_connect –> offhttpd_can_network_connect_db –> offhttpd_can_network_relay –> offhttpd_can_sendmail –> onhttpd_disable_trans –> offhttpd_enable_cgi –> onhttpd_enable_ftp_server –> offhttpd_enable_homedirs –> onhttpd_rotatelogs_disable_trans –> offhttpd_ssi_exec –> offhttpd_suexec_disable_trans –> offhttpd_tty_comm –> onhttpd_unified –> onhttpd_use_cifs –> offhttpd_use_nfs –> off

如果您看到httpd_can_network_connect_db –>行关闭,则表明Web服务器无法与MySQL服务器建立任何网络连接。

要对变更进行此安全设置,请键入以下命令(以root用户身份):

setsebool -P httpd_can_network_connect_db on


远程的连接到iTop
如果只能从计算机本身而不是从远程系统连接到Web服务器,则请检查防火墙(iptables)配置。

firewall-cmd --list-services

命令的输出应该类似于:

dhcp-v6-client http mdns ssh

如果http不在列表中,则将禁止对Web服务器的访问。要解除阻止,请启动(以root用户身份)以下命令:

firewall-cmd --add-service=http





上一篇:iTop安装实施-安装手册-环境需求-iTop和NGINX
下一篇:iTop安装实施-安装手册-环境需求-在windows环境使用easyPHP一键安装
PCer

写了 294 篇文章,拥有财富 1568,被 3 人关注

您需要登录后才可以回帖 登录 | 立即注册
B Color Link Quote Code Smilies

成为第一个吐槽的人

手机版|小黑屋|最新100贴|论坛版块|ITIL先锋论坛 |粤ICP备11099876号|网站地图
Powered by Discuz! X3.4 Licensed  © 2001-2017 Comsenz Inc.
返回顶部