in DevOps

Tips: See the contents of an RPM post-install script

Today I had the need to look at MySQL.com’s post-install scripts for MySQL Advanced. Unfortunately, I was lazy not having quick and easy access to the specfile, I used my blackbelt in Google-fu to figure out that it was simpler than I thought. In my case, I had already installed the RPM. All I needed to do was:

rpm -q --scripts MySQL-server-advanced-gpl | less

and out popped the post-install script. Why did I need to do this? Part of the work I’m doing with bcfg2 is to automate the installation and configuration of my MySQL servers. My requirements state that I need to be able to run more than one instance on the same server. Unfortunately, the default installation of MySQL-server-advanced-gpl sets up a basic db instance for you, right smack in the directory I’m working in. The problem is, this walks all over the directory layout I need for my servers.

At least I know what’s causing the default install to occur. Now, to go make bcfg2 do something about it.

Travis Campbell
Staff Systems Engineer at ghostar
Travis Campbell is a seasoned Linux Systems Engineer with nearly two decades of experience, ranging from dozens to tens of thousands of systems in the semiconductor industry, higher education, and high volume sites on the web. His current focus is on High Performance Computing, Big Data environments, and large scale web architectures.