Installation selinux issues - kwantu/platformconfiguration GitHub Wiki
back
If there is an install issue with mysql
# To check the current selinux contexts applied to files/folders
ls -halZ /usr/local/data/
# Add the mysqld_db_t context to the folder and all subdirectories and files
semanage fcontext -a -t mysqld_db_t "/usr/local/data(/.*?)"
# Ensure the new context definitions are applied to the new folder
restorecon -Rv /usr/local/data/
# Verify that the new context has applied correctly
# To check the current selinux contexts applied to files/folders
ls -halZ /usr/local/data/mysql
# Add the mysqld_db_t context to the folder and all subdirectories and files
semanage fcontext -a -t mysqld_db_t "/usr/local/data/mysql(/.*?)"
# Ensure the new context definitions are applied to the new folder
restorecon -Rv /usr/local/data/mysql
# To check the current selinux contexts applied to files/folders
ls -halZ /usr/local/data/couchdb
# Add the mysqld_db_t context to the folder and all subdirectories and files
semanage fcontext -a -t couchdb_var_lib_t "/usr/local/data/couchdb(/.*?)"
# Ensure the new context definitions are applied to the new folder
restorecon -Rv /usr/local/data/couchdb
# To check the current selinux contexts applied to files/folders
ls -halZ /usr/local/data/redis
# Add the mysqld_db_t context to the folder and all subdirectories and files
semanage fcontext -a -t redis_log_t "/usr/local/data/redis(/.*?)"
# Ensure the new context definitions are applied to the new folder
restorecon -Rv /usr/local/data/redis
# Verify that the new context has applied correctly
ls -halZ /usr/local/data/mysql
ls -halZ /usr/local/data/couchdb
ls -halZ /usr/local/data/redis
ls -halZ /usr/local/data/