参考pgpool 安装问题: pgpoolAdmin 安装问题 我遇到了非运行 pgpooladmin 的问题(安装文件权限错误)。我必须更改文件的文件标签:“pgpool.conf”和“pcp.conf”。我用 ls -Z 检查了这些文件并看到了这个:
[root@cvc 等]# ls -Z
-rw-rw-rw-。apache root unconfined_u:object_r:etc_t:s0 pcp.conf
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pcp.conf.sample
-rw-rw-rw-。apache root unconfined_u:object_r:etc_t:s0 pgpool.conf
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pgpool.conf.sample
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pgpool.conf.sample-master-slave
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pgpool.conf.sample-replication
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pgpool.conf.sample-stream
-rw-rw-rw-。root 根 system_u:object_r:etc_t:s0 pool_hba.conf.sample
来自 SELinux 的通信告诉:
您应该使用 semanage fcontext -a -t FILE_TYPE 'pgpool.conf'更改 pgpool.conf 的标签, which FILE_TYPE is one of below: squirrelmail_spool_t, dirsrvadmin_config_t, afs_cache_t, httpd_t, user_cron_spool_t, httpd_lock_t, dirsrv_config_t, httpd_tmp_t, dirsrvadmin_tmp_t, httpd_cache_t, httpd_tmpfs_t, httpd_squirrelmail_t, puppet_tmp_t, dirsrv_var_log_t, zarafa_var_lib_t, dirsrv_var_run_t, httpd_var_lib_t, httpd_var_run_t, httpd_nagios_rw_content_t, passenger_tmp_t, httpd_nutups_cgi_rw_content_t, httpd_apcupsd_cgi_rw_content_t, httpd_dspam_rw_content_t, httpd_mediawiki_rw_content_t, httpd_squid_rw_content_t, httpd_prewikka_rw_content_t, httpd_smokeping_cgi_rw_content_t, passenger_var_run_t, httpd_openshift_rw_content_t, httpd_dirsrvadmin_rw_content_t, httpd_w3c_validator_rw_content_t, cluster_var_lib_t, cluster_var_run_t, httpd_user_rw_content_t, httpd_awstats_rw_content_t, root_t, httpdcontent, httpd_cobbler_rw_content_t,httpd_munin_rw_content_t, cluster_conf_t, cluster_tmp_t, httpd_bugzilla_rw_content_t, httpd_cvs_rw_content_t, httpd_git_rw_content_t, httpd_sys_rw_content_t, httpd_sys_rw_content_t 接下来你必须执行:restorecon -v 'pgpool.conf'
当我尝试更改文件类型时,它告诉我选择的文件类型是错误的...我应该选择哪种文件类型?
解决方案成立:
要修复此问题,我必须执行此命令:
和
然后 pgpooladmin 将显示这些文件是可写的,并允许单击“下一步”安装 pgpoolAdmin。干杯 :D