3

I've been testing deployment for a website with some virtual servers. I have most of my deployment steps done via kickstart file (package installation and user creation). However, for MySQL I have to:

  1. Run mysql_secure_installation (sets up root password, deletes anonymous users, disallows root login remotely, removes test databases) ./

  2. Then, create the website's databases and the database user.

I'm not sure if this is possible in kickstart---especially the prompts in mysql_secure_installation. Perhaps someone has some suggestions or examples?

Belmin Fernandez
  • 10,799
  • 27
  • 84
  • 148

2 Answers2

2

i strongly recommend you look at using something like puppet for this higher-level configuration management. Kickstart is a great way to initially bring up a machine, but it is not sophisticated enough for more advanced configuration. Here's some docs on bootstrapping puppet with kickstart.

I just picked puppet as an example, Chef and cfengine are other find configuration management tools you can use to automate this process.

Phil Hollenback
  • 14,947
  • 4
  • 35
  • 52
0

What you may wish to do is build a custom RPM package for the MySQL configuration you want and instruct kickstart to include this package. While there is a post-install portion of kickstart where you may run scripts and the like, the cleanest way would be via package.

Once you perform a 'mysql_secure_installation' you shouldn't have to again. Just use the config files and database that it created.

Grahamux
  • 632
  • 3
  • 6