Pregunta

I have multiple PHP-MySQL applications which I ship to customers regularly. At each upgrade, I need to give them PHP scripts and MySQL SQL files. Things get messed up, usual problems are version mismatch or file permission mismatch or partial upgrades.

I have basic understanding of RPMs, and I can build a sample RPM if required. Host of the apps are Cent OS 6.2, httpd and mysql-server.

Should I pack my content in RPMs?

I see below benefits :

  • Easy upgrades - # rpm -Uvh app.rpm
  • Can host a repo online and my clients can # yum upgrade app
  • More automated, less change for human mistakes.

Should I be doing this?

¿Fue útil?

Solución

You definitely should do so, if your target OS is RPM based.

Then you can add httpd, php and mysql-server as requirements and have exactly your content inside the RPM.

That's exactly what RPM is made for.

For the start, you might want to have a look at other RPMs to see how they deal with config files, documentation etc.

You as well might want to consider putting your application not under /srv/..., but under /usr/lib/... or /usr/share/... and have a specially crafted file under /etc/apache2/vhosts.d/, but that's a matter of taste.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top