gchq / stroom-ansible

A home for all stroom related ansible playbooks, roles, etc.
Apache License 2.0
4 stars 6 forks source link

non-docker mysql setup selinux #21

Open arterialplan opened 3 years ago

arterialplan commented 3 years ago

This is for dw-v7 branch The non-docker install of mysql errors because it can't start the mysql databases. In order to get these working I had to run the following commands

# Add the new directories to the mysqld_db_t selinux context
sudo semanage fcontext -a -t mysqld_db_t "/var/lib/mysql-stroom(/.*)?"
sudo semanage fcontext -a -t mysqld_db_t "/var/lib/mysql-stats(/.*)?"
sudo restorecon -rv /var/lib/mysql-stroom
sudo restorecon -rv /var/lib/mysql-stats
# And add port 3307 to the selinux context for mysqld_port_t
sudo semanage port -a -t mysqld_port_t -p tcp 3307

The ansible inventory is set with both instances on the same host