-
Notifications
You must be signed in to change notification settings - Fork 7
Installation: Incorporating SELinux
acozine edited this page May 28, 2013
·
4 revisions
If you're using CentOS with SELinux, we recommend turning SELinux off during your installation process. If you've finished the installation and successfully transcoded and downloaded a file, you may want to reinstate SELinux. Here are our notes about how to configure it to work with HydraDAM.
- Edit /etc/sysconfig/selinux with
sudo vi /etc/sysconfig/selinux
and setSELINUX=enforcing
. - Confirm that you can turn SELinux on and off:
sudo getenforce
will return "enforcing" if SELinux is installed and running;sudo setenforce 0
temporarily turns SELinux off;sudo setenforce 1
turns it back on. - Install the SELinux development tools:
sudo yum install –y policycoreutils-python
- Enable passenger to work with SELinux:
- Switch SELinux off with
sudo setenforce 0
- Walk through SELinux log and generate new SELinux policy module
grep httpd /var/log/audit/audit.log | audit2allow -M passenger
- Install newly created SELinux module
semodule -i passenger.pp
- Switch SELinux back into enforcing mode
setenforce 1
- Switch SELinux off with
- Enable apache to work with SELinux:
sudo /usr/sbin/setsebool -P httpd_can_network_connect=1
- Enable mysql to run in the nonstandard directory (/opt/mysql) with SELinux:
sudo semanage fcontext –a –t mysqld_db_t “/opt/mysql(/.*)?”
sudo restorecon –Rv /opt/mysql
- Turn SELinux on:
sudo setenforce 1
- Restart mysql, tomcat, and apache, then try again to upload a file